fix(config): 按审核意见补齐占位文案与 PaddleSpeech 协议收敛

- AliLLM 占位改为「你的阿里云百炼API密钥」;ASR 段「语音合成」改为「语音识别」;XunfeiSparkLLM 占位改为 api_key
- PaddleSpeech:启动时校验 protocol;代码兜底 URL 与 config 对齐为本机;智控台新增 changeset 去掉 http 选项
This commit is contained in:
shinjiyu committed 2026-10-30 20:55:56 +08:00
1 parent ccc77799d9
commit 1ac4c09946
4 files changed
+47 -16

No files matched your search

@@ -0,0 +1,22 @@
-- PaddleSpeechTTS:智控台协议收敛为仅 websocket(与 xiaozhi-server 实现一致)
UPDATE `ai_model_provider`
SET `fields` = JSON_ARRAY(
JSON_OBJECT('key', 'protocol', 'label', '协议类型', 'type', 'string', 'options', JSON_ARRAY('websocket')),
JSON_OBJECT('key', 'url', 'label', '服务地址', 'type', 'string'),
JSON_OBJECT('key', 'spk_id', 'label', '音色', 'type', 'int'),
JSON_OBJECT('key', 'sample_rate', 'label', '采样率', 'type', 'float'),
JSON_OBJECT('key', 'speed', 'label', '语速', 'type', 'float'),
JSON_OBJECT('key', 'volume', 'label', '音量', 'type', 'float'),
JSON_OBJECT('key', 'save_path', 'label', '保存路径', 'type', 'string')
)
WHERE `id` = 'SYSTEM_TTS_PaddleSpeechTTS';
UPDATE `ai_model_config`
SET `remark` = 'PaddleSpeechTTS 配置说明:
1. PaddleSpeech 是百度飞桨开源的语音合成工具,支持本地离线部署和模型训练。paddlepaddle百度飞浆框架地址:https://www.paddlepaddle.org.cn/
2. 当前仅支持 WebSocket 协议进行流式传输(参考部署文档:https://github.com/xinnan-tech/xiaozhi-esp32-server/blob/main/docs/paddlespeech-deploy.md)。
3. 使用前要在本地部署 paddlespeech 服务,服务默认运行在 ws://127.0.0.1:8092/paddlespeech/tts/streaming
4. 支持自定义发音人、语速、音量和采样率。
'
WHERE `id` = 'TTS_PaddleSpeechTTS';
@@ -753,3 +753,10 @@ databaseChangeLog:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202609172100.sql
- changeSet:
id: 202610302051
author: shinjiyu
changes:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202610302051.sql
+14 -14
View File
@@ -398,8 +398,8 @@ ASR:
# DoubaoASR和DoubaoStreamASR的区别是:DoubaoASR是按次收费,DoubaoStreamASR是按时收费
# 一般来说按次收费的更便宜,但是DoubaoStreamASR使用了大模型技术,效果更好
type: doubao
appid: 你的火山引擎语音合成服务appid
access_token: 你的火山引擎语音合成服务access_token
appid: 你的火山引擎语音识别服务appid
access_token: 你的火山引擎语音识别服务access_token
cluster: volcengine_input_common
# 热词、替换词使用流程:https://www.volcengine.com/docs/6561/155738
boosting_table_name: (选填)你的热词文件名称
@@ -412,8 +412,8 @@ ASR:
# 开通地址https://console.volcengine.com/speech/service/10011
# 一般来说按次收费的更便宜,但是DoubaoStreamASR使用了大模型技术,效果更好
type: doubao_stream
appid: 你的火山引擎语音合成服务appid
access_token: 你的火山引擎语音合成服务access_token
appid: 你的火山引擎语音识别服务appid
access_token: 你的火山引擎语音识别服务access_token
# 资源ID:小时版 volc.bigasr.sauc.duration,并发版 volc.bigasr.sauc.concurrent
resource_id: volc.bigasr.sauc.duration
# 热词、替换词使用流程:https://www.volcengine.com/docs/6561/155738
@@ -432,8 +432,8 @@ ASR:
# 开通地址:https://console.volcengine.com/speech/service/10038
# 价格更为便宜,建议在高并发场景下使用
type: doubao_stream
appid: 你的火山引擎语音合成服务appid
access_token: 你的火山引擎语音合成服务access_token
appid: 你的火山引擎语音识别服务appid
access_token: 你的火山引擎语音识别服务access_token
# 资源ID:小时版 volc.seedasr.sauc.duration,并发版 volc.seedasr.sauc.concurrent
resource_id: volc.seedasr.sauc.duration
# 热词、替换词使用流程:https://www.volcengine.com/docs/6561/155738
@@ -451,9 +451,9 @@ ASR:
# token申请地址:https://console.cloud.tencent.com/cam/capi
# 免费领取资源:https://console.cloud.tencent.com/asr/resourcebundle
type: tencent
appid: 你的腾讯语音合成服务appid
secret_id: 你的腾讯语音合成服务secret_id
secret_key: 你的腾讯语音合成服务secret_key
appid: 你的腾讯语音识别服务appid
secret_id: 你的腾讯语音识别服务secret_id
secret_key: 你的腾讯语音识别服务secret_key
output_dir: tmp/
AliyunASR:
# 阿里云智能语音交互服务,需要先在阿里云平台开通服务,然后获取验证信息
@@ -619,7 +619,7 @@ LLM:
# 可在这里找到你的 api_key https://bailian.console.aliyun.com/?apiKey=1#/api-key
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
model_name: qwen-flash
api_key: 你的api_key
api_key: 你的阿里云百炼API密钥
temperature: 0.7 # 温度值
max_tokens: 500 # 最大生成token数
top_p: 1
@@ -763,10 +763,10 @@ VLLM:
# 先新建应用,在下面的地址
# 开通应用地址:https://console.xfyun.cn/app/myapp
# 有免费额度,但也要开通服务,才能获取api_key
# 每一个模型都需要单独开通,每一个模型的api_password都不同,例如Lite模型在https://console.xfyun.cn/services/cbm 开通
# 每一个模型都需要单独开通,每一个模型的 api_key 都不同,例如 Lite 模型在 https://console.xfyun.cn/services/cbm 开通
base_url: https://ark.cn-beijing.volces.com/api/v3
model_name: lite
api_key: 你的api_password
api_key: 你的api_key
TTS:
# 当前支持的type为edge、doubao,可自行适配
EdgeTTS:
@@ -1117,8 +1117,8 @@ TTS:
#SpeechServerDemo https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/demos/speech_server
#流式传输请参考 https://github.com/PaddlePaddle/PaddleSpeech/wiki/PaddleSpeech-Server-WebSocket-API
type: paddle_speech
protocol: websocket # 当前仅实现 websocket
url: ws://127.0.0.1:8092/paddlespeech/tts/streaming # TTS 服务的 URL 地址,指向本地服务器 [websocket 默认 ws://127.0.0.1:8092/paddlespeech/tts/streaming]
protocol: websocket # 当前仅实现 websocket;填其他值会在启动时报错
url: ws://127.0.0.1:8092/paddlespeech/tts/streaming # TTS 服务地址(未配置时代码兜底同此本机地址)
spk_id: 0 # 发音人 ID,0 通常表示默认的发音人
speed: 1.0 # 语速,1.0 表示正常语速,>1 表示加快,<1 表示减慢
volume: 1.0 # 音量,1.0 表示正常音量,>1 表示增大,<1 表示减小
@@ -23,9 +23,11 @@ class TTSProvider(TTSProviderBase):
def __init__(self, config, delete_audio_file):
super().__init__(config, delete_audio_file)
self.url = config.get("url", "ws://192.168.1.10:8092/paddlespeech/tts/streaming")
self.url = config.get("url", "ws://127.0.0.1:8092/paddlespeech/tts/streaming")
self.protocol = config.get("protocol", "websocket")
if self.protocol != "websocket":
raise ValueError("Unsupported protocol. Please use 'websocket'.")
if config.get("private_voice"):
self.spk_id = int(config.get("private_voice"))
else: