Audio
The audio endpoints offer three operations: text-to-speech (TTS), speech-to-text (STT) and speech-to-English translation.
Text-to-speech (TTS)
POST/v1/audio/speech
Converts text into a spoken audio file.
Request parameters (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
model | string | ✓ | TTS model (e.g. blab-tts) |
input | string | ✓ | Text to speak |
voice | string | ✓ | Voice name |
response_format | string | mp3 (default), opus, aac, flac | |
speed | number | Speed between 0.25–4.0 | |
stream_format | string | For streamed output |
Example
bash
curl https://app.qevron.ai/v1/audio/speech \
-H "Authorization: Bearer $QEVRON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "blab-tts",
"input": "Hello, this audio was generated with Qevron.",
"voice": "naz"
}' --output output.mp3python
resp = client.audio.speech.create(
model="blab-tts",
input="Hello, this audio was generated with Qevron.",
voice="naz",
)
resp.stream_to_file("output.mp3")The response is binary audio data (e.g. Content-Type: audio/mpeg). When streaming, audio chunks arrive as SSE speech.audio.delta events.
Speech-to-text (STT)
POST/v1/audio/transcriptions
Transcribes an audio file into text. Uses multipart/form-data.
Form fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | ✓ | STT model (e.g. solab-stt) |
file | file | ✓ | Audio file (wav, mp3, m4a, ...) |
language | string | Language code (e.g. tr, en) | |
response_format | string | json (default), verbose_json, text |
Example
bash
curl https://app.qevron.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $QEVRON_API_KEY" \
-F "model=solab-stt" \
-F "file=@recording.wav" \
-F "language=en"python
with open("recording.wav", "rb") as f:
resp = client.audio.transcriptions.create(
model="solab-stt",
file=f,
language="en",
)
print(resp.text)Response
json
{ "text": "Hello, this is a test recording." }With verbose_json you additionally get language, duration and segments.
Speech-to-English translation
POST/v1/audio/translations
Uses the same form fields as transcriptions, but the output text is translated into English. The language field is not needed.