pyaudio

Pyaudio, portaudio and mac 10.7.5

冷暖自知 提交于 2019-12-21 05:45:13
问题 I'm having trouble installing pyaudio correctly. I have a virtualenv set up for the project. I first tried to install portaudio: sudo port install portaudio which returns: ---> Cleaning portaudio ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. I assume that means it ran fine. Then I tried: pip install pyaudio Which returns: Downloading/unpacking pyaudio Running setup.py egg_info for package pyaudio warning: no files found matching '*.c' under directory 'test'

Get an audio sample as float number from pyaudio-stream

六月ゝ 毕业季﹏ 提交于 2019-12-19 07:52:49
问题 As I am currently about to build a device based on a Raspberry Pi for measuring some stuff from noise recorded with a sound card (e.g. variance), and trying to do this within python, I got stuck figuring out how to get a an audiosample as float-number for further calculations. What did I do: Took a Line-In-to-chinch-adapter and touching the plugs for generating some sort of test signal. Recording to for example Audacity or Matlab shows plausible results, like What I want to get: In ideal, I

pyaudio could not import _portaudio

荒凉一梦 提交于 2019-12-19 02:31:35
问题 Trying to run python app that uses pyaudio. Using virtualenv and installations are working. However when running it can't find portaudio. But the _portaudio.so file exists. Any suggestions??? (venv) kidkic@pi-mirror1:~/audio $ jasper/jasper.py Could not import the PyAudio C module '_portaudio'. Traceback (most recent call last): File "jasper/jasper.py", line 31, in <module> from client.mic import Mic File "/home/kidkic/audio/jasper/client/mic.py", line 9, in <module> import pyaudio File "

pyaudio could not import _portaudio

旧巷老猫 提交于 2019-12-19 02:31:21
问题 Trying to run python app that uses pyaudio. Using virtualenv and installations are working. However when running it can't find portaudio. But the _portaudio.so file exists. Any suggestions??? (venv) kidkic@pi-mirror1:~/audio $ jasper/jasper.py Could not import the PyAudio C module '_portaudio'. Traceback (most recent call last): File "jasper/jasper.py", line 31, in <module> from client.mic import Mic File "/home/kidkic/audio/jasper/client/mic.py", line 9, in <module> import pyaudio File "

Time between callback calls?

烈酒焚心 提交于 2019-12-18 17:27:44
问题 I have a lab project that uses mainly PyAudio and to further understand its way of working I made some measurements, in this case time between callbacks (using callback mode). I timed it, and got an interesting result (@256 chunk size, 44.1k fs): 0.0099701;0.0000365;0.0000201;0.0201579 This pattern goes on and on. Between two longer calls, we have two shorter calls and sometimes the longer call is shorter (mind you I don't do anything else in the program than time the callbacks) . If we

How to play an audiofile with pyaudio?

 ̄綄美尐妖づ 提交于 2019-12-18 17:21:28
问题 I do not understand the example material for pyaudio. It seems they had written an entire small program and it threw me off. How do I just play a single audio file? Format is not an issue, I just want to know the bare minimum code I need to play an audio file. 回答1: The example seems pretty clear to me. You simply save the example as playwav.py call: python playwav.py my_fav_wav.wav The wave example with some extra comments: import pyaudio import wave import sys # length of data to read. chunk

Audio Frequencies in Python

空扰寡人 提交于 2019-12-18 06:57:33
问题 I'm writing a code to analyse a single audio frequency sung by a voice. I need a way to analyse the frequency of the note. Currently I am using PyAudio to record the audio file, which is stored as a .wav , and then immediately play it back. import numpy as np import pyaudio import wave # open up a wave wf = wave.open('file.wav', 'rb') swidth = wf.getsampwidth() RATE = wf.getframerate() # use a Blackman window window = np.blackman(chunk) # open stream p = pyaudio.PyAudio() stream = p.open

How do I get a list of my device's audio sample rates using PyAudio or PortAudio?

拟墨画扇 提交于 2019-12-18 05:59:06
问题 I'd like to query my audio device and get all its available sample rates. I'm using PyAudio 0.2, which runs on top of PortAudio v19, on an Ubuntu machine with Python 2.6. 回答1: In the pyaudio distribution, test/system_info.py shows how to determine supported sample rates for devices. See the section that starts at line 49. In short, you use the PyAudio.is_format_supported method, e.g. devinfo = p.get_device_info_by_index(1) # Or whatever device you care about. if p.is_format_supported(44100.0,

How do I install PyAudio on Python 3.7?

China☆狼群 提交于 2019-12-17 19:05:42
问题 I am currently trying to install PyAudio on Python 3.7 but when I use the command "pip install pyaudio ", an error message appear: "command 'cl.exe' failed: No such file or directory". I have already tried to modify the PATH but it doesn't worked. I though maybe someone could help me ? Thank you :) 回答1: Download the wheel on this site https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio. Choose PyAudio‑0.2.11‑cp37‑cp37m‑win32.whl if you use 32 bit, or PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl

I can't install pyaudio on my python? How to do it?

Deadly 提交于 2019-12-17 15:57:25
问题 I have a windows 10 pc and i want to install pyaudio to use it with my chatbot, powered by chatterbot, i try with 2 different ways to install pyaudio. The way is in writing on command prompt python -m pip install PyAudio That is the result: C:\Users\Waaberi>python -m pip install PyAudio Collecting PyAudio Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz Installing collected packages: PyAudio Running