Li Hongmin
|
0134020564
|
feat: add Azure Speech TTS provider
Add support for Azure Speech Service text-to-speech with high-quality neural voices.
Features:
- Azure TTS provider with 400+ neural voices
- Support for 100+ languages and regional accents
- High-quality Chinese voices (zh-CN-XiaoxiaoNeural, YunxiNeural, etc.)
- Environment variable support: AZURE_SPEECH_API_KEY, AZURE_SPEECH_REGION
- Configuration via moltbot.json messages.tts.azure section
- SSML-based voice synthesis with proper XML escaping
Technical details:
- Endpoint: https://{region}.tts.speech.microsoft.com/cognitiveservices/v1
- Headers: Ocp-Apim-Subscription-Key, X-Microsoft-OutputFormat
- Request body: SSML XML format
- Response: audio/mpeg binary stream
- Default: audio-24khz-48kbitrate-mono-mp3
Benefits over Edge TTS:
- Higher quality neural voices with better prosody
- More voice options (400+ vs limited Edge TTS set)
- Unified Azure billing with GPT models
- Custom voice support (preview)
- Fine-grained SSML control
Performance:
- Latency: ~500-900ms for typical sentences
- Works seamlessly with Telegram voice messages
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
|
2026-01-28 17:44:26 +09:00 |
|