curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"voice": "alloy",
"instructions": "<string>",
"response_format": "mp3",
"speed": 1,
"stream_format": "sse"
}
'"<string>"curl --request POST \
--url https://api.dedaluslabs.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"voice": "alloy",
"instructions": "<string>",
"response_format": "mp3",
"speed": 1,
"stream_format": "sse"
}
'"<string>"curl -X POST https://api.dedaluslabs.ai/v1/audio/speech \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/tts-1",
"input": "Hello, this is a test of text to speech.",
"voice": "alloy"
}' \
--output speech.mp3
Bearer टोकन के माध्यम से API कुंजी का प्रमाणीकरण
टेक्स्ट से ऑडियो जनरेट करने के लिए किया गया request।
वह टेक्स्ट जिसके लिए ऑडियो उत्पन्न करना है। अधिकतम लंबाई 4096 कैरेक्टर है।
"Hello, how are you today?"
ऑडियो जेनरेट करते समय उपयोग की जाने वाली voice का नाम। समर्थित voices हैं alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, और verse। इन voices का प्रीव्यू आप Text to speech guide में देख सकते हैं।
alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, verse "alloy"
"nova"
अतिरिक्त निर्देशों के ज़रिए अपने जेनरेट किए गए ऑडियो की आवाज़ को नियंत्रित करें। tts-1 या tts-1-hd के साथ संगत नहीं है।
ऑडियो के लिए आउटपुट फ़ॉर्मेट। समर्थित फ़ॉर्मेट हैं mp3, opus, aac, flac, wav और pcm।
mp3, opus, aac, flac, wav, pcm "mp3"
जेनरेट किए गए ऑडियो की गति। 0.25 से 4.0 के बीच कोई मान चुनें। 1.0 डिफ़ॉल्ट है।
0.25 <= x <= 41
ऑडियो को स्ट्रीम करने के लिए उपयोग किया जाने वाला फ़ॉर्मेट। समर्थित फ़ॉर्मेट sse और audio हैं। tts-1 या tts-1-hd के लिए sse समर्थित नहीं है।
sse, audio "sse"
ऑडियो फ़ाइल स्ट्रीम
The response is of type file.
Was this page helpful?