mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
重构所有ASR提供商的speech_to_text方法,将重复的音频解码、合并和文件保存逻辑提取到基类的speech_to_text_wrapper中。引入AudioArtifacts数据类封装PCM帧、字节数据、文件路径和临时路径,简化各提供商实现。移除各提供商中的冗余文件清理代码,由基类统一处理。 新增requires_file()和prefers_temp_file()方法允许提供商声明文件需求,优化内存和磁盘使用。保持接口兼容性的同时提高代码复用性和可维护性。 |
||
|---|---|---|
| .. | ||
| dto | ||
| aliyun.py | ||
| aliyun_stream.py | ||
| aliyunbl_stream.py | ||
| baidu.py | ||
| base.py | ||
| doubao.py | ||
| doubao_stream.py | ||
| fun_local.py | ||
| fun_server.py | ||
| openai.py | ||
| qwen3_asr_flash.py | ||
| sherpa_onnx_local.py | ||
| tencent.py | ||
| utils.py | ||
| vosk.py | ||
| xunfei_stream.py | ||