Commit e0742e3
authored
fix(kokoro): register streamStop on JSI host object (#951)
## Summary
`Kokoro::streamStop()` exists in C++ (`Kokoro.cpp:205`) and is called
from the JS `TextToSpeechModule.streamStop()` via
`this.nativeModule.streamStop()`, but it's never registered on the JSI
host object in `ModelHostObject.h`.
This causes a runtime error when stopping TTS streaming:
```
TypeError: this.nativeModule.streamStop is not a function (it is undefined)
```
The fix registers `streamStop` as a `synchronousHostFunction` in the
Kokoro `if constexpr` block, matching the existing pattern used for
`SpeechToText`.
## Changes
- `ModelHostObject.h`: Add `streamStop` JSI registration for Kokoro
model type1 parent a3f0cf9 commit e0742e3
File tree
1 file changed
+4
-0
lines changed- packages/react-native-executorch/common/rnexecutorch/host_objects
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
| |||
0 commit comments