- 前言(必读)
- OpenAI官方SDK使用教程
- 批量请求示例
- 聊天模型(Chat)
- 内容审查
- 向量嵌入
- 图片处理
- 绘画模型(Painting)
- 视频模型(Video)
- 音频模型(Audio)
- 音乐创作(suno)
- 文档处理
- 3D模型
- 网络爬虫
- 更多接口开发中...
- 查询令牌用量GET
- 查询令牌限额GET
- 查询账户信息GET
模型 fish-speech-1.5
将废弃
POST
/v1/audio/speech
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
model
string
模型名称
fish-speech-1.5
input
string
待生成文字
voice
string
音色选择
alloy
、echo
、fable
、onyx
、nova
、shimmer
temperature
number
采样温度
top_p
number
随机性
repetition_penalty
number
重复属性
max_new_tokens
number
合成长度
chunk_length
number
分块长度
seed
string
随机种子
reference_audio_url
string
语音特征
reference_text
string
参考内容
示例
{
"model": "fish-speech-1.5",
"top_p": 0.75,
"repetition_penalty": 1.08,
"temperature": 0.66,
"max_new_tokens": 2048,
"chunk_length": 200,
"input": "The answer to the universe is 42"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gpt.ge/v1/audio/speech' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "fish-speech-1.5",
"top_p": 0.75,
"repetition_penalty": 1.08,
"temperature": 0.66,
"max_new_tokens": 2048,
"chunk_length": 200,
"input": "The answer to the universe is 42"
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
// 直接返回音频文件 xxx.mp3
修改于 2025-04-12 06:07:58