mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 19:33:51 +08:00
优化双流式TTS时的声音
This commit is contained in:
@@ -4,10 +4,9 @@ import json
|
||||
import random
|
||||
import shutil
|
||||
import asyncio
|
||||
from core.providers.tts.dto.dto import ContentType
|
||||
from core.providers.tts.dto.dto import SentenceType
|
||||
from core.handle.sendAudioHandle import send_stt_message
|
||||
from core.utils.util import remove_punctuation_and_length
|
||||
from core.providers.tts.dto.dto import ContentType, InterfaceType
|
||||
|
||||
|
||||
TAG = __name__
|
||||
@@ -40,6 +39,10 @@ async def checkWakeupWords(conn, text):
|
||||
enable_wakeup_words_response_cache = conn.config[
|
||||
"enable_wakeup_words_response_cache"
|
||||
]
|
||||
"""是否用的是非流式tts"""
|
||||
if conn.tts and conn.tts.interface_type != InterfaceType.NON_STREAM:
|
||||
return False
|
||||
|
||||
"""是否开启唤醒词加速"""
|
||||
if not enable_wakeup_words_response_cache:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user