Skip to content
Inferlane

Guides, 13 of 17

Guide: speech and audio

Text to speech, transcription, music and sound effects.

Four kinds of audio model

text-to-speech3 models
Turn text into natural sounding speech.
speech-to-text2 models
Transcribe spoken audio into text with timestamps.
music3 models
Compose music and sound from a prompt.
sound-effects2 models
Generate sound effects from a prompt or for a silent clip.

Text to speech models

Every model below takes the same three calls. Prices come from the catalog and are billed per 1k characters or per the unit shown.

elevenlabs/eleven-v3$0.10 / 1k characters
Eleven v3. Expressive multilingual speech with inline audio tags for emotion and delivery.
hexgrad/kokoro-82m$0.02 / 1k characters
Kokoro 82M. Small open weights speech model, Apache 2.0, fast and inexpensive for long text. Open weights.
minimax/speech-02-hd$0.10 / 1k characters
MiniMax Speech-02 HD. High fidelity multilingual speech with emotion control and many preset voices.

Inputs of Eleven v3

This walkthrough uses elevenlabs/eleven-v3. Its inputs, read from the same schema that GET /models/elevenlabs/eleven-v3 returns:

textstring, required
Text to speak.
voiceenum
Voice preset. One of Aria, Roger, Sarah, Charlie. Default "Aria".
stabilitynumber
Lower is more expressive. From 0 to 1. Default 0.5.
language_codestring
ISO 639-1 language code. Default "en".

Submit the request

curl -X POST "https://inferlane.net/api/v1/queue/elevenlabs/eleven-v3" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Your render is ready. Open the link to review it.","voice":"Aria"}'

The answer is 202 with a request_id. Keep it: export REQUEST_ID="...".

Poll until it completes

Poll the status about once a second. A Eleven v3 request completes in about 2.4 seconds.

curl "https://inferlane.net/api/v1/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $API_KEY"

Read the result

curl "https://inferlane.net/api/v1/requests/$REQUEST_ID" \
  -H "Authorization: Key $API_KEY"
200 OK
{
  "request_id": "ZWxldmVubGFicy9lbGV2ZW4tdjN8bXVxemQwdnN8MC4wNDl8N2U0NDQ2ZTV8YjcyMmIy",
  "model_id": "elevenlabs/eleven-v3",
  "status": "COMPLETED",
  "sample": true,
  "output": {
    "audio": {
      "url": "https://inferlane.net/api/v1/files/speech-sample.wav",
      "content_type": "audio/wav",
      "duration": 3
    }
  },
  "billing": {
    "unit": "1k characters",
    "quantity": 0.049,
    "unit_price": 0.1,
    "amount": 0.0049,
    "currency": "USD",
    "sample": true
  },
  "timings": {
    "queue_ms": 600,
    "inference_ms": 1800
  },
  "submitted_at": "2026-10-02T13:09:55.000Z",
  "completed_at": "2026-10-02T13:09:57.400Z"
}

Eleven v3 is priced at $0.10 / 1k characters. Each 1,000 characters of input text, prorated. This request bills a quantity of 0.049, so billing.amount is 0.0049 USD.

The whole flow in one script

# 1. Submit the request and keep its request_id
REQUEST_ID=$(curl -s -X POST "https://inferlane.net/api/v1/queue/elevenlabs/eleven-v3" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Your render is ready. Open the link to review it.",
  "voice": "Aria"
}' \
  | sed -n 's/.*"request_id": *"\([^"]*\)".*/\1/p')

# 2. Poll the status about once a second until it is COMPLETED
until curl -s "https://inferlane.net/api/v1/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $API_KEY" | grep -q '"status": "COMPLETED"'; do
  sleep 1
done

# 3. Fetch the result
curl "https://inferlane.net/api/v1/requests/$REQUEST_ID" \
  -H "Authorization: Key $API_KEY"

Transcribe speech

Speech to text takes an audio_url and returns the full text plus timed chunks. With openai/whisper-large-v3:

curl -X POST "https://inferlane.net/api/v1/queue/openai/whisper-large-v3" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"audio_url":"https://example.com/meeting.mp3","task":"transcribe"}'
output
{
  "text": "Thanks for joining. Today we will review the new product shots and pick the final three.",
  "chunks": [
    {
      "start": 0,
      "end": 1.6,
      "text": "Thanks for joining."
    },
    {
      "start": 1.6,
      "end": 6.2,
      "text": "Today we will review the new product shots and pick the final three."
    }
  ],
  "language": "en"
}

Whisper large v3 is priced at $0.006 / minute. Each minute of output music, or of input audio for transcription. This request bills a quantity of 1, so billing.amount is 0.006 USD.

Generate music

Describe genre, mood, instruments and tempo. stability/stable-audio-2-5 returns an audio object.

curl -X POST "https://inferlane.net/api/v1/queue/stability/stable-audio-2-5" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Warm lo-fi beat, soft keys, brushed drums, 80 bpm","seconds_total":30}'

Stable Audio 2.5 is priced at $0.20 / minute. Each minute of output music, or of input audio for transcription. This request bills a quantity of 0.5, so billing.amount is 0.1 USD.

Generate sound effects

curl -X POST "https://inferlane.net/api/v1/queue/elevenlabs/sound-effects-v2" \
  -H "Authorization: Key $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Soft rain on a window with distant thunder","duration":5}'

Sound Effects v2 is priced at $0.002 / second. Each second of output video or audio, or of the input clip for lipsync and upscale. This request bills a quantity of 5, so billing.amount is 0.01 USD.

Preview audio is a synthesized sample served from /api/v1/files, so every audio result plays.