{"slug": "show-hn-audio-chat-box-offline-speech-in-and-out-for-any-program-over-stdio", "title": "Show HN: Audio-chat-box – offline speech in and out for any program, over stdio", "summary": "A developer released audio-chat-box, an open-source Rust program that gives any application offline speech-to-text and text-to-speech over standard input/output using one JSON message per line. The tool runs entirely locally through sherpa-onnx, reading text aloud with Kokoro (54 voices) and transcribing speech with Nvidia's Parakeet TDT 0.6B v2, with Silero VAD detecting utterances; models total roughly 834 MB (Kokoro 350 MB, Parakeet 482 MB, Silero VAD 2 MB) and are SHA-256 verified. A Docker Hub demo image, pnxstudios/audio-chat-box-demo at about 880 MB for Linux amd64, lets users try it at localhost:8080 with no network, account or API key.", "body_md": "Add the ability to speak with your AI project • hands free • offline • local-first\n\nSpeech for a program that talks with people, on the computer it runs on. audio-chat-box\nreads text aloud with [Kokoro](https://huggingface.co/hexgrad/Kokoro-82M), turns speech into\ntext with [Parakeet TDT 0.6B v2](https://huggingface.co/nvidia/parakeet-tdt-0.6b-v2), and can\nlisten: the client streams its microphone, [Silero VAD](https://github.com/snakers4/silero-vad)\nfinds each thing said, and Parakeet hears it once the speaker pauses. It all runs locally,\nthrough [sherpa-onnx](https://github.com/k2-fsa/sherpa-onnx), with nothing sent anywhere.\n\nIt is a program of its own that your program starts and talks to over standard input and\noutput, one JSON message a line ([`docs/protocol.md`](https://github.com/cjus/audio-chat-box/blob/main/docs/protocol.md)). It never touches\na microphone or a speaker: your program records and plays. It knows nothing of your\nproduct's domain: your program tells it which words to expect (hotwords), and it favours\nthem where the sound allows, \"knight\" over \"night\" for a chess board, your product's names\nfor yours.\n\nThe fastest way to try audio-chat-box, with nothing to build: pull the **Parrot Service**\ndemo from Docker Hub and run it. You speak, it shows what it heard, and it reads it back.\n\n```\ndocker pull pnxstudios/audio-chat-box-demo\ndocker run --rm --platform linux/amd64 -p 127.0.0.1:8080:8080 pnxstudios/audio-chat-box-demo\n```\n\nThen open **[http://localhost:8080](http://localhost:8080)** (that address, not `127.0.0.1`), press Record and allow\nthe microphone. You can also type text and hear it in any of Kokoro's 54 voices. Ctrl+C\nstops it.\n\nThe image (about 880 MB to download) carries the program and its models, Kokoro and\nParakeet, so it runs with no network, account or API key. It is built for Linux amd64; on\nApple Silicon, Docker runs it under emulation, which works but is slower. This is a speech\ndemo, not an LLM chatbot. [The Docker demo guide](https://github.com/cjus/audio-chat-box/blob/main/docs/docker-demo.md) covers building the\nimage yourself, running it with fewer privileges, the models' licences, privacy, browser\nrequirements and limits.\n\n```\ncargo build --release\ntarget/release/audio-chat-box --models <folder>\n```\n\n| Option |  | \n|---|---|\n| `--models <folder>` | Where the models are, and are downloaded to the first time: Kokoro 350 MB, Parakeet 482 MB, Silero VAD 2 MB, each checked against its SHA-256 | \n| `--models-url <url>` | Where the models are downloaded from. The default is this repository's [`models-v1` release](https://github.com/cjus/audio-chat-box/releases/tag/models-v1) ; a product can name its own copy of the same files | \n| `--speak <model>` | `kokoro` (the default),`kokoro-int8` , or`none` | \n| `--hear <model>` | `parakeet` (the default), or`none` | \n| `--listen <model>` | `silero-vad` , or`none` (the default): listen to speech as it comes (`voice/listen` ), heard with the`--hear` model | \n| `--offline` | Never download: a model that isn't in the folder fails | \n\nIt then reads messages, one JSON line each, and answers:\n\n```\n→ {\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"initialize\", \"params\": {\"protocol\": \"1.0\", \"client\": {\"name\": \"me\", \"version\": \"1\"}}}\n← {\"jsonrpc\": \"2.0\", \"id\": 1, \"result\": {\"protocol\": \"1.0\", \"node\": {\"name\": \"audio-chat-box\", …}, \"capabilities\": {\"voice\": {\"speak\": true, \"transcribe\": true, \"hotwords\": true, \"formats\": [\"wav\", \"pcmF32\"]}}, …}}\n← {\"jsonrpc\": \"2.0\", \"method\": \"voice/modelState\", \"params\": {\"id\": \"kokoro\", \"state\": {\"stage\": \"ready\"}}}\n→ {\"jsonrpc\": \"2.0\", \"id\": 2, \"method\": \"voice/speak\", \"params\": {\"text\": \"Your table is ready.\", \"voice\": \"am_michael\"}}\n← {\"jsonrpc\": \"2.0\", \"id\": 2, \"result\": {\"format\": \"wav\", \"sampleRate\": 24000, \"audio\": \"UklGR…\", \"durationMs\": 1150}}\n```\n\n`voice/voices` lists Kokoro's 54 voices, `voice/models` the models and how ready each is, and\n`voice/transcribe` hears a WAV file or raw samples, with the hotwords given. On an M1 Max\nboth models load in about a second, and a sentence is read in under one.\n\n`voice/listen` takes 16 kHz raw samples in `voice/audio` notifications, as they come from the\nmicrophone, and says `voice/speechStarted` when someone starts speaking and `voice/heard` with\nwhat they said once they pause (800 ms unless the listen says otherwise). One listen at a time.\n[`docs/protocol.md`](https://github.com/cjus/audio-chat-box/blob/main/docs/protocol.md) has every message.\n\n`cargo run --release --example say`, `hear`, `listen` and `bakeoff` read text aloud to a WAV\nfile, hear WAV files, listen to WAV files as a stream, and compare transcription models on\nrecordings of your own, for measuring.\n\nThe models are downloaded once, the first time each is needed, and each archive is checked\nagainst the size and SHA-256 built into the program (`src/models.rs`) before it is unpacked.\nBy default they come from this repository's\n[`models-v1` release](https://github.com/cjus/audio-chat-box/releases/tag/models-v1): copies\nof sherpa-onnx's archives, unchanged, and Silero VAD packed the same way, with a\n`NOTICE.txt` of their licences. A product may host the same files itself and pass\n`--models-url`; a file that differs from the one built in is refused. [CREDITS.md](https://github.com/cjus/audio-chat-box/blob/main/CREDITS.md)\nsays where each came from.\n\naudio-chat-box began as `solrac-voice`, the voice of [Solrac](https://solrac-chess.com), an\nAI-based Chess Coach. Solrac's chat reads its replies aloud and hears its player, by Talk or\nhands-free, and this program grew out of that work: its models were chosen in Solrac's\nbake-off of speech recognisers, its listening was tuned on a player's moves said at\nspeed-chess pace, and its protocol is the voice domain of the\n[Chess Node Protocol](https://github.com/cjus/chess-node-protocol), which Solrac speaks to all\nits modules. The comments still cite Solrac's issues (`cjus/chessgui#…`), as the history of\nwhy each choice was made. It was renamed in October 2026, once what was chess in it, the words\nit favoured, had moved to the client, so that any product can use it.\n\nOur own code is licensed under either of [MIT](https://github.com/cjus/audio-chat-box/blob/main/LICENSE-MIT) or [Apache-2.0](https://github.com/cjus/audio-chat-box/blob/main/LICENSE-APACHE), at\nyour option. Unless you explicitly state otherwise, any contribution intentionally submitted for\ninclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as\nabove, without any additional terms or conditions.\n\nThe `audio-chat-box` program as built links sherpa-onnx's prebuilt library, which includes\n[eSpeak NG](https://github.com/espeak-ng/espeak-ng) (GPL-3.0-or-later): Kokoro uses it to sound\nout words its lexicon doesn't have. So the program as a whole is\n[GPL-3.0-or-later](https://github.com/cjus/audio-chat-box/blob/main/LICENSE-GPL-3.0), and its source is this repository with the source of the\nlibraries in sherpa-onnx's prebuilt library: this repository's\n[`sources-v1` release](https://github.com/cjus/audio-chat-box/releases/tag/sources-v1), which\n[`tools/sources.sh`](https://github.com/cjus/audio-chat-box/blob/main/tools/sources.sh) gathers. The models have licences of their own: Kokoro\nApache-2.0, Parakeet CC-BY-4.0 (by NVIDIA), Silero VAD MIT.\n\nEvery copy of the program goes with the notices of what it is built with:\n`tools/notices.sh` writes them to `target/licences/THIRD-PARTY-NOTICES.txt`. They are the\ncrates' licences (with cargo-about 0.9: `cargo install --locked cargo-about@0.9.2 --features cli`), then those of the C and C++ libraries in sherpa-onnx's prebuilt library, which the\narchive doesn't carry, so they are kept in [`licences/`](https://github.com/cjus/audio-chat-box/blob/main/licences/README.md) with where each\ncame from.\n\nCopyright (c) 2026 Carlos Justiniano.", "url": "https://wpnews.pro/news/show-hn-audio-chat-box-offline-speech-in-and-out-for-any-program-over-stdio", "canonical_source": "https://github.com/cjus/audio-chat-box", "published_at": "2026-10-29 11:19:30+00:00", "updated_at": "2026-10-29 11:47:58.055305+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "developer-tools", "natural-language-processing", "ai-products"], "entities": ["audio-chat-box", "Kokoro", "Parakeet TDT 0.6B v2", "Silero VAD", "sherpa-onnx", "Nvidia", "Docker Hub", "pnxstudios"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-audio-chat-box-offline-speech-in-and-out-for-any-program-over-stdio", "markdown": "https://wpnews.pro/news/show-hn-audio-chat-box-offline-speech-in-and-out-for-any-program-over-stdio.md", "text": "https://wpnews.pro/news/show-hn-audio-chat-box-offline-speech-in-and-out-for-any-program-over-stdio.txt", "jsonld": "https://wpnews.pro/news/show-hn-audio-chat-box-offline-speech-in-and-out-for-any-program-over-stdio.jsonld"}}