merge asr interface conflicts

This commit is contained in:
xiehao.0527 2025-06-16 21:13:10 +08:00
parent 40ab0d5a6d
commit 1b1ce1c8a2
2 changed files with 3 additions and 3 deletions

View file

@ -146,14 +146,14 @@ class ASRProvider(ASRProviderBase):
yield data[offset:data_len], True
async def speech_to_text(
self, opus_data: List[bytes], session_id: str
self, opus_data: List[bytes], session_id: str, audio_format="opus"
) -> Tuple[Optional[str], Optional[str]]:
"""将语音数据转换为文本"""
file_path = None
try:
# 合并所有opus数据包
if self.audio_format == "pcm":
if audio_format == "pcm":
pcm_data = opus_data
else:
pcm_data = self.decode_opus(opus_data)

View file

@ -21,7 +21,7 @@ cozepy==0.12.0
mem0ai==0.1.62
bs4==0.0.2
modelscope==1.23.2
sherpa_onnx==1.11.0
sherpa_onnx==1.11.6
mcp==1.8.1
cnlunar==0.2.0
PySocks==1.7.1