Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ygorcastor/nx_audio
Torchaudio, but for Elixir!
https://github.com/ygorcastor/nx_audio
ai audio-processing elixir nx whisper
Last synced: about 7 hours ago
JSON representation
Torchaudio, but for Elixir!
- Host: GitHub
- URL: https://github.com/ygorcastor/nx_audio
- Owner: YgorCastor
- License: mit
- Created: 2024-12-11T07:49:51.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2025-01-05T18:19:24.000Z (8 days ago)
- Last Synced: 2025-01-10T17:23:38.358Z (3 days ago)
- Topics: ai, audio-processing, elixir, nx, whisper
- Language: Elixir
- Homepage:
- Size: 5.65 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# NxAudio
NxAudio is an Elixir library for working with audio tensors, providing functionality similar to Python's torchaudio
but built for the Nx ecosystem.## Features
* Audio I/O operations with support for multiple formats
* Audio transformations and processing
* Amplitude to DB
* MEL Spectrogram and STFT
* Spectrogram visualizations
* Multiple codec support including:
* PCM formats (S16, S24, S32, S8, U8, F32, F64)
* FLAC
* MP3
* Vorbis
* Opus
* AMR (NB/WB)
* μ-law and A-law
* HTK## Installation
Add `nx_audio` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:nx_audio, "~> 0.1.0"}
]
end
```## Dependencies
NxAudio requires:
* Elixir ~> 1.17
* FFmpeg for audio processing capabilities
* Nx for tensor operations## Usage Examples
Basic audio operations:
```elixir
# Reading an audio file
{:ok, {tensor, sample_rate}} = NxAudio.IO.load("path/to/audio.mp3")# Generating spectrograms
spectrogram = NxAudio.Transforms.Spectrogram.transform(tensor, sample_rate: sample_rate)
```## Documentation
Detailed documentation is organized into the following sections:
* IO - Audio file reading/writing operations
* Transformations - Audio signal processing functions
* Visualizations - Spectrogram and waveform visualization tools
* Codecs - Supported audio format encodingsFor more examples and detailed API documentation, visit the [official documentation](https://hexdocs.pm/nx_audio).
## License
This project is licensed under the MIT License.