portaudio

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 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,

Please build and install the PortAudio Python bindings first

心不动则不痛 提交于 2019-12-13 02:58:32
问题 i already installed pyaudio but the problem is when i work with the microphone functions import speech_recognition as sr r = sr.Recognizer() mic = sr.Microphone() the problem is in the third line mic = sr.Microphone() the terminal will give me this message Please build and install the PortAudio Python bindings first. and if i try to install pip install PortAudio it will give me the following message Could not find a version that satisfies the requirement PortAudio (from versions: )No matching

Generate sine wave to play middle C using PortAudio

落爺英雄遲暮 提交于 2019-12-13 00:53:30
问题 I am having trouble generating specific frequencies in PortAudio, whenever I try and change the frequency inside of the sin(n * FREQ * 2 * PI / SAMPLE_RATE) the frequency remains the same however the sound does seem to change in timbre, the higher the frequency value I put in there the uglier the sound, yet the same frequency. This is what I have in my patestCallback loop: static int patestCallback( const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, const

PyAudio IOError: [Errno Invalid input device (no default output device)] -9996

懵懂的女人 提交于 2019-12-12 13:03:30
问题 I am attempting to run a simple python file that uses pyaudio to record input. However whenever I run this file I end up with this error. I had it working once and I have no idea what changed. I have tried import pyaudio pa = pyaudio.PyAudio() print(pa.get_device_count()) 0 So I am seeing that it does not detect any valid devices. Is there anyway to specify to pyaudio/portaudio where to look for my input devices. I am running elementary os freya. Any help would be appreciated! 回答1: Silly as

[portaudio]Transmit and Detect frequency - Windows

我的未来我决定 提交于 2019-12-12 06:36:50
问题 I'm new to portaudio and i looked at "How to extract frequency..." question but still i would like to have some help. i need to transmit a frequency (using the speakers) and then i would like to check if this frequency was transmitted (catching it in the microphone), of course that i would like to use portaudio for the sending and detecting. also,i have no idea how to use the fft for detection because i saw the record example and they use a SAMPLE data type and with this data type they can

Feeding input stream from PortAudio to webrtc::AudioProcessing

自作多情 提交于 2019-12-12 01:28:20
问题 I'm using the cygwin package libwebrtc-audio-processing-devel-0.3-1 for an implementation of the AudioProcessing classes from webrtc. I'm reading input in from my microphone using PortAudio, and want to pass this to webrtc for a VAD check, however I don't know how to pass my data to the ProcessStream methods. #define SAMPLE_RATE (32000) #define FRAMES_PER_BUFFER (320) #define PA_SAMPLE_TYPE paFloat32 #define SAMPLE_SIZE (4) ... err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER ); //

PyAudio Wheel is Unsupported?

强颜欢笑 提交于 2019-12-11 19:35:52
问题 PyAudio. It's been a well-known problem for a while now that when installing PyAudio, you can't do pip install PyAudio , because it will tell you that it couldn't find portaudio.h . So, as you go on your journey to be taught by some Indian guy on YouTube, you realize that all the videos say the same thing: you have to manually install the wheel (https://pypi.org/project/PyAudio/#files), by downloading it, then doing pip install <path-to-wheel> . However, as of September 2019, this method no