from phonemizer.backend.espeak.wrapper import EspeakWrapper
EspeakWrapper.set_library('C:\Program Files\eSpeak NG\libespeak-ng.dll')
from transformers import pipeline
narrator = pipeline("text-to-speech", model="kakao-enterprise/vits-ljs")
text = """Researchers at the Allen Institute for AI."""
narrated_text = narrator(text)
from IPython.display import Audio as IPythonAudio
IPythonAudio(narrated_text["audio"][0], rate=narrated_text["sampling_rate"])
Comments
Post a Comment