Dec-29-2018, 10:01 PM
(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