pcm模式,同步其他asr

This commit is contained in:
玄凤科技
2025-05-07 11:34:29 +08:00
parent bde260b330
commit ba86b34a8c
6 changed files with 24 additions and 6 deletions
@@ -65,7 +65,10 @@ class ASRProvider(ASRProviderBase):
return None, file_path
# 将Opus音频数据解码为PCM
pcm_data = self.decode_opus(opus_data)
if self.audio_format == "pcm":
pcm_data = opus_data
else:
pcm_data = self.decode_opus(opus_data)
combined_pcm_data = b"".join(pcm_data)
# 判断是否保存为WAV文件