vs代码中语音识别pyaudio问题 self.pyaudio_module = self.get_pyaudio()

发布于 2025-01-09 02:38:30 字数 1153 浏览 0 评论 0原文

我正在尝试将演讲实现为文本,以便它对我的下一个项目有所帮助。

那么你能帮我进行语音识别吗?

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 108, in get_pyaudio
    import pyaudio
ModuleNotFoundError: No module named 'pyaudio'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\user\Desktop\PYTHON\Assisstent\speech.py", line 27, in <module>
    takecommand()
  File "c:\Users\user\Desktop\PYTHON\Assisstent\speech.py", line 9, in takecommand
    with sr.Microphone() as source:
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 79, in __init__       
    self.pyaudio_module = self.get_pyaudio()
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 110, in get_pyaudio   
    raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
PS C:\Users\user\Desktop\PYTHON\Assisstent>

I was trying to implement the speech to text so that it will help in my next project.

So could you please help me with speech recognition?

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 108, in get_pyaudio
    import pyaudio
ModuleNotFoundError: No module named 'pyaudio'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\user\Desktop\PYTHON\Assisstent\speech.py", line 27, in <module>
    takecommand()
  File "c:\Users\user\Desktop\PYTHON\Assisstent\speech.py", line 9, in takecommand
    with sr.Microphone() as source:
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 79, in __init__       
    self.pyaudio_module = self.get_pyaudio()
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 110, in get_pyaudio   
    raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
PS C:\Users\user\Desktop\PYTHON\Assisstent>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雨落星ぅ辰 2025-01-16 02:38:30

安装pyaudio:

pip install pyaudio

install pyaudio:

pip install pyaudio
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文