Skipping over some words
#120
by
UyCode
- opened
Issue:
When the sentence contains some special name, for example Microsoft, the result voice does not contain it, why?
example:
input:
'this is a test on Microsoft corporation.'
result:
You do not have espeak-ng installed, see https://github.com/hexgrad/kokoro/issues/24#issuecomment-2625779910
hexgrad
changed discussion status to
closed
I do install the espeak-ng and it is in the PATH.
this 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["_ESPEAK_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:0
This is a specified Microsoft corporation with Kokoro
ðˌɪs ɪz ɐ kˌɔɹpəɹˈAʃən wɪð
and the result file:
fixed :-