edge-tts in Practice: Free Speech Synthesis, Zero API Key — Give Your AI Agent a Voice
edge-tts in Practice: Free Speech Synthesis, Zero API Key Give your AI Agent a voice Why Choose edge-tts? The main TTS options available today: OpenAI TTS: G…
- Added to the lab
- Downloads
- 0
- Human review
- Human reviewed
edge-tts in Practice: Free Speech Synthesis, Zero API Key
Give your AI Agent a voice
Why Choose edge-tts?
The main TTS options available today:
- OpenAI TTS: Great quality, but $15/million characters — painful in production
- Google TTS: Similar pricing, requires credit card binding
- edge-tts: Microsoft Neural TTS engine, completely free, zero API key
edge-tts works by calling the TTS service built into the Edge browser. Microsoft hasn't officially exposed this interface, but the community has maintained it for years — reliability is acceptable.
Overview
| Item | Details |
|---|---|
| Engine | Microsoft Neural TTS |
| Languages | 74 |
| Voices | 300+ |
| Cost | Free |
| API Key | Not required |
| Output Formats | MP3 / WAV / OGG |
Installation
clawhub install edge-tts
Test immediately after installation:
openclaw tts "Hello, world"
Recommended Chinese Voices
| Voice ID | Style | Best For |
|---|---|---|
| zh-CN-XiaoxiaoNeural | Gentle female | Customer service, notifications, reading aloud |
| zh-CN-YunxiNeural | Energetic male | Tutorials, podcasts |
| zh-CN-YunjianNeural | Calm male | Formal occasions, reports |
| zh-TW-HsiaoChenNeural | Taiwanese female | Taiwan users |
Speed and Pitch Control
# Speed up by 20%
openclaw tts --rate=+20% "Test text here"
# Lower pitch
openclaw tts --pitch=-10Hz "Test text here"
# Specify voice
openclaw tts --voice=zh-CN-YunxiNeural "Hello"
Common Pitfalls
Pitfall 1: Network restrictions — edge-tts needs access to Microsoft's servers, which can be unstable on certain networks. Configure a proxy or use a fallback voice ID.
Pitfall 2: Long text truncation — Requests over 3000 characters may be cut off. Split long text into segments of no more than 2000 characters each.
Pitfall 3: Voice ID changes — Microsoft occasionally updates its voice library, making old IDs invalid. If you get an error, run openclaw tts --list-voices to see the current list.
Real-World Applications
- Daily briefing broadcast: Convert trending topics from the daily-trending skill into audio for morning listening
- Email read-aloud: Pair with email-daily-summary — no more staring at a screen
- Task completion alerts: Voice notification when an Agent finishes a task
SFD Lab | Top free TTS pick