Waveform.from_milliseconds_of_silence()

static Waveform.from_milliseconds_of_silence(frame_rate_hz, num_channels, duration_milliseconds)

Creates a silent waveform measured in milliseconds.

Example

Create 30 seconds of silence (in stereo).

>>> from babycat import Waveform
>>> Waveform.from_milliseconds_of_silence(
...    frame_rate_hz=44100,
...    num_channels=2,
...    duration_milliseconds=30_000,
... )
<babycat.Waveform: 1323000 frames, 2 channels, 44100 hz>
Parameters
  • frame_rate_hz (int) – The frame rate to set for this silent audio waveform.

  • num_channels (int) – The number of channels to set.

  • num_frames (int) – The number of frames to set.

Returns

A waveform representing silence.

Return type

Waveform