[voice] add support for whisper-1 model

This commit is contained in:
wanggang
2023-03-08 11:32:27 +08:00
parent 882e6c3576
commit d7a8854fa1
4 changed files with 13 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ wechat channel
"""
import os
import pathlib
import itchat
import json
from itchat.content import *
@@ -37,11 +38,11 @@ def handler_single_voice(msg):
class WechatChannel(Channel):
tmpFilePath = './tmp/'
tmpFilePath = pathlib.Path('./tmp/')
def __init__(self):
isExists = os.path.exists(self.tmpFilePath)
if not isExists:
pathExists = os.path.exists(self.tmpFilePath)
if not pathExists and conf().get('speech_recognition') == True:
os.makedirs(self.tmpFilePath)
def startup(self):