feat: enhance TTS CLI with sox combining and wait flag

This commit is contained in:
mitchell 2026-04-28 16:56:21 -04:00
parent 6b75836647
commit b3fb6fd66f
2 changed files with 66 additions and 11 deletions

View file

@ -9,5 +9,5 @@ pipeline = KPipeline(lang_code="a", repo_id="hexgrad/Kokoro-82M")
generator = pipeline(text, voice="af_heart", speed=1.2)
for i, (gs, ps, audio) in enumerate(generator):
print(json.dumps({"file": i, "text": gs}))
sf.write(f"{i}.wav", audio, 24000)
print(json.dumps({"file": i, "text": gs}))