Repository navigation
feat(tts): word timestamps for Kokoro - #1495
Merged
Merged
Conversation
Kokoro chunks now report when each input word is spoken. The phonemizer binding exposes preprocess() and phonemize(text, preprocess?), and phonemizeWords() locates input words in the phonemes, counting spelled-out numbers by preprocessing them alone. Also stops a failed synthesize() call from leaving the pipeline marked busy.
barhanc
reviewed
Sep 30, 2026
Bump phonemis to v0.2.0 and expose its phonemize_words() as
phonemizer.phonemize(text, { words: true }), returning PhonemizedText.
Drop speech.phonemizeWords(), preprocess() and the preprocess flag.
phonemis v0.2.0 vendors xsimd, whose headers include each other as `xsimd/...`. Its CMakeLists adds src/third-party for Android; the podspec now does the same.
barhanc
reviewed
Oct 7, 2026
barhanc
left a comment
Member
There was a problem hiding this comment.
Tested the e2e example and it works nicely. Just some smallish comments regarding the implementation.
barhanc
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
words: { text, offset, start, end }, with times in seconds from the start of the stream.phonemize(text, { words: true })also returns each input word's position in the phonemes, via phonemis v0.2.0phonemize_words().synthesize()call that failed while phonemizing or partitioning left the pipeline marked busy.Introduces a breaking change?
Type of change
Tested on
Testing instructions
yarn workspace react-native-executorch testandscripts/run-native-tests.sh -R PhonemizerTest.chunk.wordsagainst the audio. On iPhone 16 (Kokoro EN_US Core ML) word onsets after pauses matched Whisper word timestamps within 10 ms.Screenshots
Related issues
#879
Checklist
Additional notes
Kokoro EN_US XNNPACK could not be tested on iPhone 16: it runs out of memory on
maintoo.