使用 POST 请求到以下 URL:
http://127.0.0.1:5600/play
请求体(json字符串):
{
"voice_path": "out\\2.mp3",
"content": "音频文本内容",
"random_speed": {
"enable": false,
"max": 1.3,
"min": 0.8
},
"speed": 1,
"insert_index": 0
}
参数说明:
返回数据:
// 成功返回
{"code": 200, "message": "添加音频信息成功!"}
// 失败返回
{"code": -1, "message": "添加音频信息失败!{e}"}
使用 GET 请求到以下 URL:
http://127.0.0.1:5600/pause_stream
使用 GET 请求到以下 URL:
http://127.0.0.1:5600/resume_stream
使用 GET 请求到以下 URL:
http://127.0.0.1:5600/skip_current_stream
使用 GET 请求到以下 URL:
http://127.0.0.1:5600/clear
使用 GET 请求到以下 URL:
http://127.0.0.1:5600/get_list
{
"device_index": 5,
"captions_printer": {
"api_ip_port": "http://127.0.0.1:5500",
"enable": false
},
"random_speed": {
"enable": false,
"max": 1.3,
"min": 0.8
},
"speed": 1,
"random_audio_interval": {
"enable": false,
"max": 3,
"min": 0.1
},
"audio_interval": 0.5,
"priority_mapping": {
"copywriting": 1,
"abnormal_alarm": 1,
"trends_copywriting": 10,
"idle_time_task": 10,
"image_recognition_schedule": 10,
"local_qa_audio": 20,
"comment": 20,
"song": 20,
"read_comment": 20,
"gift": 20,
"follow": 20,
"reread": 30,
"direct_reply": 30
}
}
配置说明: