Skip to main content
tts.create() (and POST /v1/tts) return raw WAV bytes — 24 kHz, 16-bit PCM, mono. Here’s how to use them in each environment.

Node — save to a file

audio is an ArrayBuffer; Buffer.from(audio) wraps it without copying the underlying bytes.

Node — play it

Browser — play from bytes

Fetch the audio from your own server endpoint (never call Geko directly from the browser — see Use it in your app), then:

curl — straight to disk

Need MP3 / Opus?

The API returns WAV today (MP3/Opus are on the roadmap). Convert locally with ffmpeg in the meantime:

Telephony (8 kHz µ-law)

For Twilio / SIP you’ll want 8 kHz µ-law. Until it’s a native output option, transcode:

Next steps

Streaming

Play WAV chunks as they arrive instead of waiting.

Use it in your app

Proxy synthesis through your own server for the browser.

Voice agents

Feed audio into a real-time voice loop.

Limits & constraints

Output formats and how to get MP3 / µ-law.