MAI Voice 2

Azure Speech text-to-speech for narration and voice output with selectable voices.

Audio

MAI Voice technical docs

Endpoint, auth header, parameters, prices, and tested request examples for MAI Voice 2.

Endpoint

Endpoint and pricing

POST /audio/speech Endpoint https://api.imole.app/v1 Base URL 20 API cauris 20 Agent cauris
Headers

Request headers

Authorization required

Bearer Imole API key.

Content-Type required

Use application/json for JSON requests.

Parameters

Request parameters

model required

Use mai-voice-2.

input required

Text to synthesize.

voice

Explicit MAI voice name.

language_code

Locale hint such as fr-FR or en-US.

style

Expressive style.

happy, excited, sad, shouting, softvoice, whispering, angry, hopeful, joyful
style_degree

Expressive style intensity.

output_format

Azure Speech output format.

audio-24khz-160kbitrate-mono-mp3, riff-24khz-16bit-mono-pcm
Examples

Tested request examples

Locale-based voice
curl -X POST "https://api.imole.app/v1/audio/speech" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "mai-voice-2",
  "input": "Bonjour. Bienvenue sur Imole.",
  "language_code": "fr-FR",
  "output_format": "audio-24khz-160kbitrate-mono-mp3"
}' \
  --output mai-voice-2.mp3
Styled voice
curl -X POST "https://api.imole.app/v1/audio/speech" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "mai-voice-2",
  "input": "Imole est pret pour votre prochain projet.",
  "language_code": "fr-FR",
  "style": "happy",
  "style_degree": "1.2",
  "output_format": "audio-24khz-160kbitrate-mono-mp3"
}' \
  --output mai-voice-2-happy.mp3
Explicit voice id
curl -X POST "https://api.imole.app/v1/audio/speech" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "mai-voice-2",
  "input": "Ceci utilise une voix MAI explicite.",
  "voice": "fr-FR-Soleil:MAI-Voice-2",
  "language_code": "fr-FR",
  "output_format": "audio-24khz-160kbitrate-mono-mp3"
}' \
  --output mai-voice-2-explicit.mp3