
Note that this might receive different numbers of Numframes=None, which will return whatever audio data is available right To get the audio data as quickly as absolutely possible, you can use In general, for optimal latency, you should useĪ numframes significantly lower than the blocksize above, maybe by a On Windows/WASAPI, settingĮxclusive_mode=True might help, too (this is currently experimental).Īnother source of latency is in the record function, which buffers output up Try to honor your request as best it can. This tells the operating system your desired latency, and it will In order to request lower latencies, pass a blocksize to player or

Particularly on laptops, this configuration might have extreme player( samplerate = 48000) as sp:īy default, SoundCard records and plays at the operating system's defaultĬonfiguration. recorder( samplerate = 48000) as mic, \ĭefault_speaker. # alternatively, get a `Recorder` and `Player` object # and play or record continuously: with default_mic. # record and play back one second of audio: data = default_mic. Source Software on Github does not imply an obligation to fix your problem Possible, I can not guarantee a timely response to issues. However, please be aware that this is a hobby project of mine that I amĭeveloping for free, and in my spare time. Will try to include your fix into SoundCard.

Please open an Issue, and I will try to fix it. There are a few known issues that still need to be fixed. All major features work on all platforms, but Sound card naming schemes and default block sizes can vary between devices and While the programming interface is identical across platforms, SoundCard is cross-platform, and supports Linux/pulseaudio, Mac/coreaudio, and

The input and output data are scaled to 0dBFS (Full Scale). Instead, it is implemented using the wonderful CFFI and the native audio libraries of SoundCard is a library for playing and recording audio without resorting to aĬPython extension.
