• Docs >
  • torchaudio >
  • Old version (stable)
Shortcuts

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() and save() are now aliases to load_with_torchcodec() and save_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

Load audio data from source using TorchCodec's AudioDecoder.

load_with_torchcodec

Load audio data from source using TorchCodec's AudioDecoder.

save

Save audio data to file using TorchCodec's AudioEncoder.

save_with_torchcodec

Save audio data to file using TorchCodec's AudioEncoder.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources