Changelog
2.0.0 — 2026-04-14
First release under @pocketpalai/react-native-speech. Transitions the
library from an OS-native TTS wrapper to a multi-engine on-device neural
TTS platform. Breaking vs. the @mhpdev/react-native-speech@1.x line.
Breaking
- Package renamed to
@pocketpalai/react-native-speech. Android
package:com.mhpdev.speech→com.pocketpalai.speech. JNI symbols,
iOS bundle id, andos_logsubsystem moved in lockstep. TTSEngineInterfaceis now generic (TTSEngineInterface<TConfig>).
Each engine implements with its concrete config type.initialize
signature changed fromconfig?: anytoconfig?: TConfig.Speech.initialize(config)takes a discriminated union
SpeechInitConfigkeyed onengine.[key: string]: anyescape
hatch removed.- Pocket engine removed. Apps using
engine: 'pocket'must migrate
to another engine. src/NeuralAudioPlayer.tsrenamed tosrc/NativeAudioPlayer.ts
(Turbo Module shim). The orchestrator at
src/engines/NeuralAudioPlayer.tskept its name.src/types/react-native-fs.d.tsremoved. Consumers that imported
our parallel types should import from@dr.pogodin/react-native-fs
directly.- Per-engine class exports tagged
@internal.KokoroEngine,
SupertonicEngine,KittenEngine,OSEngineremain exported but
their shape is no longer covered by the same semver guarantees as
the defaultSpeechAPI.
Added
- Neural TTS engines: Kokoro, Supertonic, Kitten. All run on
onnxruntime-react-native(optional peer dep). On-device synthesis,
no network I/O. - Phonemization stack — dict+hans00 G2P pipeline. Library ships no
data; consumer apps supply mmap EPD1 dicts via theNativeDictAPI.
Default phonemizer isphonemize(MIT, hans00 G2P) requiring no dict. - Native dict Turbo Module —
cpp/native_dict.cppmmap-backed
parser hardened against untrusted input (overflow-safe bounds,
post-open validation pass,madvise(MADV_RANDOM), fuzz harness at
cpp/tests/fuzz_native_dict.cpp). onAudioInterruptionJS event — surfaces iOS
AVAudioSessionInterruptionNotificationand Android
AudioFocusManagertransitions to JS. Pauses OS TTS and the neural
audio player on focus loss.- Chunked progress tracking —
ChunkProgressEventfor per-sentence
progress on neural engines. - Benchmark infra —
scripts/benchmark-*.sh,benchmarks/schema.json,
benchmark-compare.py,extract-trace-table.py. Native tracing via
os_signpost(iOS) andandroid.os.Trace. - Cold-start instrumentation — each neural engine logs
engine_init_ms=<n>on init success. docs/ARCHITECTURE.md,docs/LICENSES.md,MIGRATION.md,
expandeddocs/USAGE.mdwith per-engine quickstarts.- Hermes-safe UTF-8 decoder (
src/utils/utf8.ts) replaces
TextDecoderwhich is unavailable on Hermes.
Fixed
VoiceLoader.tsno longer crashes on Hermes (TextDecoder → manual
UTF-8 decode, 8 unit tests).- Native dict parser bounds checks are overflow-safe
(off > size || len > size - off), post-open validation rejects
malformed dicts,memcpyavoids alignment hazards. - Android
AudioFocusManagerreacts to focus loss (pause, not just a
boolean flip). - iOS sets a default
AVAudioSessionCategoryPlaybackat init so
interruption notifications fire reliably. - Kitten
ESPEAK_LANGUAGEconstant renamed toPHONEMIZER_LANGUAGE;
espeak-ng is no longer a dependency.
Removed
third-party/phonemizer-dicts/(TSV espeak-ng-derived, GPL risk in
MIT repo;.binlives inhuggingface.co/datasets/palshub).- Pocket engine (
src/engines/pocket/,src/types/Pocket.ts, example
PocketModelManager.ts). - Dead
src/engines/kokoro/utils/AssetLoader.ts. package-lock.json(yarn repo),benchmark-trace-table.csv, and
three transient planning docs (KOKORO_REFACTORING_PLAN.md,
SUPERTONIC_REFACTORING_PLAN.md,MLX_KOKORO_IMPLEMENTATION.md).
Internal
- Test coverage expanded from 6 suites / 255 tests to 9 suites / 294
tests. Kitten, Supertonic, and Kokoro BPE now have unit tests. - 65
console.*calls migrated tocreateComponentLoggerwith levels
(debuggated behind__DEV__). - Zero
anyinsrc/(was 28).