{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Audio I/O\n\n**Author**: [Moto Hira](moto@meta.com)_\n\nThis tutorial shows how to use TorchAudio's basic I/O API to inspect audio data,\nload them into PyTorch Tensors and save PyTorch Tensors.\n\n
There are multiple changes planned/made to audio I/O in recent releases.\n For the detail of these changes please refer to\n `Introduction of Dispatcher
When running this tutorial in Google Colab, install the required packages\n with the following:\n\n .. code::\n\n !pip install boto3
When passing a file-like object, ``info`` does not read\n all of the underlying data; rather, it reads only a portion\n of the data from the beginning.\n Therefore, for a given audio format, it may not be able to retrieve the\n correct metadata, including the format itself. In such case, you\n can pass ``format`` argument to specify the format of the audio.
Saving data in encodings with a lower bit depth reduces the\n resulting file size but also precision.