Text to speech
Turn text into natural speech with OpenAI and Gemini voices, saved as mp3, wav or ogg.
Voice Lab covers text to speech, speech to text, voice cloning, translation and dubbing, and audio tools. Keys need media.write (media.read for history and catalogues).
Generate speech#
POST /text-to-speech/ returns the audio file.
curl -X POST https://api.voicemint.io/api/v1/text-to-speech/ \
-H "Authorization: Bearer $VOICEMINT_API_KEY" -H "Content-Type: application/json" \
-d '{"text": "Thanks for calling VoiceMint!", "voice": "alloy", "format": "mp3", "speed": 1.0}' \
--output greeting.mp3| Field | Meaning |
|---|---|
text | what to say |
provider | openai (default) or gemini |
voice | a voice of that provider, for example alloy (OpenAI) or Kore (Gemini) |
format | mp3, wav or ogg |
speed | 0.25 to 4.0 |
save_to_history | also store it in your history and return its URL |
Speech in your own or a cloned voice: see Voices & cloning. Billing is per generation by text length.
More in Voice Lab#
Speech to text · Voices & cloning · Translation & dubbing · Audio tools