- 在线调用-使用说明
- 基础模型
- 大语言模型 LLM
- 语音识别 ASR
- 语音合成 TTS
- 图片生成 Images Generations
- 视频合成 Video Generations
- RAG模型
- 音色处理 voice processing
- 图生图 Image to Image
- 智能体
- 聊天机器人V3 AI角色(socket)
- AI桌面助手 V1 AI角色
- socket Device认证
- 对话数据
科大讯飞 通用合成
POST
https://api.mindcraft.com.cn/v1/audio/speech
请求参数
Header 参数
Authorization
string
认证信息
示例值:
Bearer {{api_key}}
Body 参数application/json
model
enum<string>
模型选择
枚举值:
XF_TTS_realtime
示例值:
XF_TTS_realtime
text
string
语音合成文案
speed
integer
声音语速
>= 0<= 100
默认值:
50
volume
integer
声音音量
>= 0<= 100
默认值:
50
output_format
enum<string>
音频格式
枚举值:
pcmmp3speex
示例值:
pcm
audio_sample_rate
enum<integer>
声音采样率
枚举值:
800016000
示例值:
8000
pitch
integer
声音语调
>= 0<= 100
默认值:
50
示例
{
"model": "XF_TTS_realtime",
"voice_id": "xiaoyan",
"text": "你好啊,你叫什么名字",
"speed": 0,
"volume": 0,
"output_format": "mp3",
"audio_sample_rate": 8000,
"pitch": 86
}
示例代码
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.mindcraft.com.cn/v1/audio/speech' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "XF_TTS_realtime",
"voice_id": "xiaoyan",
"text": "你好啊,你叫什么名字",
"speed": 0,
"volume": 0,
"output_format": "mp3",
"audio_sample_rate": 8000,
"pitch": 86
}'
返回响应
🟢200成功
application/octet-stream
Body
id
string
请求ID
category
string
TTS 类型
model
string
必需
voice_id
string
TTS 音色
data
object
必需
category
string
TTS 类型
model
string
必需
voice_id
string
TTS 音色
word_count
integer
必 需
audio_file
string
音频链接
subtitle_file
string
必需
audio_length
integer
必需
audio_size
integer
必需
audio_sample_rate
integer
必需
bitrate
integer
必需
usage_characters
integer
必需