torchwrench.extras.torchaudio module¶
- torchwrench.extras.torchaudio.audio_metadata_to_dict(meta: _AudioMetaData) AudioMetaDataDict[source]¶
-
torchwrench.extras.torchaudio.dump_audio(src: Tensor, uri: BinaryIO | str | Path | PathLike | None, sample_rate: int, channels_first: bool =
True, format: str | None =None, encoding: str | None =None, bits_per_sample: int | None =None, buffer_size: int =4096, backend: str | None =None, compression: CodecConfig | float | int | None =None, *, overwrite: bool =True, make_parents: bool =True) bytes[source]¶ Dump tensors to audio waveform file. Requires torchaudio package installed.
-
torchwrench.extras.torchaudio.dump_with_torchaudio(src: Tensor, uri: BinaryIO | str | Path | PathLike | None, sample_rate: int, channels_first: bool =
True, format: str | None =None, encoding: str | None =None, bits_per_sample: int | None =None, buffer_size: int =4096, backend: str | None =None, compression: CodecConfig | float | int | None =None, *, overwrite: bool =True, make_parents: bool =True) bytes[source]¶ Dump tensors to audio waveform file. Requires torchaudio package installed.