• 2024-12-26使用vosk模型进行语音识别
    importwaveimportsysimportjsonfromvoskimportModel,KaldiRecognizer,SetLogLevel#Youcansetloglevelto-1todisabledebugmessagesSetLogLevel(-1)wf=wave.open(sys.argv[1],"rb")ifwf.getnchannels()!=1orwf.getsampwidth()!