SoundCard
SoundCard copied to clipboard
A Pure-Python Real-Time Audio Library
I am trying to run two recorder in two separate thread parallelly. One recorder uses microphone and other uses the system audio. I have configured the both of these recorder...
``` import soundcard as sc import numpy import soundfile # get a list of all speakers: speakers = sc.all_speakers() # get the current default speaker on your system: default_speaker =...
I have the following code. The concept here is that as long as `get_is_recording()` is returning true, then we call "capture_frames" which simply parses the data, and adds it to...
Pulseaudio (and presumably other sound servers) will move streams automatically when a soundcard is disconnected. I'd like to be (at least) able to use [`pa_stream_get_device_name`](https://freedesktop.org/software/pulseaudio/doxygen/stream_8h.html#aab868ab6503d2f88395c5d53332c1064) to verify which device I'm...
This PR fixes the problems mentioned in #146 , "Problems with the "fuzzy matcher" in `get_microphone()`. The changes are a bit longer than I expected at first, but anyway: I...
Hi many thanks for the library, As the title says, the baseline: ``` import soundcard as sc SAMPLERATE = 48000 m = sc.default_microphone() with m.recorder(samplerate=SAMPLERATE) as mic: while True: data...
The "fuzzy matcher" of soundcard names in `get_microphone()` has two problems (observed in Ubuntu 20.04, but they might exist for WIndows and MacOS too): 1. When `get_microphone()` is called with...
This update prevents initializing `IAudioClient` object with incompatible flags when using exclusive mode. This fixes the `"invalid argument"` error but instead results in an `"unsupported format"` error. I added links...
as stated by the docs: ` Parameters: | id (int or str) – can be an int index, a backend id, a substring of the speaker name, or a fuzzy-matched...
Hi, I am attempting to generate real-time audio with low latency on a Windows 10 system with python 3.7. If I try to set the `exclusive_mode` argument to `speaker.player()` to...