cutcutcodec.core.filter.audio.delay
Allow to temporarily translate an audio sequence.
Classes
|
Change the beginning time of a stream. |
Details
- class cutcutcodec.core.filter.audio.delay.FilterAudioDelay(in_streams: Iterable[Stream], delay: Real)[source]
Change the beginning time of a stream.
Attributes
- delayFraction
The delay append to the original beginning time of the stream (readonly). a positive value indicates that the output flow is later than the input flow.
Examples
>>> from cutcutcodec.core.filter.audio.delay import FilterAudioDelay >>> from cutcutcodec.core.generation.audio.noise import GeneratorAudioNoise >>> >>> (s_base_audio,) = GeneratorAudioNoise(0).out_streams >>> (s_trans_audio,) = FilterAudioDelay([s_base_audio], 10).out_streams >>> >>> (s_base_audio.snapshot(0) == s_trans_audio.snapshot(10)).all() tensor(True) >>> (s_base_audio.snapshot(10) == s_trans_audio.snapshot(10)).all() tensor(False) >>>
Initialise and create the class.
Parameters
- in_streamstyping.Iterable[Stream]
Transmitted to
cutcutcodec.core.classes.filter.Filter.- delaynumbers.Real
The temporal translation value to apply at the output audio stream.