Python Forum
portaudio installation on windows 10
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
portaudio installation on windows 10
#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


Messages In This Thread
portaudio installation on windows 10 - by nima - Dec-15-2018, 01:53 PM
RE: portaudio installation on windows 10 - by nima - Dec-29-2018, 08:30 PM
RE: portaudio installation on windows 10 - by snippsat - Dec-29-2018, 10:01 PM

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

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020