taped.live_audio

class taped.live_audio.AudioStreamBuffer(*, buffer_size_seconds: Union[int, float] = 60.0, input_device_index=None, sr=44100, width=2, frames_per_buffer=2048, sleep_time_on_read_none_s: Optional[Union[int, float]] = 0.05, auto_drop=True)[source]
class taped.live_audio.VisualizationStream(mk_int16_array_gen: Callable, chk_to_viz: Callable)[source]
close()[source]

Clean up if needed

property info

Whatever info is useful to you StreamBuffer will record info right after open

key(data)[source]

Convert data to a sortable value that increases with each read. the enumerate index in this case

open()[source]

Setup data generator

read()[source]

Must return data that is sortable with ‘key’ method or None. Data that is not readily sortable such as ordered words of a sentence can be wrapped in a tuple (word_index, word).

Returns

data or None