auditok.io.WaveAudioSource¶
-
class
auditok.io.
WaveAudioSource
(filename)[source]¶ A class for an AudioSource that reads data from a wave file.
This class should be used for large wave files to avoid loading the whole data to memory.
Parameters: filename (str) – path to a valid wave file. Methods
__init__
(filename)Initialize self. close
()Close audio source. is_open
()Return True if audio source is open, False otherwise. open
()Open audio source. read
(size)Read and return size audio samples at most. Attributes
ch
Number of channels in audio stream (alias for channels). channels
Number of channels in audio stream. sample_width
Number of bytes used to represent one audio sample. sampling_rate
Number of samples per second of audio stream. sr
Number of samples per second of audio stream (alias for sampling_rate). sw
Number of bytes used to represent one audio sample (alias for sample_width).