pyaudio

UDP sound transfer : played sound have big noise

为君一笑 提交于 2019-12-03 00:16:16
I have no idea how to solve this problem. Please help me :) I would like to send sound data, recorded by one PC, to the other PC and play it. (by UDP) The program might work correctly, but the sound contain(?) uncomfortable noise. when I tried to record & play sound in one program sequence, it worked correctly. There was no noise. In case of using UDP even in one PC, use IP 127.0.0.1, the noise appeared. At first, I thought the factor is because played sound is out in the other PC and I fixed it by making buffer. It solved little noise, but almost all the noise is still remaining. the

Pyaudio How to get sound on only one speaker

旧时模样 提交于 2019-12-02 20:32:25
问题 I'm using pyaudio in a school project and I'm trying to get the sound to play on only one speaker at a time. My code is like this: import pyaudio p = pyaudio.PyAduio() def play_wave(stream, wave): chunks = [] chunks.append(wave) chunk = concatenate(chunks)*0.1 stream.write(chunk.astype(np.float32).tostring()) def play_sound(freq, t, A=0.2): wave, A = wavefunc(t, freq, A=A) S = sigmoid(t) wave = wave*S stream = p.open(channels=1, rate=44100, format=pyaudio.paFloat32, output=True) play_wave

Installing pyaudio on AMD64 from .exe

你。 提交于 2019-12-02 19:17:53
问题 I want to install pyaudio on my Windows 8 x64 machine. I have Python 2.7 x64 installed. Building from source is not an option for me, and anyway I have seen that it failed for others. The Python 2.7 x64 .exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/ is not working. Is there another way to install? Are there any other places to download from? Thanks! 回答1: A very quick Google search yeieded the developers page with downloads. You can try the binary provided there. http://people.csail.mit

pyaudio OSError: [Errno - 9999] Unanticipated host error

让人想犯罪 __ 提交于 2019-12-02 17:52:09
问题 I'm trying to use the microphone of my webcam logitech to listen with sr.Microphone(sample_rate=32000) as source: ... This error occurs : File "/home/pi/project2/interface.py", line 226, in listen with sr.Microphone(sample_rate = 32000) as source: File "/usr/local/lib/python3.4/dist-packages/speech_recognition/ init .py", line 140, in enter input=True, # stream is an input stream File "/usr/local/lib/python3.4/dist-packages/PyAudio-0.2.10-py3.4-linux-armv7l.egg/pyaudio.py", line 750, in open

Pyaudio How to get sound on only one speaker

限于喜欢 提交于 2019-12-02 11:35:59
I'm using pyaudio in a school project and I'm trying to get the sound to play on only one speaker at a time. My code is like this: import pyaudio p = pyaudio.PyAduio() def play_wave(stream, wave): chunks = [] chunks.append(wave) chunk = concatenate(chunks)*0.1 stream.write(chunk.astype(np.float32).tostring()) def play_sound(freq, t, A=0.2): wave, A = wavefunc(t, freq, A=A) S = sigmoid(t) wave = wave*S stream = p.open(channels=1, rate=44100, format=pyaudio.paFloat32, output=True) play_wave(stream,wave) stream.close() where wavefunc just generates a wave. Does anybody know what to do? Right now

Trying to install pyaudio using pip

陌路散爱 提交于 2019-12-02 07:45:06
I try to install pyaudio in pycharm, and I get this error error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2 I used pip install pyaudio command. Copy comment: I downloaded PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl try to install it using this command pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64 but it does not work and get this error ERROR: Could not find a version that satisfies the requirement PyAudio-0.2.11-cp37-cp37m-win_amd64 (from versions: none) ERROR: No matching distribution found for PyAudio-0.2.11-cp37-cp37m-win_amd64

pyAudio failed to install : Windows 10

心不动则不痛 提交于 2019-12-02 04:25:04
问题 When I am trying to install pyAudio using pip install pyaudio I get error. It looks like this : C:\Users\pankajkaun>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\pankajkaun\desktop\python\python.exe -u -c "import setuptools, tokenize;_

pyAudio failed to install : Windows 10

戏子无情 提交于 2019-12-02 02:58:32
When I am trying to install pyAudio using pip install pyaudio I get error. It looks like this : C:\Users\pankajkaun>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\pankajkaun\desktop\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\PANKAJ~1\\AppData\\Local\\Temp\\pip-install-pw8_ueh5\\pyaudio \\setup.py';f=getattr

pyaudio-OSError: [Errno -9999] Unanticipated host error

大城市里の小女人 提交于 2019-12-01 22:30:57
问题 I just want to run a simple python audio code: import pyaudio import wave import sys CHUNK = 1024 wf = wave.open("4.wav", 'rb') # instantiate PyAudio (1) p = pyaudio.PyAudio() # open stream (2) stream = p.open(format=p.get_format_from_width(wf.getsampwidth()), channels=wf.getnchannels(), rate=wf.getframerate(), output=True) but I got the following error: Traceback (most recent call last): File "rec2.py", line 17, in <module> output=True) File "C:\Users\Surena\Anaconda3\lib\site-packages

PyAudio alsa error messages

风格不统一 提交于 2019-12-01 21:44:53
问题 I am receiving error messages every time I play a sound with PyAudio and am having trouble supressing them. ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave 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 bt_audio_service_open: connect() failed: Connection refused (111) bt_audio_service_open: connect()