Chatterbox Turbo TTS Serverless API
Chatterbox-Turbo delivers ultra-fast, high-quality speech synthesis with human-like expressiveness for real-time applications.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/chatterbox-turbo-tts"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "text": "Introducing the AI-enhanced Skyline T-800. [laugh] It's got integrated AI for superior performance. Want to explore pricing?",
12 "reference_audio": "https://segmind-resources.s3.amazonaws.com/output/70e9a9dd-e0f4-450f-a590-872996b44a01-chatterbox-turbo-input.mp3",
13 "temperature": 0.7,
14 "seed": 42,
15 "min_p": 0,
16 "top_p": 0.9,
17 "top_k": 500,
18 "repetition_penalty": 1.3,
19 "norm_loudness": true
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/chatterbox-turbo-tts"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "text": "Introducing the AI-enhanced Skyline T-800. [laugh] It's got integrated AI for superior performance. Want to explore pricing?",
12 "reference_audio": "https://segmind-resources.s3.amazonaws.com/output/70e9a9dd-e0f4-450f-a590-872996b44a01-chatterbox-turbo-input.mp3",
13 "temperature": 0.7,
14 "seed": 42,
15 "min_p": 0,
16 "top_p": 0.9,
17 "top_k": 500,
18 "repetition_penalty": 1.3,
19 "norm_loudness": true
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25 result = response.json()
26 print(json.dumps(result, indent=2))
27else:
28 print(f"Error: {response.status_code}")
29 print(response.text)API Endpoint
https://api.segmind.com/v1/chatterbox-turbo-ttsParameters
reference_audiorequiredstring (uri)Provide a reference audio URL for voice matching. Use a public link for seamless access.
textrequiredstringEnter text to synthesize into speech. Use sound tags like [chuckle] for expression.
min_poptionalnumberSet minimum token probability. Higher values filter out unlikely outputs.
0Range: 0 - 1norm_loudnessoptionalbooleanNormalize audio to standard loudness. Recommended for consistent volume across outputs.
truerepetition_penaltyoptionalnumberPenalty for repeated words. Higher values reduce redundancy in speech.
1.3Range: 1 - 2seedoptionalintegerSet random seed for reproducible results. Zero for random, specific value for consistency.
42temperatureoptionalnumberAdjust creativity and expressiveness in speech. Use lower for consistency, higher for diversity.
0.7Range: 0.05 - 2top_koptionalintegerLimit to top K likely tokens. Lower for concise, higher for diverse expressions.
500Range: 0 - 1000top_poptionalnumberControl randomness via cumulative probability tokens. Lower for predictable, higher for varied outputs.
0.9Range: 0 - 1Response Type
Returns: Audio
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out