Authorization notice. Speech CPP is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Remote script. The install step runs a script fetched from the internet, so review it before running.
Who it is forA content creator, teacher or developer who needs narration for a video, lesson or prototype and wants to avoid a paid voice service.
The problemRecording narration takes time, and cloud text-to-speech may be costly or send private scripts off the machine.
The outcomeA WAVE file with the spoken text, produced locally from a named voice.
What you need first
- macOS on Apple silicon, Linux on x86-64, or Windows x64
- Internet access to fetch the installer and models from Hugging Face the first time
- Free disk space for the model files, for example 1.21 GB for qwen3-tts-0.6b
- A terminal (PowerShell on Windows)
- A microphone, for live transcription
Steps
- Install speech using the installer for your platform.
- Run
speech tts qwen3-tts-0.6b --voice ryan -o hello.wav "Hello. It will be sunny in Tokyo tomorrow."to make the first file. The model is fetched the first time. - Replace the quoted text with your own sentence, or pipe a file to stdout with
speech tts qwen3-tts-0.6b --voice ryan -o -(inferred from the README's note that output can go to stdout). (inferred, check the README) - Play hello.wav and check the pronunciation.
Prompt for your agent
Using the nyosegawa/speech.cpp repo, install speech and run `speech tts qwen3-tts-0.6b --voice ryan -o <output>.wav "<script text>"`. Expected output: a WAVE file at the path given, with the script spoken in the ryan voice. Verify that the file plays and matches the script.
Caveat. The first run downloads a 1.21 GB model, so plan for that time and disk space before generating audio.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for nyosegawa/speech.cpp and "Generate spoken narration audio from a text file"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer