mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
update:优化唤醒词缓存文件
* update:增加私有唤醒答复文件 * update:优化唤醒词缓存文件
This commit is contained in:
parent
4acb5f924a
commit
af6c8ab935
2 changed files with 1 additions and 1 deletions
Binary file not shown.
|
|
@ -58,7 +58,7 @@ def getWakeupWordFile(file_name):
|
||||||
async def wakeupWordsResponse(conn):
|
async def wakeupWordsResponse(conn):
|
||||||
"""唤醒词响应"""
|
"""唤醒词响应"""
|
||||||
wakeup_word = random.choice(WAKEUP_CONFIG["words"])
|
wakeup_word = random.choice(WAKEUP_CONFIG["words"])
|
||||||
result = conn.llm.response_no_stream(conn.prompt, wakeup_word)
|
result = conn.llm.response_no_stream(conn.config["prompt"], wakeup_word)
|
||||||
tts_file = await asyncio.to_thread(conn.tts.to_tts, result)
|
tts_file = await asyncio.to_thread(conn.tts.to_tts, result)
|
||||||
if tts_file is not None and os.path.exists(tts_file):
|
if tts_file is not None and os.path.exists(tts_file):
|
||||||
file_type = os.path.splitext(tts_file)[1]
|
file_type = os.path.splitext(tts_file)[1]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue