:fire: An audio library for Torch.rb
Add this line to your application’s Gemfile:
gem "torchaudio"
This library follows the Python API. Many methods and options are missing at the moment. PRs welcome!
Load a file (requires torchcodec)
waveform, sample_rate = TorchAudio.load("file.wav")
Save a file (requires torchcodec)
TorchAudio.save("new.wave", waveform, sample_rate)
TorchAudio::Transforms::Spectrogram.new.call(waveform)
Supported transforms are:
TorchAudio::Functional.lowpass_biquad(waveform, sample_rate, cutoff_freq)
Supported functions are:
Load a dataset
TorchAudio::Datasets::YESNO.new(".", download: true)
Supported datasets are:
This library downloads and prepares public datasets. We don’t host any datasets. Be sure to adhere to the license for each dataset.
If you’re a dataset owner and wish to update any details or remove it from this project, let us know.
View the changelog
Everyone is encouraged to help improve this project. Here are a few ways you can help:
To get started with development:
git clone https://github.com/ankane/torchaudio-ruby.git
cd torchaudio-ruby
bundle install
bundle exec rake compile
bundle exec rake test
108 commits
2 commits
Ruby
100.0%
:fire: An audio library for Torch.rb
Add this line to your application’s Gemfile:
gem "torchaudio"
This library follows the Python API. Many methods and options are missing at the moment. PRs welcome!
Load a file (requires torchcodec)
waveform, sample_rate = TorchAudio.load("file.wav")
Save a file (requires torchcodec)
TorchAudio.save("new.wave", waveform, sample_rate)
TorchAudio::Transforms::Spectrogram.new.call(waveform)
Supported transforms are:
TorchAudio::Functional.lowpass_biquad(waveform, sample_rate, cutoff_freq)
Supported functions are:
Load a dataset
TorchAudio::Datasets::YESNO.new(".", download: true)
Supported datasets are:
This library downloads and prepares public datasets. We don’t host any datasets. Be sure to adhere to the license for each dataset.
If you’re a dataset owner and wish to update any details or remove it from this project, let us know.
View the changelog
Everyone is encouraged to help improve this project. Here are a few ways you can help:
To get started with development:
git clone https://github.com/ankane/torchaudio-ruby.git
cd torchaudio-ruby
bundle install
bundle exec rake compile
bundle exec rake test
108 commits
2 commits
Ruby
100.0%