Long-form Khmer text-to-speech powered by VoxCPM2. Generates natural, humanized audio of any length by splitting scripts at Khmer sentence boundaries, synthesizing each chunk, then stitching everything together with FFmpeg.
Live at: https://huggingface.co/spaces/koompi/koompi-tts
Input text
↓
split_text() # Khmer sentence boundaries (།), max 500 chars/chunk
↓
VoxCPM2 API # gradio_client → HF Space
• chunk 1: voice description prompt → locks reference WAV
• chunk 2+: controllable cloning from reference → consistent voice
↓
FFmpeg concat # 400ms silence between sentences
↓
output.wav
hf upload koompi/koompi-tts space/ . --repo-type spacepip install -r space/requirements.txt
# Also requires ffmpeg on PATH
cd space && python app.pyspace/ HuggingFace Space (Gradio app)
app.py UI + generation logic
requirements.txt
src/ CLI utilities (chunker, mixer, client)
generate.py CLI entry point
examples/ Sample scripts