Repository navigation
💡 Local Neural Avatar Voice: Offline Kokoro/Supertonic TTS via the Existing sherpa-onnx Engine #576
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
TalkTerm already ships
sherpa-onnx-nodefor local speech-to-text (src/main/speech/sherpa-onnx-stt.ts). The same engine runs open-weight neural TTS models: Kokoro-82M, Supertonic, Piper/VITS. This idea adds a main-processSherpaOnnxTtsadapter behind the existingTextToSpeechport, fed sentence by sentence, so the avatar's voice is natural, private, free to run and identical on macOS, Windows and Linux. Today voice quality depends on whatever voices the OS has installed.Market Signal
tts-1,tts-1-hdand twogpt-4o-mini-ttssnapshots on Jan 6, 2027 (Voice AI News W41). Each cloud dependency is a future migration.OfflineTtsKokoroModelConfig(API docs, Kokoro models).User Signal
src/renderer/speech/web-speech-tts.ts. Voice quality varies by OS and is often robotic on Linux and older Windows builds, which undercuts the "companion, not tool" principle.Technical Opportunity
sherpa-onnx-stt.ts(main-process adapter with model download and size checks) plusipc-speech-stt.ts(renderer proxy). A mirroredsherpa-onnx-tts.tsandipc-speech-tts.tsimplementsTextToSpeechwithout changing the port. The architecture rule "only this file imports sherpa-onnx-node" can be kept with one shared engine wrapper.barge-in-controller.ts) clears the queue.Assessment
Adversarial Review
Strongest objection: CPU latency and size. One community benchmark shows Kokoro ONNX taking about 5.5s for 196 characters on CPU, and the models plus voices add 80–300 MB. That could break NFR1b (first spoken segment within 3s).
Rebuttal: Synthesizing sentence by sentence means only the first short sentence (about 40 characters, roughly 1s at the benchmark's rate) is on the critical path, while later sentences render during playback. Supertonic is about 3x faster on CPU where Kokoro is too slow. The download is optional and deferred, exactly like the STT model today, so first-run setup is not affected. The adapter is also the strategic hedge that makes any cloud voice vendor optional.
Suggested Next Step
Run a 2-day spike: through
sherpa-onnx-node, measure first-sentence latency and real-time factor for Kokoro (English v0_19 and multilingual v1.0) and Supertonic on (a) a 4-core Windows laptop from 2021 and (b) an M-series Mac. Then decide the default model, the minimum hardware for local TTS, and whether to bundle or download.All reactions