#164 自定义asr、tts缓存目录,项目启动自动创建目录

This commit is contained in:
ShudongW 2025-03-17 14:23:37 +08:00
parent 723b394f6c
commit 77027bebdc

View file

@ -51,13 +51,15 @@ xiaozhi:
prompt: | prompt: |
你是一个叫小智/小志的台湾女孩,说话机车,声音好听,习惯简短表达,爱用网络梗。 你是一个叫小智/小志的台湾女孩,说话机车,声音好听,习惯简短表达,爱用网络梗。
请注意,要像一个人一样说话,请不要回复表情符号、代码、和xml标签。 请注意,要像一个人一样说话,请不要回复表情符号、代码、和xml标签。
当前时间是:{date_time},现在我正在和你进行语音聊天,我们开始吧。 现在我正在和你进行语音聊天,我们开始吧。
如果用户希望结束对话,请在最后说“拜拜”或“再见”。 如果用户希望结束对话,请在最后说“拜拜”或“再见”。
# 使用完声音文件后删除文件(Delete the sound file when you are done using it) # 使用完声音文件后删除文件(Delete the sound file when you are done using it)
delete_audio: true delete_audio: true
# 没有语音输入多久后断开连接(秒),默认2分钟,即120秒 # 没有语音输入多久后断开连接(秒),默认2分钟,即120秒
close_connection_no_voice_time: 120 close_connection_no_voice_time: 120
# TTS请求超时时间(秒)
tts_timeout: 10
CMD_exit: CMD_exit:
- "退出" - "退出"
@ -85,14 +87,20 @@ selected_module:
Intent: Intent:
# 不使用意图识别 # 不使用意图识别
nointent: nointent:
# 不需要动 # 不需要动type
type: nointent type: nointent
intent_llm: intent_llm:
# 不需要动 # 不需要动type
type: intent_llm type: intent_llm
function_call: function_call:
# 不需要动 # 不需要动type
type: nointent type: nointent
# plugins_func/functions下的模块,可以通过配置,选择加载哪个模块,加载后对话支持相应的function调用
# 系统默认已经记载“handle_exit_intent(退出识别)”、“play_music(音乐播放)”插件,请勿重复加载
# 下面是加载查天气、角色切换的插件示例
functions:
- change_role
- get_weather
Memory: Memory:
mem0ai: mem0ai:
@ -298,20 +306,24 @@ TTS:
repetition_penalty: 1.35 repetition_penalty: 1.35
aux_ref_audio_paths: [] aux_ref_audio_paths: []
GPT_SOVITS_V3: GPT_SOVITS_V3:
# 定义TTS API类型 GPT-SoVITS-v3lora-20250228
#启动tts方法:
#python api.py
type: gpt_sovits_v3 type: gpt_sovits_v3
url: "http://127.0.0.1:9880/tts" url: "http://127.0.0.1:9880"
output_dir: tmp/ output_dir: tmp/
text_lang: "auto" text_language: "auto"
ref_audio_path: "caixukun.wav" refer_wav_path: "caixukun.wav"
prompt_lang: "zh" prompt_language: "zh"
prompt_text: "" prompt_text: ""
top_k: 5 top_k: 15
top_p: 1 top_p: 1.0
temperature: 1 temperature: 1.0
sample_steps: 16 cut_punc: ""
media_type: "wav" speed: 1.0
streaming_mode: false inp_refs: []
threshold: 30 sample_steps: 32
if_sr: false
MinimaxTTS: MinimaxTTS:
# Minimax语音合成服务,需要先在minimax平台创建账户充值,并获取登录信息 # Minimax语音合成服务,需要先在minimax平台创建账户充值,并获取登录信息
# 平台地址:https://platform.minimaxi.com/ # 平台地址:https://platform.minimaxi.com/
@ -412,6 +424,21 @@ TTS:
# 语速范围0.25-4.0 # 语速范围0.25-4.0
speed: 1 speed: 1
output_dir: tmp/ output_dir: tmp/
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_dir: tmp/
# 模块测试配置 # 模块测试配置
module_test: module_test:
test_sentences: # 自定义测试语句 test_sentences: # 自定义测试语句