torchaudio¶
Warning
Starting with version 2.9, we have transitioned TorchAudio into a maintenance phase. As a result:
APIs deprecated in version 2.8 have been removed in 2.9.
The decoding and encoding capabilities of PyTorch for both audio and video have been consolidated into TorchCodec. For convenience,
load()
andsave()
are now aliases toload_with_torchcodec()
andsave_with_torchcodec()
respectively, which call the appropriate functions from TorchCodec. That said, we recommend that you port your code to native torchcodec APIs.
Please see https://github.com/pytorch/audio/issues/3902 for more information.
I/O¶
torchaudio
top-level module provides the following functions that make
it easy to handle audio data.
Load audio data from source using TorchCodec's AudioDecoder. |
|
Load audio data from source using TorchCodec's AudioDecoder. |
|
Save audio data to file using TorchCodec's AudioEncoder. |
|
Save audio data to file using TorchCodec's AudioEncoder. |