-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kokoro TTS (Python) omits the word "specified" #24
Comments
|
It works, thanks a lot for the solution! |
I do installed the espeak-ng and it is in the PATHthis is my code, and result: from kokoro import KPipeline
import soundfile as sf
import os
os.environ["PHONEMIZER_ESPEAK_LIBRARY"] = 'C:\Program Files\eSpeak NG\libespeak-ng.dll'
os.environ["_SEPEAK_LIBRARY"] = 'C:\Program Files\eSpeak NG\libespeak-ng.dll'
os.environ["PHONEMIZER_ESPEAK_PATH"] = 'C:\Program Files\eSpeak NG\espeak-ng.exe'
pipeline = KPipeline(lang_code='a')
text = '''
This is a specified Microsoft corporation with Kokoro
'''
generator = pipeline(
text, voice='af_sarah', # <= change voice here
speed=1, split_pattern=r'\n+'
)
for i, (gs, ps, audio) in enumerate(generator):
print(i) # i => index
print(gs) # gs => graphemes/text
print(ps) # ps => phonemes
# display(Audio(data=audio, rate=24000, autoplay=i==0))
sf.write(f'{i}.wav', audio, 24000) # save each audio file result: |
@UyCode try the following: from misaki import en, espeak
fallback = espeak.EspeakFallback(british=False) |
thank you for providing the help, it works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I've noticed that Kokoro TTS Python library consistently skips the word "specified" in the generated audio (I only tested for
voice='am_michael'
andvoice='af_bella'
), yet the online demo at hexgrad/Kokoro-TTS pronounces it correctly.My python code:
script.txt:
Could you please help investigate why the word "specified" is dropped by the Python version, but not in the Hugging Face demo? Thanks!
The text was updated successfully, but these errors were encountered: