For the complete documentation index, see llms.txt. This page is also available as Markdown.

Audio API

TensorX provides OpenAI-compatible audio endpoints for both Text-to-Speech (TTS) and Speech-to-Text (STT) transcription.

Available Models

Model
Type
Description

chatterbox-turbo

TTS

High-quality text-to-speech generation

Systran/faster-whisper-large-v3

STT

Fast, accurate speech transcription

Text-to-Speech (TTS)

Convert text into natural-sounding audio using the chatterbox-turbo model.

Endpoint

POST https://api.tensorx.ai/v1/audio/speech

Basic Usage

curl https://api.tensorx.ai/v1/audio/speech \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chatterbox-turbo",
    "input": "Hello! Welcome to TensorX.",
    "voice": "Emily.wav"
  }' \
  --output speech.mp3

Parameters

Parameter
Type
Required
Description

model

string

Yes

Model ID: chatterbox-turbo

input

string

Yes

Text to convert to speech. For very long inputs, split into smaller chunks and concatenate the resulting audio.

voice

string

Yes

Voice ID, using the filename of one of the predefined voices below (e.g. Emily.wav). OpenAI-style names like alloy or nova are not supported.

response_format

string

No

Audio format: mp3, wav, opus (default: mp3)

speed

number

No

Playback speed multiplier (default: 1.0). Values around 0.5 to 2.0 give the most natural results.

Available Voices

chatterbox-turbo ships with 28 predefined English voices. Pass the filename (including the .wav suffix) as the voice parameter:

Abigail.wav

Adrian.wav

Alexander.wav

Alice.wav

Austin.wav

Axel.wav

Connor.wav

Cora.wav

Elena.wav

Eli.wav

Emily.wav

Everett.wav

Gabriel.wav

Gianna.wav

Henry.wav

Ian.wav

Jade.wav

Jeremiah.wav

Jordan.wav

Julian.wav

Layla.wav

Leonardo.wav

Michael.wav

Miles.wav

Olivia.wav

Ryan.wav

Taylor.wav

Thomas.wav

The TTS engine is a hosted instance of the open-source Chatterbox-TTS-Server project, which is in turn built on Resemble AI's Chatterbox model. See the upstream documentation for details on the voices, voice characteristics, and how voice cloning works.

Python Example

JavaScript/Node.js Example

Pricing

TTS Cost: $0.000005 per character

Text Length
Cost

100 characters

$0.0005

1,000 characters

$0.005

10,000 characters

$0.05


Speech-to-Text (STT)

Transcribe audio files to text using the Systran/faster-whisper-large-v3 model.

Endpoint

Basic Usage

Parameters

Parameter
Type
Required
Description

file

file

Yes

Audio file to transcribe (mp3, mp4, mpeg, mpga, m4a, wav, webm)

model

string

Yes

Model ID: Systran/faster-whisper-large-v3

language

string

No

Language code (e.g., en, es, fr). Auto-detected if not specified

response_format

string

No

Output format: json, text, srt, vtt, verbose_json (default: json)

timestamp_granularities

array

No

["word"] or ["segment"] for timestamps

Response

Python Example

JavaScript/Node.js Example

Get Timestamps

Request word or segment-level timestamps:

Pricing

STT Cost: $0.0000667 per second of audio

Audio Duration
Cost

1 minute

$0.004

10 minutes

$0.04

1 hour

$0.24


Supported Audio Formats

Both TTS and STT support the following audio formats:

Format
Extension
Notes

MP3

.mp3

Most common, good compression

WAV

.wav

Uncompressed, highest quality

M4A

.m4a

Apple audio format

WEBM

.webm

Web-optimized

MPEG

.mpeg, .mpga

Legacy format

MP4

.mp4

Video format (audio extracted)

OGG

.ogg

Open source format

File Size Limits

  • Maximum file size: 25 MB

  • For larger files, split them into smaller segments


Use Cases

Voice Assistants

Podcast Transcription

Content Narration


Error Handling

Common Errors

Error Code
Description
Solution

400

Invalid audio format

Use supported format (mp3, wav, etc.)

400

File too large

Split into chunks under 25MB

401

Invalid API key

Check your API key

413

Payload too large

Reduce file size

429

Rate limit exceeded

Reduce request frequency

Python Error Handling


Resources

Last updated

Was this helpful?