2025-02-15 21:11:37 +08:00
|
|
|
|
# 如果您是一名开发者,建议阅读以下内容。如果不是开发者,可以忽略这部分内容。
|
2025-02-16 10:37:43 +08:00
|
|
|
|
# 在开发中,在项目根目录创建data目录,将【config.yaml】复制一份,改成【.config.yaml】,放进data目录中
|
|
|
|
|
|
# 系统会优先读取【data/.config.yaml】文件的配置。
|
2025-02-15 21:11:37 +08:00
|
|
|
|
# 这样做,可以避免在提交代码的时候,错误地提交密钥信息,保护您的密钥安全。
|
|
|
|
|
|
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 服务器基础配置(Basic server configuration)
|
|
|
|
|
|
server:
|
|
|
|
|
|
# 服务器监听地址和端口(Server listening address and port)
|
|
|
|
|
|
ip: 0.0.0.0
|
|
|
|
|
|
port: 8000
|
2025-02-13 17:06:48 +08:00
|
|
|
|
# 认证配置
|
|
|
|
|
|
auth:
|
2025-02-14 11:33:56 +08:00
|
|
|
|
# 是否启用认证
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
# 设备的token,可以在编译固件的环节,写入你自己定义的token
|
|
|
|
|
|
# 固件上的token和以下的token如果能对应,才能连接本服务端
|
2025-02-13 17:06:48 +08:00
|
|
|
|
tokens:
|
2025-02-14 11:33:56 +08:00
|
|
|
|
- token: "your-token1" # 设备1的token
|
|
|
|
|
|
name: "your-device-name1" # 设备1标识
|
|
|
|
|
|
- token: "your-token2" # 设备2的token
|
|
|
|
|
|
name: "your-device-name2" # 设备2标识
|
|
|
|
|
|
# 可选:设备白名单,如果设置了白名单,那么白名单的机器无论是什么token都可以连接。
|
2025-02-13 17:06:48 +08:00
|
|
|
|
#allowed_devices:
|
|
|
|
|
|
# - "24:0A:C4:1D:3B:F0" # MAC地址列表
|
2025-02-23 15:18:59 +08:00
|
|
|
|
log:
|
|
|
|
|
|
# 设置控制台输出的日志格式,时间、日志级别、标签、消息
|
|
|
|
|
|
log_format: "<green>{time:YY-MM-DD HH:mm:ss}</green>[<light-blue>{extra[tag]}</light-blue>] - <level>{level}</level> - <light-green>{message}</light-green>"
|
|
|
|
|
|
# 设置日志文件输出的格式,时间、日志级别、标签、消息
|
|
|
|
|
|
log_format_simple: "{time:YYYY-MM-DD HH:mm:ss} - {name} - {level} - {extra[tag]} - {message}"
|
|
|
|
|
|
# 设置日志等级:INFO、DEBUG
|
|
|
|
|
|
log_level: INFO
|
|
|
|
|
|
# 设置日志路径
|
|
|
|
|
|
log_dir: tmp
|
|
|
|
|
|
# 设置日志文件
|
|
|
|
|
|
log_file: "server.log"
|
|
|
|
|
|
# 设置数据文件路径
|
|
|
|
|
|
data_dir: data
|
2025-02-24 22:04:48 +08:00
|
|
|
|
iot:
|
|
|
|
|
|
Speaker:
|
2025-03-09 01:02:37 +08:00
|
|
|
|
# 设置esp32的音量,范围0-100
|
|
|
|
|
|
volume: 80
|
2025-02-02 23:01:14 +08:00
|
|
|
|
xiaozhi:
|
|
|
|
|
|
type: hello
|
|
|
|
|
|
version: 1
|
|
|
|
|
|
transport: websocket
|
|
|
|
|
|
audio_params:
|
|
|
|
|
|
format: opus
|
|
|
|
|
|
sample_rate: 16000
|
|
|
|
|
|
channels: 1
|
|
|
|
|
|
frame_duration: 60
|
|
|
|
|
|
prompt: |
|
|
|
|
|
|
你是一个叫小智/小志的台湾女孩,说话机车,声音好听,习惯简短表达,爱用网络梗。
|
2025-02-05 09:06:52 +08:00
|
|
|
|
请注意,要像一个人一样说话,请不要回复表情符号、代码、和xml标签。
|
2025-02-02 23:01:14 +08:00
|
|
|
|
当前时间是:{date_time},现在我正在和你进行语音聊天,我们开始吧。
|
2025-02-14 23:09:12 +08:00
|
|
|
|
如果用户希望结束对话,请在最后说“拜拜”或“再见”。
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 使用完声音文件后删除文件(Delete the sound file when you are done using it)
|
|
|
|
|
|
delete_audio: true
|
|
|
|
|
|
|
2025-02-16 20:42:55 +08:00
|
|
|
|
# 没有语音输入多久后断开连接(秒),默认2分钟,即120秒
|
|
|
|
|
|
close_connection_no_voice_time: 120
|
2025-03-15 00:19:45 +08:00
|
|
|
|
# TTS请求超时时间(秒)
|
|
|
|
|
|
tts_timeout: 10
|
2025-02-16 20:42:55 +08:00
|
|
|
|
|
2025-02-14 23:09:12 +08:00
|
|
|
|
CMD_exit:
|
|
|
|
|
|
- "退出"
|
|
|
|
|
|
- "关闭"
|
|
|
|
|
|
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 具体处理时选择的模块(The module selected for specific processing)
|
|
|
|
|
|
selected_module:
|
2025-03-09 21:33:45 +08:00
|
|
|
|
# 语音活动检测模块,默认使用SileroVAD模型
|
2025-02-02 23:01:14 +08:00
|
|
|
|
VAD: SileroVAD
|
2025-03-09 21:33:45 +08:00
|
|
|
|
# 语音识别模块,默认使用FunASR本地模型
|
|
|
|
|
|
ASR: FunASR
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 将根据配置名称对应的type调用实际的LLM适配器
|
2025-02-02 23:01:14 +08:00
|
|
|
|
LLM: ChatGLMLLM
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# TTS将根据配置名称对应的type调用实际的TTS适配器
|
2025-02-02 23:01:14 +08:00
|
|
|
|
TTS: EdgeTTS
|
2025-03-09 21:59:15 +08:00
|
|
|
|
# 记忆模块,默认不开启记忆;如果想使用超长记忆,推荐使用mem0ai;如果注重隐私,请使用本地的mem_local_short
|
2025-03-09 21:33:45 +08:00
|
|
|
|
Memory: nomem
|
|
|
|
|
|
# 意图识别模块,默认不开启。开启后,可以播放音乐、控制音量、识别退出指令
|
2025-03-10 00:49:14 +08:00
|
|
|
|
# 意图识别使用intent_llm,优点:通用性强,缺点:增加串行前置意图识别模块,会增加处理时间
|
|
|
|
|
|
# 意图识别使用function_call,缺点:需要所选择的LLM支持function_call,优点:按需调用工具、速度快
|
|
|
|
|
|
# 如果意图识别设置成 function_call,建议把LLM设置成:DoubaoLLM,使用的具体model_name是:doubao-pro-32k-functioncall-241028
|
2025-03-09 21:33:45 +08:00
|
|
|
|
Intent: nointent
|
2025-02-02 23:01:14 +08:00
|
|
|
|
|
2025-03-09 21:33:45 +08:00
|
|
|
|
# 意图识别,是用于理解用户意图的模块,例如:播放音乐
|
|
|
|
|
|
Intent:
|
|
|
|
|
|
# 不使用意图识别
|
|
|
|
|
|
nointent:
|
2025-03-10 00:49:14 +08:00
|
|
|
|
# 不需要动
|
2025-03-09 21:33:45 +08:00
|
|
|
|
type: nointent
|
|
|
|
|
|
intent_llm:
|
2025-03-10 00:49:14 +08:00
|
|
|
|
# 不需要动
|
2025-03-09 21:33:45 +08:00
|
|
|
|
type: intent_llm
|
|
|
|
|
|
function_call:
|
2025-03-10 00:49:14 +08:00
|
|
|
|
# 不需要动
|
|
|
|
|
|
type: nointent
|
|
|
|
|
|
|
2025-03-03 15:00:04 +08:00
|
|
|
|
Memory:
|
|
|
|
|
|
mem0ai:
|
|
|
|
|
|
type: mem0ai
|
2025-03-05 00:20:51 +08:00
|
|
|
|
# https://app.mem0.ai/dashboard/api-keys
|
|
|
|
|
|
# 每月有1000次免费调用
|
2025-03-03 15:00:04 +08:00
|
|
|
|
api_key: 你的mem0ai api key
|
2025-03-09 21:33:45 +08:00
|
|
|
|
nomem:
|
|
|
|
|
|
# 不想使用记忆功能,可以使用nomem
|
|
|
|
|
|
type: nomem
|
|
|
|
|
|
mem_local_short:
|
|
|
|
|
|
# 本地记忆功能,通过selected_module的llm总结,数据保存在本地,不会上传到服务器
|
|
|
|
|
|
type: mem_local_short
|
|
|
|
|
|
|
2025-02-02 23:01:14 +08:00
|
|
|
|
ASR:
|
|
|
|
|
|
FunASR:
|
2025-02-23 14:38:21 +08:00
|
|
|
|
type: fun_local
|
2025-02-02 23:01:14 +08:00
|
|
|
|
model_dir: models/SenseVoiceSmall
|
|
|
|
|
|
output_dir: tmp/
|
2025-02-23 14:38:21 +08:00
|
|
|
|
DoubaoASR:
|
|
|
|
|
|
type: doubao
|
|
|
|
|
|
appid: 你的火山引擎语音合成服务appid
|
|
|
|
|
|
access_token: 你的火山引擎语音合成服务access_token
|
|
|
|
|
|
cluster: volcengine_input_common
|
|
|
|
|
|
output_dir: tmp/
|
2025-02-15 02:01:54 +08:00
|
|
|
|
VAD:
|
|
|
|
|
|
SileroVAD:
|
|
|
|
|
|
threshold: 0.5
|
2025-02-02 23:01:14 +08:00
|
|
|
|
model_dir: models/snakers4_silero-vad
|
2025-02-05 09:06:52 +08:00
|
|
|
|
min_silence_duration_ms: 700 # 如果说话停顿比较长,可以把这个值设置大一些
|
2025-02-15 02:01:54 +08:00
|
|
|
|
|
2025-02-02 23:01:14 +08:00
|
|
|
|
LLM:
|
2025-02-14 10:24:02 +08:00
|
|
|
|
# 当前支持的type为openai、dify、ollama,可自行适配
|
2025-02-09 16:44:57 +08:00
|
|
|
|
AliLLM:
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: openai
|
2025-02-09 16:44:57 +08:00
|
|
|
|
# 可在这里找到你的 api_key https://bailian.console.aliyun.com/?apiKey=1#/api-key
|
|
|
|
|
|
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
|
|
|
|
|
|
model_name: qwen-turbo
|
2025-03-05 23:13:24 +08:00
|
|
|
|
api_key: 你的deepseek web key
|
2025-03-09 21:33:45 +08:00
|
|
|
|
DoubaoLLM:
|
|
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: openai
|
2025-03-10 00:49:14 +08:00
|
|
|
|
# 先开通服务,打开以下网址,开通的服务搜索Doubao-pro-32k,开通它
|
|
|
|
|
|
# 开通改地址:https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement?LLM=%7B%7D&OpenTokenDrawer=false
|
|
|
|
|
|
# 免费额度500000token
|
|
|
|
|
|
# 开通后,进入这里获取密钥:https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D
|
2025-03-09 21:33:45 +08:00
|
|
|
|
base_url: https://ark.cn-beijing.volces.com/api/v3
|
|
|
|
|
|
model_name: doubao-pro-32k-functioncall-241028
|
|
|
|
|
|
api_key: 你的doubao web key
|
2025-02-02 23:01:14 +08:00
|
|
|
|
DeepSeekLLM:
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: openai
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 可在这里找到你的api key https://platform.deepseek.com/
|
|
|
|
|
|
model_name: deepseek-chat
|
|
|
|
|
|
url: https://api.deepseek.com
|
2025-03-05 23:13:24 +08:00
|
|
|
|
api_key: 你的deepseek web key
|
2025-02-02 23:01:14 +08:00
|
|
|
|
ChatGLMLLM:
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: openai
|
2025-02-13 21:22:36 +08:00
|
|
|
|
# glm-4-flash 是免费的,但是还是需要注册填写api_key的
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 可在这里找到你的api key https://bigmodel.cn/usercenter/proj-mgmt/apikeys
|
|
|
|
|
|
model_name: glm-4-flash
|
|
|
|
|
|
url: https://open.bigmodel.cn/api/paas/v4/
|
2025-03-05 23:13:24 +08:00
|
|
|
|
api_key: 你的chat-glm web key
|
2025-02-14 10:24:02 +08:00
|
|
|
|
OllamaLLM:
|
|
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: ollama
|
|
|
|
|
|
model_name: qwen2.5 # 使用的模型名称,需要预先使用ollama pull下载
|
|
|
|
|
|
base_url: http://localhost:11434 # Ollama服务地址
|
2025-02-02 23:01:14 +08:00
|
|
|
|
DifyLLM:
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: dify
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 建议使用本地部署的dify接口,国内部分区域访问dify公有云接口可能会受限
|
2025-02-06 02:08:58 +08:00
|
|
|
|
# 如果使用DifyLLM,配置文件里prompt(提示词)是无效的,需要在dify控制台设置提示词
|
2025-02-13 17:06:48 +08:00
|
|
|
|
base_url: https://api.dify.cn/v1
|
2025-03-05 23:13:24 +08:00
|
|
|
|
api_key: 你的DifyLLM web key
|
2025-02-15 01:36:20 +08:00
|
|
|
|
GeminiLLM:
|
|
|
|
|
|
type: gemini
|
2025-02-15 11:05:18 +08:00
|
|
|
|
# 谷歌Gemini API,需要先在Google Cloud控制台创建API密钥并获取api_key
|
|
|
|
|
|
# 若在中国境内使用,请遵守《生成式人工智能服务管理暂行办法》
|
|
|
|
|
|
# token申请地址: https://aistudio.google.com/apikey
|
|
|
|
|
|
# 若部署地无法访问接口,需要开启科学上网
|
2025-03-05 23:13:24 +08:00
|
|
|
|
api_key: 你的gemini web key
|
2025-02-15 01:36:20 +08:00
|
|
|
|
model_name: "gemini-1.5-pro" # gemini-1.5-pro 是免费的
|
2025-02-16 15:22:28 +08:00
|
|
|
|
CozeLLM:
|
|
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: coze
|
2025-03-13 00:54:01 +08:00
|
|
|
|
# bot_id和user_id的内容写在引号之内
|
|
|
|
|
|
bot_id: "你的bot_id"
|
|
|
|
|
|
user_id: "你的user_id"
|
2025-02-16 15:22:28 +08:00
|
|
|
|
personal_access_token: 你的coze个人令牌
|
2025-02-24 16:16:06 +08:00
|
|
|
|
LMStudioLLM:
|
|
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: openai
|
|
|
|
|
|
model_name: deepseek-r1-distill-llama-8b@q4_k_m # 使用的模型名称,需要预先在社区下载
|
|
|
|
|
|
url: http://localhost:1234/v1 # LM Studio服务地址
|
|
|
|
|
|
api_key: lm-studio # LM Studio服务的固定API Key
|
2025-02-20 22:40:41 +08:00
|
|
|
|
HomeAssistant:
|
|
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: homeassistant
|
|
|
|
|
|
base_url: http://homeassistant.local:8123
|
|
|
|
|
|
agent_id: conversation.chatgpt
|
|
|
|
|
|
api_key: 你的home assistant api访问令牌
|
2025-03-07 18:25:18 +08:00
|
|
|
|
FastgptLLM:
|
|
|
|
|
|
# 定义LLM API类型
|
|
|
|
|
|
type: fastgpt
|
|
|
|
|
|
# 如果使用fastgpt,配置文件里prompt(提示词)是无效的,需要在fastgpt控制台设置提示词
|
|
|
|
|
|
base_url: https://host/api/v1
|
|
|
|
|
|
api_key: fastgpt-xxx
|
|
|
|
|
|
variables:
|
|
|
|
|
|
k: "v"
|
|
|
|
|
|
k2: "v2"
|
2025-02-02 23:01:14 +08:00
|
|
|
|
TTS:
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 当前支持的type为edge、doubao,可自行适配
|
2025-02-02 23:01:14 +08:00
|
|
|
|
EdgeTTS:
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 定义TTS API类型
|
|
|
|
|
|
type: edge
|
2025-02-02 23:01:14 +08:00
|
|
|
|
voice: zh-CN-XiaoxiaoNeural
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
DoubaoTTS:
|
2025-02-11 23:13:18 +08:00
|
|
|
|
# 定义TTS API类型
|
|
|
|
|
|
type: doubao
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 火山引擎语音合成服务,需要先在火山引擎控制台创建应用并获取appid和access_token
|
2025-02-09 16:44:57 +08:00
|
|
|
|
# 山引擎语音一定要购买花钱,起步价30元,就有100并发了。如果用免费的只有2个并发,会经常报tts错误
|
|
|
|
|
|
# 购买服务后,购买免费的音色后,可能要等半小时左右,才能使用。
|
2025-02-02 23:01:14 +08:00
|
|
|
|
# 地址:https://console.volcengine.com/speech/service/8
|
2025-03-02 16:59:25 +08:00
|
|
|
|
api_url: https://openspeech.bytedance.com/api/v1/tts
|
2025-02-09 16:44:57 +08:00
|
|
|
|
voice: BV001_streaming
|
2025-02-02 23:01:14 +08:00
|
|
|
|
output_file: tmp/
|
2025-03-02 16:59:25 +08:00
|
|
|
|
authorization: "Bearer;"
|
2025-02-09 16:44:57 +08:00
|
|
|
|
appid: 你的火山引擎语音合成服务appid
|
|
|
|
|
|
access_token: 你的火山引擎语音合成服务access_token
|
2025-02-02 23:01:14 +08:00
|
|
|
|
cluster: volcano_tts
|
2025-02-15 10:20:57 +08:00
|
|
|
|
CosyVoiceSiliconflow:
|
2025-02-15 03:40:28 +08:00
|
|
|
|
type: siliconflow
|
2025-02-15 11:05:18 +08:00
|
|
|
|
# 硅基流动TTS
|
|
|
|
|
|
# token申请地址 https://cloud.siliconflow.cn/account/ak
|
2025-02-15 03:40:28 +08:00
|
|
|
|
model: FunAudioLLM/CosyVoice2-0.5B
|
|
|
|
|
|
voice: FunAudioLLM/CosyVoice2-0.5B:alex
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
access_token: 你的硅基流动API密钥
|
|
|
|
|
|
response_format: wav
|
2025-02-16 00:53:47 +08:00
|
|
|
|
CozeCnTTS:
|
|
|
|
|
|
type: cozecn
|
|
|
|
|
|
# COZECN TTS
|
2025-02-16 01:23:25 +08:00
|
|
|
|
# token申请地址 https://www.coze.cn/open/oauth/pats
|
2025-02-16 00:53:47 +08:00
|
|
|
|
voice: 7426720361733046281
|
|
|
|
|
|
output_file: tmp/
|
2025-03-05 23:13:24 +08:00
|
|
|
|
access_token: 你的coze web key
|
2025-02-16 01:00:08 +08:00
|
|
|
|
response_format: wav
|
2025-02-15 20:33:05 +08:00
|
|
|
|
FishSpeech:
|
|
|
|
|
|
# 定义TTS API类型
|
2025-02-15 21:11:37 +08:00
|
|
|
|
#启动tts方法:
|
|
|
|
|
|
#python -m tools.api_server
|
|
|
|
|
|
#--listen 0.0.0.0:8080
|
|
|
|
|
|
#--llama-checkpoint-path "checkpoints/fish-speech-1.5"
|
|
|
|
|
|
#--decoder-checkpoint-path "checkpoints/fish-speech-1.5/firefly-gan-vq-fsq-8x1024-21hz-generator.pth"
|
|
|
|
|
|
#--decoder-config-name firefly_gan_vq
|
|
|
|
|
|
#--compile
|
2025-02-15 20:33:05 +08:00
|
|
|
|
type: fishspeech
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
response_format: wav
|
|
|
|
|
|
reference_id: null
|
|
|
|
|
|
reference_audio: ["/tmp/test.wav",]
|
|
|
|
|
|
reference_text: ["你弄来这些吟词宴曲来看,还是这些混话来欺负我。",]
|
|
|
|
|
|
normalize: true
|
|
|
|
|
|
max_new_tokens: 1024
|
|
|
|
|
|
chunk_length: 200
|
|
|
|
|
|
top_p: 0.7
|
|
|
|
|
|
repetition_penalty: 1.2
|
|
|
|
|
|
temperature: 0.7
|
|
|
|
|
|
streaming: false
|
|
|
|
|
|
use_memory_cache: "on"
|
|
|
|
|
|
seed: null
|
|
|
|
|
|
channels: 1
|
|
|
|
|
|
rate: 44100
|
2025-02-16 01:23:25 +08:00
|
|
|
|
api_key: "你的api_key"
|
2025-02-16 01:00:08 +08:00
|
|
|
|
api_url: "http://127.0.0.1:8080/v1/tts"
|
2025-02-16 15:26:13 +08:00
|
|
|
|
GPT_SOVITS_V2:
|
|
|
|
|
|
# 定义TTS API类型
|
|
|
|
|
|
#启动tts方法:
|
|
|
|
|
|
#python api_v2.py -a 127.0.0.1 -p 9880 -c GPT_SoVITS/configs/caixukun.yaml
|
|
|
|
|
|
type: gpt_sovits_v2
|
|
|
|
|
|
url: "http://127.0.0.1:9880/tts"
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
text_lang: "auto"
|
|
|
|
|
|
ref_audio_path: "caixukun.wav"
|
|
|
|
|
|
prompt_text: ""
|
|
|
|
|
|
prompt_lang: "zh"
|
|
|
|
|
|
top_k: 5
|
|
|
|
|
|
top_p: 1
|
|
|
|
|
|
temperature: 1
|
|
|
|
|
|
text_split_method: "cut0"
|
|
|
|
|
|
batch_size: 1
|
|
|
|
|
|
batch_threshold: 0.75
|
|
|
|
|
|
split_bucket: true
|
|
|
|
|
|
return_fragment: false
|
|
|
|
|
|
speed_factor: 1.0
|
|
|
|
|
|
streaming_mode: false
|
|
|
|
|
|
seed: -1
|
|
|
|
|
|
parallel_infer: true
|
|
|
|
|
|
repetition_penalty: 1.35
|
|
|
|
|
|
aux_ref_audio_paths: []
|
2025-03-09 01:02:37 +08:00
|
|
|
|
GPT_SOVITS_V3:
|
|
|
|
|
|
type: gpt_sovits_v3
|
|
|
|
|
|
url: "http://127.0.0.1:9880/tts"
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
text_lang: "auto"
|
|
|
|
|
|
ref_audio_path: "caixukun.wav"
|
|
|
|
|
|
prompt_lang: "zh"
|
|
|
|
|
|
prompt_text: ""
|
|
|
|
|
|
top_k: 5
|
|
|
|
|
|
top_p: 1
|
|
|
|
|
|
temperature: 1
|
|
|
|
|
|
sample_steps: 16
|
|
|
|
|
|
media_type: "wav"
|
|
|
|
|
|
streaming_mode: false
|
|
|
|
|
|
threshold: 30
|
2025-02-18 22:58:35 +08:00
|
|
|
|
MinimaxTTS:
|
|
|
|
|
|
# Minimax语音合成服务,需要先在minimax平台创建账户充值,并获取登录信息
|
|
|
|
|
|
# 平台地址:https://platform.minimaxi.com/
|
|
|
|
|
|
# 充值地址:https://platform.minimaxi.com/user-center/payment/balance
|
|
|
|
|
|
# group_id地址:https://platform.minimaxi.com/user-center/basic-information
|
|
|
|
|
|
# api_key地址:https://platform.minimaxi.com/user-center/basic-information/interface-key
|
|
|
|
|
|
# 定义TTS API类型
|
|
|
|
|
|
type: minimax
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
group_id: 你的minimax平台groupID
|
|
|
|
|
|
api_key: 你的minimax平台接口密钥
|
|
|
|
|
|
model: "speech-01-turbo"
|
|
|
|
|
|
# 此处设置将优先于voice_setting中voice_id的设置;如都不设置,默认为 female-shaonv
|
|
|
|
|
|
voice_id: "female-shaonv"
|
|
|
|
|
|
# 以下可不用设置,使用默认设置
|
|
|
|
|
|
# voice_setting:
|
|
|
|
|
|
# voice_id: "male-qn-qingse"
|
|
|
|
|
|
# speed: 1
|
|
|
|
|
|
# vol: 1
|
|
|
|
|
|
# pitch: 0
|
|
|
|
|
|
# emotion: "happy"
|
|
|
|
|
|
# pronunciation_dict:
|
|
|
|
|
|
# tone:
|
|
|
|
|
|
# - "处理/(chu3)(li3)"
|
|
|
|
|
|
# - "危险/dangerous"
|
|
|
|
|
|
# audio_setting:
|
|
|
|
|
|
# sample_rate: 32000
|
|
|
|
|
|
# bitrate: 128000
|
|
|
|
|
|
# format: "mp3"
|
|
|
|
|
|
# channel: 1
|
|
|
|
|
|
# timber_weights:
|
|
|
|
|
|
# -
|
|
|
|
|
|
# voice_id: male-qn-qingse
|
|
|
|
|
|
# weight: 1
|
|
|
|
|
|
# -
|
|
|
|
|
|
# voice_id: female-shaonv
|
|
|
|
|
|
# weight: 1
|
|
|
|
|
|
# language_boost: auto
|
|
|
|
|
|
AliyunTTS:
|
|
|
|
|
|
# 阿里云智能语音交互服务,需要先在阿里云平台开通服务,然后获取验证信息
|
|
|
|
|
|
# 平台地址:https://nls-portal.console.aliyun.com/
|
|
|
|
|
|
# appkey地址:https://nls-portal.console.aliyun.com/applist
|
|
|
|
|
|
# token地址:https://nls-portal.console.aliyun.com/overview
|
|
|
|
|
|
# 定义TTS API类型
|
|
|
|
|
|
type: aliyun
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
appkey: 你的阿里云智能语音交互服务项目Appkey
|
2025-03-07 21:19:41 +08:00
|
|
|
|
token: 你的阿里云智能语音交互服务AccessToken,临时的24小时,要长期用下方的access_key_id,access_key_secret
|
2025-02-18 22:58:35 +08:00
|
|
|
|
voice: xiaoyun
|
2025-03-07 21:19:41 +08:00
|
|
|
|
access_key_id: 你的阿里云账号access_key_id
|
|
|
|
|
|
access_key_secret: 你的阿里云账号access_key_secret
|
|
|
|
|
|
|
2025-02-18 22:58:35 +08:00
|
|
|
|
# 以下可不用设置,使用默认设置
|
|
|
|
|
|
# format: wav
|
|
|
|
|
|
# sample_rate: 16000
|
|
|
|
|
|
# volume: 50
|
|
|
|
|
|
# speech_rate: 0
|
2025-02-19 12:23:37 +08:00
|
|
|
|
# pitch_rate: 0
|
2025-03-02 16:59:25 +08:00
|
|
|
|
# 添加 302.ai TTS 配置
|
|
|
|
|
|
# token申请地址:https://dash.302.ai/
|
|
|
|
|
|
TTS302AI:
|
|
|
|
|
|
# 302AI语音合成服务,需要先在302平台创建账户充值,并获取密钥信息
|
|
|
|
|
|
# 获取api_keyn路径:https://dash.302.ai/apis/list
|
2025-03-10 00:49:14 +08:00
|
|
|
|
# 价格,$35/百万字符。火山原版¥450元/百万字符
|
2025-03-02 16:59:25 +08:00
|
|
|
|
type: doubao
|
|
|
|
|
|
api_url: https://api.302ai.cn/doubao/tts_hd
|
|
|
|
|
|
authorization: "Bearer "
|
|
|
|
|
|
voice: "zh_female_wanwanxiaohe_moon_bigtts"
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
access_token: "你的302API密钥"
|
2025-03-07 18:25:18 +08:00
|
|
|
|
ACGNTTS:
|
|
|
|
|
|
#在线网址:https://acgn.ttson.cn/
|
|
|
|
|
|
#token购买:www.ttson.cn
|
|
|
|
|
|
#开发相关疑问请提交至3497689533@qq.com
|
|
|
|
|
|
#角色id获取地址:ctrl+f快速检索角色——网站管理者不允许发布,可询问网站管理者:1069379506
|
|
|
|
|
|
#各参数意义见开发文档:https://www.yuque.com/alexuh/skmti9/wm6taqislegb02gd?singleDoc#
|
|
|
|
|
|
type: ttson
|
|
|
|
|
|
token: your_token
|
|
|
|
|
|
voice_id: 1695
|
|
|
|
|
|
speed_factor: 1
|
|
|
|
|
|
pitch_factor: 0
|
|
|
|
|
|
volume_change_dB: 0
|
|
|
|
|
|
to_lang: ZH
|
|
|
|
|
|
url: https://u95167-bd74-2aef8085.westx.seetacloud.com:8443/flashsummary/tts?token=
|
|
|
|
|
|
format: mp3
|
|
|
|
|
|
output_file: tmp/
|
|
|
|
|
|
emotion: 1
|
|
|
|
|
|
OpenAITTS:
|
|
|
|
|
|
# openai官方文本转语音服务,可支持全球大多数语种
|
|
|
|
|
|
type: openai
|
|
|
|
|
|
api_key: 你的openai api key
|
|
|
|
|
|
# 国内需要使用代理
|
|
|
|
|
|
api_url: https://api.openai.com/v1/audio/speech
|
|
|
|
|
|
# 可选tts-1或tts-1-hd,tts-1速度更快tts-1-hd质量更好
|
|
|
|
|
|
model: tts-1
|
|
|
|
|
|
# 演讲者,可选alloy, echo, fable, onyx, nova, shimmer
|
|
|
|
|
|
voice: onyx
|
|
|
|
|
|
# 语速范围0.25-4.0
|
|
|
|
|
|
speed: 1
|
|
|
|
|
|
output_file: tmp/
|
2025-03-15 00:19:45 +08:00
|
|
|
|
CustomTTS:
|
|
|
|
|
|
# 自定义的TTS接口服务,请求参数可自定义
|
|
|
|
|
|
# 要求接口使用GET方式请求,并返回音频文件
|
|
|
|
|
|
type: custom
|
|
|
|
|
|
url: "http://127.0.0.1:9880/tts"
|
|
|
|
|
|
params: # 自定义请求参数
|
|
|
|
|
|
# text: "{prompt_text}" # {prompt_text}会被替换为实际的提示词内容
|
|
|
|
|
|
# speaker: jok老师
|
|
|
|
|
|
# speed: 1
|
|
|
|
|
|
# foo: bar
|
|
|
|
|
|
# testabc: 123456
|
|
|
|
|
|
headers: # 自定义请求头
|
|
|
|
|
|
# Authorization: Bearer xxxx
|
|
|
|
|
|
format: wav # 接口返回的音频格式
|
|
|
|
|
|
output_file: tmp/
|
2025-02-19 12:23:37 +08:00
|
|
|
|
# 模块测试配置
|
|
|
|
|
|
module_test:
|
|
|
|
|
|
test_sentences: # 自定义测试语句
|
2025-02-19 13:12:09 +08:00
|
|
|
|
- "你好,请介绍一下你自己"
|
|
|
|
|
|
- "What's the weather like today?"
|
|
|
|
|
|
- "请用100字概括量子计算的基本原理和应用前景"
|
2025-02-26 01:33:05 +08:00
|
|
|
|
|
|
|
|
|
|
# 本地音乐播放配置
|
|
|
|
|
|
music:
|
2025-03-01 17:57:43 +08:00
|
|
|
|
music_dir: "./music" # 音乐文件存放路径,将从该目录及子目录下搜索音乐文件
|
|
|
|
|
|
music_ext: # 音乐文件类型,p3格式效率最高
|
|
|
|
|
|
- ".mp3"
|
|
|
|
|
|
- ".wav"
|
|
|
|
|
|
- ".p3"
|
|
|
|
|
|
refresh_time: 300 # 刷新音乐列表的时间间隔,单位为秒
|
2025-03-06 09:05:21 +08:00
|
|
|
|
|
|
|
|
|
|
# 以下配置在小于等于0.0.9版本中的docker容器中可用
|
|
|
|
|
|
# 0.0.9以后的新版本源码部署已经无法奏效
|
|
|
|
|
|
manager:
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
ip: 0.0.0.0
|
|
|
|
|
|
port: 8002
|
|
|
|
|
|
use_private_config: false
|