simple audio I/O for pytorch
Clone or download
Pull request Compare This branch is 1 commit behind pytorch:master.

README.md

torchaudio: an audio library for PyTorch

Dependencies

  • libsox v14.3.2 or above

Quick install on OSX (Homebrew):

brew install sox

Linux (Ubuntu):

sudo apt-get install sox libsox-dev libsox-fmt-all

Installation

# Linux
python setup.py install

# OSX 
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

Quick Usage

import torchaudio
sound, sample_rate = torchaudio.load('foo.mp3')
torchaudio.save('foo_save.mp3', sound, sample_rate) # saves tensor to file

API Reference

API Reference is located here: http://pytorch.org/audio/