mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 10:03:54 +08:00
在不增加额外配置的情况下进行优化
This commit is contained in:
@@ -430,9 +430,9 @@ class ConnectionHandler:
|
|||||||
def _initialize_voiceprint(self):
|
def _initialize_voiceprint(self):
|
||||||
"""为当前连接初始化声纹识别"""
|
"""为当前连接初始化声纹识别"""
|
||||||
try:
|
try:
|
||||||
voiceprint_enable = self.config.get("voiceprint", {}).get("enable", False)
|
voiceprint_config = self.config.get("voiceprint", {})
|
||||||
if voiceprint_enable:
|
if voiceprint_config:
|
||||||
voiceprint_provider = VoiceprintProvider(self.config.get("voiceprint", {}))
|
voiceprint_provider = VoiceprintProvider(voiceprint_config)
|
||||||
if voiceprint_provider is not None and voiceprint_provider.enabled:
|
if voiceprint_provider is not None and voiceprint_provider.enabled:
|
||||||
self.voiceprint_provider = voiceprint_provider
|
self.voiceprint_provider = voiceprint_provider
|
||||||
self.logger.bind(tag=TAG).info("声纹识别功能已在连接时动态启用")
|
self.logger.bind(tag=TAG).info("声纹识别功能已在连接时动态启用")
|
||||||
|
|||||||
Reference in New Issue
Block a user