Doubao asr (#117)

* 添加豆包在线 ASR (#82)
---------
Co-authored-by: 胡垚 <qsct9501@163.com>
This commit is contained in:
欣南科技
2025-02-23 14:38:21 +08:00
committed by GitHub
co-authored by 胡垚
parent f054f66d92
commit 6c3fbd7a8f
25 changed files with 742 additions and 689 deletions
+5 -1
View File
@@ -7,6 +7,7 @@ from core.utils import asr, vad, llm, tts
TAG = __name__
class WebSocketServer:
def __init__(self, config: dict):
self.config = config
@@ -21,7 +22,10 @@ class WebSocketServer:
self.config["VAD"][self.config["selected_module"]["VAD"]]
),
asr.create_instance(
self.config["selected_module"]["ASR"],
self.config["selected_module"]["ASR"]
if not 'type' in self.config["ASR"][self.config["selected_module"]["ASR"]]
else
self.config["ASR"][self.config["selected_module"]["ASR"]]["type"],
self.config["ASR"][self.config["selected_module"]["ASR"]],
self.config["delete_audio"]
),