pyaudio

PyAudio does not work and breaks sound on ubuntu

谁说我不能喝 提交于 2019-11-29 06:58:06
Ok, so I installed pyaudio from the package python-pyaudio using apt-get , now when I Import and Invoke as follows: Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pyaudio >>> p= pyaudio.PyAudio() ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable ALSA

PyAudio IOError: No Default Input Device Available

帅比萌擦擦* 提交于 2019-11-29 02:56:58
I'm using PyAudio under the Enthought Python Distribution (Python 2.6.6) in Ubuntu 10.10 x64. >>> import pyaudio >>> pa = pyaudio.PyAudio() >>> pa.get_default_input_device_info() Traceback (most recent call last): File "<pyshell#24>", line 1, in <module> pa.get_default_input_device_info() File "/usr/lib/python_epd/lib/python2.6/site-packages/pyaudio.py", line 936, in get_default_input_device_info device_index = pa.get_default_input_device() IOError: No Default Input Device Available This is the same error I get if I try to open an input stream. There is the corresponding error "IOError: No

Python pocketsphinx RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly

折月煮酒 提交于 2019-11-28 23:43:48
I am trying to make a Python app that can record audio and translate it into english text using PyAudio, SpeechRecognition and PocketSphinx. I'm running on a Mac OS X El Capitan, version 10.11.2. Following a tutorial like this one and others, I've downloaded PyAudio version 0.2.9, SpeechRecognition as well as PocketSphinx. I've installed them into a Conda environment. I have followed the instructions from this site to use brew install swig git python on my OS X, hoping it would help. This is my code: # Load packages import speech_recognition as sr import sphinxbase import pocketsphinx # obtain

how to convert wav file to float amplitude

微笑、不失礼 提交于 2019-11-28 23:23:47
问题 so I asked everything in the title: I have a wav file (written by PyAudio from an input audio) and I want to convert it in float data corresponding of the sound level (amplitude) to do some fourier transformation etc... Anyone have an idea to convert WAV data to float? 回答1: I have identified two decent ways of doing this. Method 1: using the wavefile module Use this method if you don't mind installing some extra libraries which involved a bit of messing around on my Mac but which was easy on

separate frequencies from music

女生的网名这么多〃 提交于 2019-11-28 12:20:38
问题 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 = wf.getsampwidth() RATE = wf.getframerate() window = np.blackman(chunk) p = pyaudio.PyAudio() stream = p.open(format = p.get_format_from_width(wf.getsampwidth()), channels = wf.getnchannels(), rate = RATE, output = True) data = wf.readframes(chunk) while len(data) !=

Python PyAudio installation problems (with PortAudio)

*爱你&永不变心* 提交于 2019-11-28 07:14:56
问题 I'm trying to write a program to record information from my computers microphone an save it to a file. PyAudio seems like one of the better packages for doing this, and they even have a binary for Windows 7 (Python 2.7). I downloaded the executable file and ran it to set up PyAudio, but when I try to import PyAudio into a python script now I get an error: Please build and install the PortAudio Python bindings first. Traceback (most recent call last): File "<pyshell#0>", line 1, in <module>

PyAudio does not work and breaks sound on ubuntu

懵懂的女人 提交于 2019-11-28 00:50:13
问题 Ok, so I installed pyaudio from the package python-pyaudio using apt-get , now when I Import and Invoke as follows: Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pyaudio >>> p= pyaudio.PyAudio() ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate)

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

Deadly 提交于 2019-11-27 22:27:55
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 setup.py install for PyAudio ... error Complete output from command C:\Users\Waaberi\AppData\Local

PyAudio IOError: No Default Input Device Available

[亡魂溺海] 提交于 2019-11-27 22:02:27
问题 I'm using PyAudio under the Enthought Python Distribution (Python 2.6.6) in Ubuntu 10.10 x64. >>> import pyaudio >>> pa = pyaudio.PyAudio() >>> pa.get_default_input_device_info() Traceback (most recent call last): File "<pyshell#24>", line 1, in <module> pa.get_default_input_device_info() File "/usr/lib/python_epd/lib/python2.6/site-packages/pyaudio.py", line 936, in get_default_input_device_info device_index = pa.get_default_input_device() IOError: No Default Input Device Available This is

Convert multi-channel PyAudio into NumPy array

為{幸葍}努か 提交于 2019-11-27 20:53:31
All the examples I can find are mono, with CHANNELS = 1 . How do you read stereo or multichannel input using the callback method in PyAudio and convert it into a 2D NumPy array or multiple 1D arrays? For mono input, something like this works: def callback(in_data, frame_count, time_info, status): global result global result_waiting if in_data: result = np.fromstring(in_data, dtype=np.float32) result_waiting = True else: print('no input') return None, pyaudio.paContinue stream = p.open(format=pyaudio.paFloat32, channels=1, rate=fs, output=False, input=True, frames_per_buffer=fs, stream_callback