Prompt
Need TTS API with WAV output
Latest observation
Oct 11, 2026
OpenAI APIWeb search: off
Here are a few good TTS API options that can return WAV output directly:
1) Azure Speech Text-to-Speech
- Formats: supports WAV, PCM, MP3, etc.
- Pros: high-quality voices, SSML support, reliable API
- Docs: https://learn.microsoft.com/azure/ai-services/speech-service/text-to-speech
Example request concept:
POST https://{region}.tts.speech.microsoft.com/cognitiveservices/v1
X-Microsoft-OutputFormat: riff-24khz-16bit-mono-pcm
Content-Type: application/ssml+xml
Ocp-Apim-Subscription-Key: YOUR_KEY
2) Amazon Polly
- Formats: can return PCM, MP3, OGG; WAV is typically created by wrapping PCM yourself, depending on use case
- Pros: easy AWS integration, many voices
- Docs: https://docs.aws.amazon.com/polly/
3) Google Cloud Text-to-Speech
- Formats: LINEAR16 (WAV-compatible PCM), MP3, OGG
- Pros: strong voice quality, broad language support
- Docs: https://cloud.google.com/text-to-speech
4) ElevenLabs
- Formats: supports audio output; WAV may be available depending on endpoint/format options
- Pros: very natural voices
- Docs: https://elevenlabs.io/docs
5) OpenAI TTS
- Formats: typically MP3, Opus, AAC, FLAC, etc. WAV support may depend on current API features
- Pros: simple API, good quality
- Docs: https://platform.openai.com/docs/guides/text-to-speech
Recommended if you need native WAV
- Azure Speech is usually the easiest choice if you want a direct WAV-style response.
- If PCM is acceptable, Google Cloud TTS is also a strong option, and you can save/convert to WAV.
Example Python: Azure WAV output
import requests
url = "https://eastus.tts.speech.microsoft.com/cognitiveservices/v1"
headers = {
"Ocp-Apim-Subscription-Key": "YOUR_KEY",
"Content-Type": "application/ssml+xml",
"X-Microsoft-OutputFormat": "riff-24khz-16bit-mono-pcm"
}
ssml = """<speak version="1.0" xml:lang="en-US">
<voice xml:lang="en-US" name="en-US-JennyNeural">Hello world</voice>
</speak>"""
r = requests.post(url, headers=headers, data=ssml)
open("output.wav", "wb").write(r.content)
If you want, I can give you:
- a comparison table of the best WAV-capable TTS APIs, or
- a ready-to-use code sample in Python/Node.js/cURL for one provider.