auditok.util.Recorder¶
-
class
auditok.util.
Recorder
(input, block_dur=0.01, hop_dur=None, max_read=None, **kwargs)[source]¶ Class to read fixed-size chunks of audio data from a source and keeps data in a cache. Using this class is equivalent to initializing
AudioReader
with record=True. For more information about the other parameters seeAudioReader
.Once the desired amount of data is read, you can call the
rewind()
method then get the recorded data via thedata
attribute. You can also re-read cached data one window a time by callingread()
.-
__init__
(input, block_dur=0.01, hop_dur=None, max_read=None, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(input[, block_dur, hop_dur, max_read])Initialize self. read
()Read a block (i.e., window) of data read from this source. Attributes
block_dur
hop_dur
hop_size
max_read
rewindable
-