French text-to-speech
French: 1 Kokoro voices on the OpenAI /v1/audio/speech endpoint. $5.20 per million characters, mp3 or wav, no daily cap.
Voices
Kokoro voice ids encode language and gender in the prefix (ff_). Click to copy.
Quickstart
curl https://api.inferenceapis.com/v1/audio/speech \
-H "Authorization: Bearer $INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "hexgrad/Kokoro-82M", "voice": "ff_siwis", "input": "Bonjour, ceci est un exemple de voix.", "response_format": "mp3"}' \
--output french.mp3import os
from openai import OpenAI
client = OpenAI(base_url="https://api.inferenceapis.com/v1", api_key=os.environ["INFERENCE_API_KEY"])
audio = client.audio.speech.create(model="hexgrad/Kokoro-82M", voice="ff_siwis", input="Bonjour, ceci est un exemple de voix.")
audio.write_to_file("french.mp3")Notes
- Pass
language: "fr"to make pronunciation of ambiguous tokens follow French rules when mixing scripts. - Numbers, dates and abbreviations are read as written; spell out anything that must be pronounced a specific way.
- Billing is per input character; the
X-Usage-Charactersheader shows the metered count.
Cost and speed for French
Kokoro is billed at $5.20 per million characters, so a 1,000-word French article of roughly 6,000 characters costs about $0.03 and an hour-long audiobook chapter of 60,000 characters about $0.31. In our measurement a 300-character request returned in 0.84 s, fast enough to generate sentence by sentence in an interactive app. Orpheus is English-only, so French output always uses Kokoro. Requests up to 4,096 characters are accepted; split longer text on sentence boundaries and concatenate the audio.
Other languages with voices: English, Japanese, Chinese, Spanish, Hindi, Italian, Portuguese.
Speech-to-text in French
The reverse direction: transcribe French audio with Whisper on the French speech-to-text page.
