sf.SoundRecorder Class Reference

SoundRecorder is an interface for capturing sound data, it is meant to be used as a base class.
Construct the sound recorder with a callback function for processing captured samples : SoundRecorder(Callback, UserData)
    Callback : Callback function for processing captured samples. This function must take two parameters: the first one is a string containing captured samples, the second one is UserData.
    UserData : Data to pass to the callback function (None by default).

Static methods

CanCapture()
Tell if the system supports sound capture. If not, this class won't be usable. Returns True if audio capture is supported.

Methods

GetSampleRate()
Get the sample rate. Returns the frequency, in samples per second.
Start(SampleRate=44100)
Start the capture. Warning : only one capture can happen at the same time.
    SampleRate : Sound frequency (the more samples, the higher the quality) (44100 by default = CD quality).
Stop()
Stop the capture.