You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
captioned_speech endpoint is not returning the timestamps for non-english languages #331
Describe the bug
The /dev/captioned_speech endpoint returns timestamps: null instead of word-level timestamps, even when using the latest Docker image that includes the merged streaming word timestamps feature from PR #173. Additionally, enabling streaming mode causes connection errors with chunked encoding issues.
Operating System
Platform: macOS Darwin 24.4.0
Docker version: Latest (pulled image successfully on June 11, 2025)
Hardware: CPU-only (using cpu variant of the image)
Architecture: Apple Silicon (M-series)
Additional context
Audio generation works perfectly - files are created successfully with correct content and size
Only timestamps are affected - the timestamps field consistently returns null
PR #173 context: This issue occurs despite the "Streaming word timestamps" feature being merged on Feb 23, 2025
Endpoint behavior:
/dev/captioned_speech with stream: false → Audio works, timestamps null
/dev/captioned_speech with stream: true → Connection errors
/v1/audio/speech → Crashes server entirely
Expected behavior: Based on the GitHub documentation example, timestamps should contain an array of word-level timing data
Workaround: Currently using --no-timestamps flag to generate audio without timestamp data
I think the error might be due to the fact that im trying to generate timestamps for ef_dora - it's a spanish text. Can you generate timestamps for non-english texts?
changed the title [-]captioned_speech endpoint is not returning the timestamps[/-][+]captioned_speech endpoint is not returning the timestamps for non-english languages[/+]on Jun 11, 2025
to get timestamped audio for spanish text, i had to do this
// Spanish voices don't support timestamps → Use English voices
es: {
voices: ['ef_dora', 'em_alex'], // Normal generation
timestampVoices: ['af_heart', 'am_adam'] // Timestamp generation
}
@hsavit1 How does this work? Surely the timestamps wouldn't line up if you used different voices, with the English ones pronouncing with English phonology?
Activity
hsavit1 commentedon Jun 11, 2025
I think the error might be due to the fact that im trying to generate timestamps for ef_dora - it's a spanish text. Can you generate timestamps for non-english texts?
hsavit1 commentedon Jun 11, 2025
im able to generate timestamps for english voices but not spanish voices
hsavit1 commentedon Jun 11, 2025
to get timestamped audio for spanish text, i had to do this
[-]captioned_speech endpoint is not returning the timestamps[/-][+]captioned_speech endpoint is not returning the timestamps for non-english languages[/+]fireblade2534 commentedon Jun 12, 2025
@hsavit1 This appears to be an issue with the kokoro library itself rather then kokoro-FastAPI.
RBEmerson970 commentedon Jun 12, 2025
Is there any sign of development of Kokoro itself?
hsavit1 commentedon Jun 12, 2025
yeah, also an issue to link to over there
lionel-rowe commentedon Nov 12, 2025
@hsavit1 How does this work? Surely the timestamps wouldn't line up if you used different voices, with the English ones pronouncing with English phonology?
fix: word timestamps for non-English (espeak) voices in captioned_spe…
chore(release): 0.6.0 [skip ci]