我試圖在我的一個程序中實現語音識別,並已決定使用SpeechRecognition 1.1.3庫來實現此目的。Python 3.4 SpeechRecognition 1.1.3錯誤
,我嘗試運行的代碼,以及相關的錯誤是這樣的:
>>> r = sr.Recognizer()
>>> with sr.Microphone() as source: # use the default microphone as the audio source
... audio = r.listen(source) # listen for the first phrase and extract it into audio data
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "C:\Python34\lib\site-packages\speechrecognition-1.1.3-py3.4.egg\speech_recognition\__init__.py", line 201, in listen
return AudioData(source.RATE, self.samples_to_flac(source, frame_data))
File "C:\Python34\lib\site-packages\speechrecognition-1.1.3-py3.4.egg\speech_recognition\__init__.py", line 124, in samples_to_flac
if system == "Windows" and platform.machine() in set("i386", "x86", "x86_64", "AMD64"): # Windows NT, use the bundled FLAC conversion utility
TypeError: set expected at most 1 arguments, got 4
我已經經歷了並下載所需的每一個下載的正確版本。 我已經廣泛搜索它,一直沒能找到一個原因。 這和另一個阻止我轉錄特定Wav文件的錯誤阻礙了我的項目,所以如果有人能夠幫助,我將不勝感激。
我運行Windows 8.1