Questions tagged [pyaudio]

PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library.

PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library. With PyAudio, you can easily use Python to play and record audio streams on a variety of platforms (e.g. GNU/Linux, Microsoft Windows and Mac OS X).

Sources:

  1. http://pypi.python.org/pypi/PyAudio/
  2. http://people.csail.mit.edu/hubert/pyaudio/
1375 questions
0
votes
1 answer

Get amplitude range from input device using PortAudio / PyAudio

I'm using PyAudio (which is just a Python wrapper for PortAudio) to register auditory responses from users; I want to create a little calibration animation involving a dot that dynamically grows and shrinks in response to the peak amplitude over a…
Jonline
  • 1,677
  • 2
  • 22
  • 53
0
votes
1 answer

Recording, streaming and recieving audio over a LAN with python

I'm looking into coding a very simple LAN based home monitoring system using python 2.7 on Windows. I have a number of computers around the house each with a usb webcam attached. The cameras have built in microphones. I'm looking for the best way…
Blastdav
  • 21
  • 5
0
votes
0 answers

Reading data in PyAudio

I've looked at all the example code but can't seem to read audio from my RME card using PyAudio. here is the code I'm using: import wave import scipy.io.wavfile as waveIO from __future__ import division import pyaudio import…
0
votes
1 answer

PyAudio no default output device

I'm having trouble getting pyaudio working on an Ubuntu machine (trusty). Trying to use the blocking wave-player code on the pyaudio documentation page I get: Cannot connect to server socket err = No such file or directory Cannot connect to server…
jdbrody
  • 533
  • 7
  • 16
0
votes
0 answers

PyAudio issues with AudioPort PYD

I'm trying to put PyAudio on Windows (yes, I know. It is the worst trying to do such) and I've hit a wall. I'm using Python 3.4 64 bit on Windows 10. Knowing the issues with PyAudio's Windows support I downloaded the Windows binary from…
Obj3ctiv3_C_88
  • 1,478
  • 1
  • 17
  • 29
0
votes
2 answers

Where can I find getLevel()?

In the code below is using getLevel(). where can I find it (it is about sound, and it run with pyaudio library) # this is the threshold that determines whether or not sound is detected THRESHOLD = 0 #open your audio stream # wait until the…
CarolusPl
  • 639
  • 4
  • 9
  • 18
0
votes
0 answers

Record voice on Virtual Machine, which lacks some drivers

From this source code import pyaudio import wave import os CHUNK = 1024 FORMAT = pyaudio.paInt16 #paInt8 CHANNELS = 2 RATE = 44100 #sample rate RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = "output.wav" p = pyaudio.PyAudio() stream =…
Baimyrza Shamyr
  • 449
  • 1
  • 6
  • 17
0
votes
3 answers

Pip not Recognised in CMD

I have installed Python Pip for the purpose of installing Pyaudio. I have downloaded PyAudio‑0.2.8‑cp26‑none‑win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio and placed it in my desktop. Here is the CMD log. C:\Users\Shadow Mori>…
Jack Brand
  • 13
  • 2
  • 2
  • 7
0
votes
1 answer

Using Pyaudio Callback Methods in a User-Defined Class

I think this very likely just me being stupid, but I'm trying to create a user-defined class which has user-defined callback functions to use with pyaudio. Here's what I have: class asoa_io: def write_callback(self): def…
jdbrody
  • 533
  • 7
  • 16
0
votes
1 answer

Python real time audio mixing

I'm using scapy and pyaudio to play a short length of sine wave every time a packet is sent or received, with the frequency of the sound indicating the sender address. sniff(prn = makeSound) In this code, the makeSound function takes a packet,…
is8ac
  • 13
  • 3
0
votes
0 answers

pyaudio how to play a wav while one is playing already?

For example, I want to be able to play a wav file but when the user presses say the space bar, that audio file terminates and a new one starts playing.
0
votes
2 answers

Pyaudio recognizer error cannot find path

I have written a basic program that uses pyttsx, speechrecognition and tkinter libraries basically. I have a function like as follows. def dunno(): with sr.Microphone() as source: audio = r.listen(source) try: print('1') …
uhuuyouneverknow
  • 403
  • 2
  • 6
  • 14
0
votes
1 answer

separate frequencies from music

i want to print separate frequency present in a music file. if freq amp is grater than threshold. then it will brinted. import pyaudio import wave import numpy as np chunk = 2048 wf = wave.open('/home/pi/music.wav', 'rb') swidth =…
Akash Nil
  • 693
  • 10
  • 26
0
votes
0 answers

Why do some Python packages work in CGI apps but not others?

I am trying to write a python script that will record some sound when called from a browser. I am using XAMPP on my macbook pro as a test server. Pyaudio is the package I am using to collect the sound samples. I ran the installer for it and can…
0
votes
1 answer

Raw numpy array from real-time network audio stream in Python

I would like to get raw data (optimally as a numpy array) from a PCM network audio stream for which I have an URL. The goal is to analyze the signal from the network stream in real-time. There seem to be a lot of Python audio modules or wrappers…
Andrzej Pronobis
  • 33,828
  • 17
  • 76
  • 92