From f644682be730c2bac3ad9c8e0ec761b7bfdfa823 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Tue, 28 Mar 2023 10:15:21 +0800 Subject: [PATCH] fix: add voice dependency compatibility #641 --- channel/wechat/wechat_channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channel/wechat/wechat_channel.py b/channel/wechat/wechat_channel.py index c427407..30b3b18 100644 --- a/channel/wechat/wechat_channel.py +++ b/channel/wechat/wechat_channel.py @@ -20,7 +20,6 @@ from common.tmp_dir import TmpDir from config import conf from common.time_check import time_checker from plugins import * -from voice.audio_convert import mp3_to_wav thread_pool = ThreadPoolExecutor(max_workers=8) @@ -272,6 +271,7 @@ class WechatChannel(Channel): msg.download(mp3_path) # mp3转wav wav_path = os.path.splitext(mp3_path)[0] + '.wav' + from voice.audio_convert import mp3_to_wav mp3_to_wav(mp3_path=mp3_path, wav_path=wav_path) # 语音识别 reply = super().build_voice_to_text(wav_path)