Domain changed to archive.palanq.win . Feb 14-25 still awaits import.
[2 / 1 / 1]

No.1528490 View ViewReplyOriginalReport
Can someone help me with this kokoro code?
I dont want the text to be split. I want to get one audio file.

Code :
from kokoro import KPipeline
from IPython.display import display, Audio
import soundfile as sf
import torch
pipeline = KPipeline(lang_code='a')
text = '''
Text to be spoken
'''
generator = pipeline(text, voice='af_heart')
for i, (gs, ps, audio) in enumerate(generator):
print(i, gs, ps)
display(Audio(data=audio, rate=24000, autoplay=i==0))
sf.write(f'{i}.wav', audio, 24000)

Source : https://huggingface.co/hexgrad/Kokoro-82M#usage