Probably using `sounddevice`. [This](https://github.com/spatialaudio/python-sounddevice/blob/0.5.3/examples/plot_input.py) might be a good starting point.
Probably using
sounddevice.This might be a good starting point.