Questions tagged [python-sounddevice]

167 questions
0
votes
0 answers

Python, measuring sound from sund card

I have been working some hours now trying to figure out a way to measure sound volume from an application without having a microphone. I first tried with PyAudio but all examples is with using a microphone as capturing device for the sound from the…
Anders Breid
  • 121
  • 1
  • 8
0
votes
1 answer

Stop recording once volume is below threshold with python-sounddevice

I currently have some python code that constantly records 4-second chunks of audio: #!/usr/bin/env python3 import sounddevice as sd fs = 16000 while True: print('Started listening') myrecording = sd.rec(int(4 * fs), dtype='int16',…
Migwell
  • 18,631
  • 21
  • 91
  • 160
0
votes
0 answers

Python SoundDeviceStream write/read underflow/overflow errors

Using Raspberry Pi Model B+ running Raspbian GNU/Linux 8 (jessie) with Blue "Snowball" usb mic and powered speakers connected to 3.5mm jack output. Trying to run pushtotalk.py, a Google Assistant sample from GassistPi. Sample runs but produces…
0
votes
1 answer

How to Update Samplerate of Sounddevice?

I am using sd.Stream to output sound and record from mic simultaneously. I need to be able to get the input and output simultaneously for audio processing in real time which is why I'm using Stream. If I'm using all files that use the same…
Don
  • 1
  • 1
0
votes
1 answer

Python Sounddevice callback time.inputBufferAdcTime returns 0

My end goal is to simultaneously output a wav file and record on a mic and display the two on top of each other on a plot. This does not require low latency, but it does require the two plots to be overlaid in a way that they correctly represent…
Don
  • 1
  • 1
0
votes
0 answers

Delay in live audio recording

I am a noob in audio processing using python. I have got the following python code from internet to perform live audio recording. Whenever, I record using the following code, there is a block of zeros in the beginning of the recorded audio file. The…
user8026974
0
votes
1 answer

Python - multiprocessing - queue: The reference of my queue changed even if it is the same object?

I started using the multiprocessing not a long time ago and it is working on basic examples. Afterwards I tried to implement some kind of multi-sound input program and tried to canalize the input-flux via a queue to some processing module and that…
0
votes
1 answer

Stop the loop in sounddevice audio output

The problem is when I am using sounddevice's loop option to loop a playback, I cannot get it to stop. import soundfile as sf import sounddevice as sd weight = 1.4 data, fs = sf.read('sound.wav') sd.play(data * weight, fs,…
0
votes
1 answer

Too high latency when playing sound samples from command line using sounddevice module

I want to write a program that allows me to play sample sounds with the computer keyboard with almost no latency. My program: import numpy as np import sounddevice as sd import soundfile as sf import msvcrt sd.default.latency = 'low' samplesarray…
skyfish
  • 1
  • 1
0
votes
1 answer

Python module sounddevice intermittently doesn't work (clicks) on OSX and Linux

While working on a morse code play program, I'm finding sounddevice 0.3.7 will work intermittently, one time playing perfectly and then the next just making a bunch of clicking sounds. I'm playing fairly short segments (a second up to several…
0
votes
2 answers

Adding to mono signals to perform stereo

I'm trying to play a stereo signal using these two phase shifted tones and I can't make it import numpy as np import sounddevice as sd fs = 44100 duration = 1 frequency = 440 phase = 90 * 2 * np.pi / 360 sine_A = (np.sin(2 * np.pi * np.arange(fs…
0
votes
0 answers

Python Sounddevice stream issue

I've been working in a project with "Sounddevice 0.3.6" module and Python for proposing an active noise cancellation system. For this specific application, I needed to precisely output a signal with same frequency of the input signal. That is when…
Fernando H'.'
  • 897
  • 1
  • 8
  • 19
0
votes
1 answer

Too high latency while trying to manipulate sound arrays using sounddevice in python

Few days ago, I have installed a sounddevice library in Python 2.7.5. I'm trying to make a sound array and add some effects to it immediately after I push a key on my MIDI controller. But I get a huge delay of 0.1 to 0.2 second which makes my code…
mathfux
  • 5,759
  • 1
  • 14
  • 34
0
votes
1 answer

Multichannel sound syncronization issues in Python (Sounddevice)

I am currently working on a script that should be able to output 8 channels of audio (.wav files) to 8 different channels on a soundcard. My script is sort of working, but I have syncronization issues. I am able to hear that the timing between the…
-1
votes
1 answer

pyinstaller doesn't like sounddevice

Our Python 3.7 project is using sounddevice and it runs just fine, but we recently updated pyinstaller to 5.10.1 and the new version of pyinstaller doesn't like sounddevice. BTW, updating pyinstaller to 5.11.0 doesn't help. What do we need to do, to…
Betty Crokker
  • 3,001
  • 6
  • 34
  • 68
1 2 3
11
12