浏览代码

fix: add voice dependency compatibility #641

master
zhayujie 1年前
父节点
当前提交
f644682be7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      channel/wechat/wechat_channel.py

+ 1
- 1
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)


正在加载...
取消
保存