auditok.io.WaveAudioSource
- class auditok.io.WaveAudioSource(filename)[source]
An AudioSource class for reading data from a wave file.
This class is suitable for large wave files, allowing for efficient data handling without loading the entire file into memory.
- Parameters:
filename (str or Path) – The path to a valid wave file.
Methods
__init__(filename)close()Close audio source.
is_open()Return True if audio source is open, False otherwise.
open()Open audio source.
read(size)Read and return up to size audio samples.
Attributes
chNumber of channels in audio stream (alias for channels).
channelsNumber of channels in audio stream.
sample_widthNumber of bytes used to represent one audio sample.
sampling_rateNumber of samples per second of audio stream.
srNumber of samples per second of audio stream (alias for sampling_rate).
swNumber of bytes used to represent one audio sample (alias for sample_width).