我正在尝试用PyAudio记录扬声器输出。我安装了,它声称允许录制系统输出。我不认为这是问题,但我可能错了。
码
import pyaudio
p = pyaudio.PyAudio()
stream = p.open(
format=pyAudio.paInt16,
channels=1,
rate=44100,
input=True,
frames_per_buffer=2048
)
# code to do stuff with stream.read(), not relevant here
误差
||PaMacCore (AUHA
我正在使用VSCode编辑器,我想安装PyAudio,但是它产生了一些错误。 我试图安装PyAudio的轮子,但是编译器说是ERROR: PyAudio-0.2.11-cp310-cp310-win32.whl is not a supported wheel on this platform。我使用的是python 3.9。 如何安装PyAudio?
我正在尝试从PowerShell(vscode)安装py音频,但是我遇到了错误。
pip install pyaudio
我编写了上面的代码来安装库。
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) … error
ERROR: Command errored out with exit status 1:
command:
我正试图用M1芯片在我的Macbook上导入语音。我有python版本3.9.6和anaconda (python 3.8),现在终端上使用的版本是3.9.6。
在我得到这个错误之前,我修复了'brew安装端口音频‘和'pip Installypy音频’问题。波特兰和皮亚德安装良好!但当我尝试进口吡喃时,
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "/Users/hson/Desktop/k.A.I_speak
这就是我在安装PyAudio时所面临的问题,我还安装了visual c++来解决这个问题,但没有成功 C:\Users\prasun\Desktop>pip install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit
我想做的是
pip install Pyaudio
但我知道这个错误:
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
running bdist_wh
无法安装py音频: pip使用pycharm安装py音频
现在错误已经更改为此,列出了模块(PyAudio-0.2.11.tar.gz),但是它返回一个错误(ERROR: Command errored out with exit status 1:):
(venv) C:\Users\admin\PycharmProjects\pythonProject2>pip install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py insta
我是linux的新手,我正在设置我的代码(在代码中,我试图从用户那里获取音频输入并将其更改为文本)。安装py音频.when时遇到问题--我尝试安装py音频(by pipwin install pyaudio)--如下所示
'''/home/sahil/.var/app/com.jetbrains.PyCharm-Community/data/python/lib/python3.9/site-
packages/pipwin/command.py:66: UserWarning: Found a non Windows system. Package
insta
我正在运行: pip install PyAudio 我得到以下输出: C:\Users\graymouse\PycharmProjects\EmailBot>pip install PyAudio
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for PyAudio, since package 'wheel' is not installed.
Installing collected packages:
我一直试图使用PyAudio在vs代码上安装pipwin install PyAudio,但我得到了一个
ERROR: PyAudio-0.2.11-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.
错误。
PS C:\Users\Alyoshka\OneDrive\Documents\Project> pipwin install PyAudio
Package `pyaudio` found in cache
Downloading package . . .
https://download.l
我想安装软件包PyAudio,我已经从下载了Microsoft Visual C++
pip install PyAudio
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for PyAudio, since package 'wheel' is not installed.
Installing collected packages: PyAudio
Running setup.py install for
因此,我最近尝试在我的系统中安装PyAudio模块,因为语音识别模块需要它,但是当我在cmd或任何命令提示符/powershell中键入以下命令时: pip install PyAudio,它将返回:
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: PyAudio
Building wheel for PyAudio (setup.py) ... error
ERROR: Command errored out with exi
在通过终端的python venv中,我尝试使用pip install pyaudio安装py音频。我继续得到以下错误:
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyau
当前使用的Visual Studio代码已尝试使用pip安装pyaudio但它只是给出了一个错误,如下所示: PS C:\Users\NIKHIL> pip install pyaudio
Defaulting to user installation because normal site-packages is
not writeable
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building
Collecting Pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for Pyaudio, since package 'wheel' is not installed.
Installing collected packages: Pyaudio
Running setup.py install for Pyaudio ... error
ERROR: Command errored out with exit stat
当我试图安装py音频时,会出现以下错误:-请帮助我
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with ex
我的代码:
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print("talk")
audio_text = r.listen(source)
print("time over")
try:
text = r.recognize_google(audio_text)
print("converting the audio text into transrip
当我试图通过PyCharm在OSX上安装这个软件包时,我得到了一个错误。找不到解决办法,希望这里有人能给我一些建议。
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for PyAudio, since package 'wheel' is not installed.
Installing collected packages: PyAudio
Running setup.py install for PyAudio: s
我正在尝试安装PyAudio包,如下面的链接:所描述的。
我到这个站点安装PyAudio:。我安装了PyAudio-0.2.11-cp38-cp38-winamd64.whl
根据以下文档,这是必要的:
然后,为了安装PyAudio,我使用了命令"pip -0.2.11-cp38-cp38-winamd64.whl“,它成功地安装了模块。
问题是,当我尝试在PyCharm中运行这一行代码时:
import speech_recognition as sr
r = sr.Recognizer()
mic = sr.Microphone()
我知道这个错误:
AttributeError:
这不是代码(我在google上看过所有的东西,我有最新版本的pip,python,pycharm,我安装了微软的视觉工作室C++,pip安装pipwin然后pipwin安装py音频--所有这些都安装得很好,没有任何错误)只是我的Pycharm出于某种原因不接受这个包。有什么想法吗?
这是Pycharm“可用包”中的错误消息
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: PyAudio
Building wheel for Py
我安装了pyaudio和anaconda python。在windows上使用conda install pyaudio。该公司表示,它安装了PortAudio,并与之一起安装了and。
然而,当我现在创建我的文件并运行它时,我得到了以下问题。
我不知道发生了什么。
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "C:\Users\This PC\Desktop\Py\demo.py", line 2, in <mo
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully
我下载了PyAudio-0.2.11-cp39-cp39-win_amd64包并将其复制到python3.9目录中的脚本文件中,但是当我尝试安装该包时,pip抛出了错误
ERROR: No matching distribution found for PyAudio-0.2.11-cp39-cp39-win_amd64
我尝试将pip升级为我在Stack中找到的解决方案:
pip install --upgrade pip
然后: pip install PyAudio-0.2.11-cp39-cp39-win_amd64
但是pip总是失败,并出现this错误:
ERROR: Could
我试图在macOS上用python构建一个语音到文本的识别(请不要在这里发布关于Windows设备的建议)。
我试图使用SpeechRecognition示例代码并开发我的应用程序,但是每次我试图运行该代码时,我都会得到以下错误:
OSError: Errno -9986内部PortAudio错误
我已经在brew install portaudio和PyAudio以及pip3 install pyaudio中安装了PyAudio。
下面是示例代码:
import speech_recognition as sr
# obtain audio from the microphone
r
我正在尝试在Python3.7上安装PyAudio。
问题是,当我尝试一个简单的import pyaudio时,它会打印:
Please build and install the PortAudio Python bindings first.
根据的说法,这个问题可以通过下载二进制文件并安装轮子来解决。
但是,pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl仅显示:
Cannot uninstall 'PyAudio'. It is a distutils installed project and thus we ca
sudo -H pip install pyaudio --global-option="build_ext" --global-option="-I/opt/homebrew/include" --global-option="-L/opt/homebrew/lib"
WARNING: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
Collecting pyaudio
Downloa
我的默认操作系统是ArchLinux,其上安装的Python是3.1。我使用aur安装了3.9版本,但我不知道默认情况下如何将这个版本的Python系统化并为它安装pip,因为当我尝试使用pip时,我会得到以下消息:
$ python3.9 -m pip
/usr/bin/python3.9: No module named pip
我正在尝试import pyaudio,我使用命令brew install portaudio安装了portaudio,我使用pip安装了pyaudio,现在我正在尝试import pyaudio,python显示了错误
Could not import the PyAudio C module '_portaudio'
现在,当我尝试按照答案的说明进行操作时
portaudio tar没有安装文件
我能做什么?
Python: 3.4
操作系统: Mac OSX机长