OpenAI Text-to-Speech
Generate natural-sounding speech from text using OpenAI's text-to-speech models.
Supported Models
tts-1
: Standard quality, faster generationtts-1-hd
: High quality, slower generation
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
text | string | Yes | Text to convert to speech (max 4096 characters) |
voice | string | Yes | Voice to use for speech generation |
response_format | string | No | Audio format (default: mp3) |
speed | number | No | Speech speed (0.25 to 4.0, default: 1.0) |
Voice Options
alloy
- Neutral, balanced voiceecho
- Clear, expressive voicefable
- Warm, engaging voiceonyx
- Deep, authoritative voicenova
- Bright, energetic voiceshimmer
- Gentle, soothing voice
Response Format Options
mp3
- MP3 audio format (default)opus
- Opus audio formataac
- AAC audio formatflac
- FLAC audio formatwav
- WAV audio formatpcm
- PCM audio format
Request Example
API Playground
https://api.1min.ai/api/features
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "TEXT_TO_SPEECH",
"model": "tts-1",
"conversationId": "TEXT_TO_SPEECH",
"promptObject": {
"text": "Hello, this is a sample text to speech conversion using OpenAI.",
"voice": "alloy",
"response_format": "mp3",
"speed": 1
}
}'
Response Format
The API returns an audio file in the specified format. The response will be a binary audio stream.
{}