Package: gladia-torchaudio
torchaudio: an audio library for PyTorchThe aim of torchaudio is to applyPyTorchto
the audio domain. By supporting PyTorch, torchaudio follows the same philosophy
of providing strong GPU acceleration, having a focus on trainable features through
the autograd system, and having consistent style (tensor names and dimension names).
Therefore, it is primarily a machine learning library and not a general signal
processing library. The benefits of PyTorch can be seen in torchaudio through
having all the computations be through PyTorch operations which makes it easy
to use and feel like a natural extension.Support audio I/O (Load files, Save files)Load a variety of audio formats, such aswav,mp3,ogg,flac,opus,sphere, into a torch Tensor using SoXKaldi (ark/scp)Dataloaders for common audio datasetsCommon audio transformsSpectrogram, AmplitudeToDB, MelScale, MelSpectrogram, MFCC, MuLawEncoding, MuLawDecoding, ResampleCompliance interfaces: Run code using PyTorch that align with other librariesKaldi: spectrogram, fbank, mfccInstallationPlease refer tohttps://pytorch.org/audio/main/installation.htmlfor installation and build process of TorchAudio.Quick Usageimporttorchaudiowaveform,sample_rate=torchaudio.load('foo.wav')# load tensor from filetorchaudio.save('foo_save.wav',waveform,sample_rate)# save tensor to fileBackend DispatchBy default in OSX and Linux, torchaudio uses SoX as a backend to load and save files.
The backend can be changed toSoundFileusing the following. SeeSoundFilefor installation instructions.importtorchaudiotorchaudio.set_audio_backend("soundfile")# switch backendwaveform,sample_rate=torchaudio.load('foo.wav')# load tensor from file, as usualtorchaudio.save('foo_save.wav',waveform,sample_rate)# save tensor to file, as usualNoteSoundFile currently does not support mp3."soundfile" backend is not supported by TorchScript.API ReferenceAPI Reference is located here:http://pytorch.org/audio/main/Contributing GuidelinesPlease refer toCONTRIBUTING.mdCitationIf you find this package useful, please cite as:@article{yang2021torchaudio,title={TorchAudio: Building Blocks for Audio and Speech Processing},author={Yao-Yuan Yang and Moto Hira and Zhaoheng Ni and Anjali Chourdia and Artyom Astafurov and Caroline Chen and Ching-Feng Yeh and Christian Puhrsch and David Pollack and Dmitriy Genzel and Donny Greenberg and Edward Z. Yang and Jason Lian and Jay Mahadeokar and Jeff Hwang and Ji Chen and Peter Goldsborough and Prabhat Roy and Sean Narenthiran and Shinji Watanabe and Soumith Chintala and Vincent Quenneville-Bélair and Yangyang Shi},journal={arXiv preprint arXiv:2110.15018},year={2021}}Disclaimer on DatasetsThis is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset's license.If you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community!Pre-trained Model LicenseThe pre-trained models provided in this library may have their own licenses or terms and conditions derived from the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.For instance, SquimSubjective model is released under the Creative Commons Attribution Non Commercial 4.0 International (CC-BY-NC 4.0) license. Seethe linkfor additional details.Other pre-trained models that have different license are noted in documentation. Please checkout thedocumentation page.