Commit e7b1c1b
committed
fix(kokoro): cap token limit to prevent speed-up, preserve phoneme order
The Synthesizer's attention drifts on longer sequences (60+ tokens),
causing later phonemes to be spoken progressively faster. Cap
inputTokensLimit to 60 so the Partitioner splits text into shorter
chunks that stay faithful to the Duration Predictor's timing.
Also switch tokenize()'s std::partition to std::stable_partition so
phoneme token order is preserved when invalid tokens are filtered out.1 parent ae59ea6 commit e7b1c1b
File tree
2 files changed
+9
-1
lines changed- packages/react-native-executorch/common/rnexecutorch/models/text_to_speech/kokoro
2 files changed
+9
-1
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments