Python Forum
portaudio installation on windows 10
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
portaudio installation on windows 10
#1
Hi everyone!

I'm new to python but already have learned about speech recognition. I want to use pyAudio class but the problem is when I'm calling it in a python file the console returns the message " Please build and install the PortAudio Python bindings first. "ow

please help me how to fix this problem . I've searched in sites but didn't find the answer.
thank you.
Reply
#2
you should be able to install pyaudio with pip:
pip install pyaudio # for python 3 may need to use pip3 install pyaudio
Reply
#3
For 3.7 it try to compile,for 3.6 it's get wheel as it should.
For 3.7 use wheel at Gohlke.
# Check pip,the newest is 18.1(python -m pip install --upgrade pip setuptools wheel) C:\ λ pip -V pip 18.1 from c:\python37\lib\site-packages\pip (python 3.7) # Install the wheel(.whl) file,64-bit Python use amd64.whl C:\ λ pip install PyAudio-0.2.11-cp37-cp37m-win32.whl Processing c:\pyaudio-0.2.11-cp37-cp37m-win32.whl Installing collected packages: PyAudio Successfully installed PyAudio-0.2.11
If pip don't work look at Python 3.6/3.7 and pip installation under Windows.
Reply
#4
thank you for answering
my problem now is not installing pyaudio library it's now "building and installing the PortAudio Python bindings"
Reply
#5
(Dec-29-2018, 08:30 PM)nima Wrote: my problem now is not installing pyaudio library it's now "building and installing the PortAudio Python bindings"
The wheel is already build link.
Quote:pip will fetch and install PyAudio wheels (prepackaged binaries).
These binaries include PortAudio v19 v190600_20161030, built with MinGW. They support only the Windows MME API

So test:
>>> import pyaudio >>> >>> pyaudio.__version__ '0.2.11'
Testing there example script:
py_au.py:
"""PyAudio Example: Play a WAVE file.""" import pyaudio import wave import sys CHUNK = 1024 if len(sys.argv) < 2: print("Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0]) sys.exit(-1) wf = wave.open(sys.argv[1], 'rb') p = pyaudio.PyAudio() stream = p.open(format=p.get_format_from_width(wf.getsampwidth()), channels=wf.getnchannels(), rate=wf.getframerate(), output=True) data = wf.readframes(CHUNK) while data != '': stream.write(data) data = wf.readframes(CHUNK) stream.stop_stream() stream.close() p.terminate()
It's a command line script so from cmd or cmder.
E:\div_code\new λ python py_au.py Alarm.wav
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Windows 10 Installation failing (0x80070005) AdaptedLogic 4 8,665 Dec-31-2020, 07:39 AM
Last Post: caleb_cruze
  Kivy pip installation problem (windows 10) sebastian 1 5,859 Dec-10-2019, 04:00 PM
Last Post: snippsat
  [Python 3.6.4/Windows] Problem with module installation and SSL didier31 3 23,629 Feb-20-2018, 08:57 PM
Last Post: sparkz_alot
  Python 3.6 installation on Windows 10 Python72 7 10,908 Jan-11-2017, 11:59 PM
Last Post: Python72
  Python 3.6.0 PyLauncher Installation on Windows 10 twv 6 16,901 Dec-26-2016, 09:05 PM
Last Post: sparkz_alot

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.