语音系列
创建文本转语音请求
从输入文本生成音频。根据输入的文本生成音频。接口生成的数据为音频的二进制数据,需要使用者自行处理。参考:https://docs.siliconflow.cn/capabilities/text-to-speech#5
POST
/
audio
/
speech
Authorizations
Use the following format for authentication: Bearer <your api key>
Body
application/json
对应的模型名称。为更好的提升服务质量,我们将不定期对本服务提供的模型做相关变更,包括但不限于模型上下线,价格调整,模型服务能力调整等,我们会在可行的情况下以公告、消息推送等适当的方式进行通知。
Available options:
fishaudio/fish-speech-1.5
The text to generate audio for.
Required string length:
1 - 128000
Available options:
fishaudio/fish-speech-1.5:alex
, fishaudio/fish-speech-1.5:anna
, fishaudio/fish-speech-1.5:bella
, fishaudio/fish-speech-1.5:benjamin
, fishaudio/fish-speech-1.5:charles
, fishaudio/fish-speech-1.5:claire
, fishaudio/fish-speech-1.5:david
, fishaudio/fish-speech-1.5:diana
The format to audio out. Supported formats are mp3
, opus
, wav
, pcm
Available options:
mp3
, opus
, wav
, pcm
控制输出采样率,对于不同的视频输出类型,默认值和可取值范围不同,具体如下:1. opus: 目前支持48000 Hz 2. wav, pcm: 支持8000, 16000, 24000, 32000, 44100 Hz, 默认44100 Hz 3. mp3: 支持32000, 44100 Hz, 默认44100 Hz
Available options:
8000
, 16000
, 24000
, 32000
, 44100
, 48000
streaming or not
The speed of the generated audio. Select a value from 0.25
to 4.0
. 1.0
is the default.
Required range:
0.25 < x < 4
Required range:
-10 < x < 10
Response
200 - application/audio
The response is of type file
.