ImportError: No module named 'speech_recognition' 如果我跑: python -m speech_recognition 在终端中,它仅在终端中运行,我可以与它交谈并且它几乎不在现场,但它能听到我的声音并且可以解释一些单词。我已经从该站点说明下载了终端中的所有软件包。 https://pypi.python.org/pypi/SpeechRecognition/ 当我在 IDLE ...
PocketSphinx-Pythonwheel packagesfor 64-bit Python 2.7, 3.4, and 3.5 on Windows are included for convenience, under thethird-party/directory. To install, simply runpip install wheelfollowed bypip install ./third-party/WHEEL_FILENAME(replacepipwithpip3if using Python 3) in the SpeechRecognition f...
The easiest way to install this is using pip install SpeechRecognition.Otherwise, download the source distribution from PyPI, and extract the archive.In the folder, run python setup.py install.RequirementsTo use all of the functionality of the library, you should have:Python 3.8+ (required) Py...
I want to convert speech to text in real time using the module SpeechRecognition 3.4.6 I've installed everything and now I am trying a simple code from example, here's the code: import speech_recognition as sr r = sr.Recognizer() with sr...
首先需要下载音频文件(https://github.com/realpython/python-speech-recognition/tree/master/audio_files),保存到 Python 解释器会话所在的目录中。 AudioFile 类可以通过音频文件的路径进行初始化,并提供用于读取和处理文件内容的上下文管理器界面。 支持文件类型 ...
# importing the module import speech_recognition as sr # define the recognizer r = sr.Recognizer() # define the audio file audio_file = sr.AudioFile('test.wav') # speech recognition with audio_file as source: r.adjust_for_ambient_noise(source) ...
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/david/real_python/speech_recognition_primer/venv/lib/python3.5/site-packages/speech_recognition/__init__.py", line 858, in recognize_google if not isinstance(actual_result, dict) or len(actual_result.ge...
# importing the module import speech_recognition as sr # define the recognizer r = sr.Recognizer() # define the audio file audio_file = sr.AudioFile('test.wav') # speech recognition with audio_file as source: r.adjust_for_ambient_noise(source) audio = r.record(source) result = r.reco...
Appendix: Recognizing Speech in Languages Other Than English Remove ads Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: Speech Recognition With Python Have you ever wondered how to add ...
File "<stdin>", line1,in<module>TypeError: recognize_google() missing1required positional argument:'audio_data' 相信你已经猜到了结果,怎么可能从空文件中识别出数据呢? 这7 个 recognize_*() 识别器类都需要输入 audio_data 参数,且每种识别器的 audio_data 都必须是 SpeechRecognition 的 AudioData 类...