{"model":"FunAudioLLM/CosyVoice2-0.5B","input":"Today is a good day","voice":"FunAudioLLM/CosyVoice2-0.5B:diana","response_format":"mp3","sample_rate":32000,"stream":true,"speed":1,"gain":0}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/siliconflow/v1/audio/speech' \
--header'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "FunAudioLLM/CosyVoice2-0.5B",
"input": "Today is a good day",
"voice": "FunAudioLLM/CosyVoice2-0.5B:diana",
"response_format": "mp3",
"sample_rate": 32000,
"stream": true,
"speed": 1,
"gain": 0
}'