Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gabyfle/soundml

A little and very high level library to perform basic operations on audio files in the OCaml language
https://github.com/gabyfle/soundml

audio-processing ffmpeg ocaml owl

Last synced: 3 months ago
JSON representation

A little and very high level library to perform basic operations on audio files in the OCaml language

Awesome Lists containing this project

README

        

SoundML Logo

SoundML


A little and very high level library to perform basic operations on audio files in the OCaml language

· Documentation · Report Bug · Request Feature ·

## About the Project

> [!WARNING]
> The project is still in development and is not yet ready for use.

## Getting Started

### Installation

This project uses Opam as a package manager
```bash
opam install soundml
```

## Roadmap

The project is still work in progress.

* [x] Read and Write audio
* [x] Compute the FFT of an audio signal
* [x] Compute the IFFT of an FFT
* [x] Compute the spectrogram of an audio file
* [x] Use a generic spectral function (similar to `matplotlib.mlab`) to compute the spectrogram
* [x] Allow different types of specgram computation (mel, mag, etc...)
* [x] Audio slicing (in a similar way to Owl's slicing)
* [ ] Basic onset detection algorithms
* [ ] RMS
* [ ] LUFS and DBSF are left for further version (LUFS algorithm might require in-depth review of the standards)

## Features
- Natively written in OCaml for a perfect OCaml developer experience
- Easily read and write audio files in various formats (WAV, MP3, etc...)
- Various audio signal processing functions included
- FFT, IFFT
- Spectrogram computation
- Audio slicing
- RMS computation

## Requirements

You should be using the OCaml compiler with a version at least equal to 5.1.0. You can install it by following the instructions on the [OCaml website](https://ocaml.org/docs/install.html). This project uses the Dune build system.

This library heavily relies on the Owl and ocaml-ffmpeg libraries.

| Name | Version | Description |
| ----------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------- |
| [**Owl**](https://github.com/owlbarn/owl) - *OCaml Scientific Computing* | `>= 1.1` | Library for scientific computing in OCaml. Used to make the heavy computations (FFT, IFFT, etc...) |
| [**ocaml-ffmpeg**](https://github.com/savonet/ocaml-ffmpeg) - *OCaml bindings to the FFmpeg library.* | `>= 1.1.11` | OCaml bindings for FFmpeg. Used to read and write audio data. |

## Inspirations

This project is heavily inspired by other amazing open-source libraries such as:

| Name | Inspiration | Reference |
| ------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**librosa**](https://github.com/librosa/librosa) | General functionalities for audio signal processing | McFee, Brian, Colin Raffel, Dawen Liang, Daniel PW Ellis, Matt McVicar, Eric Battenberg, and Oriol Nieto. "librosa: Audio and music signal analysis in python." In Proceedings of the 14th python in science conference, pp. 18-25. 2015. |
| [**pydub**](https://github.com/jiaaro/pydub) | Ease of use, audio slicing using milliseconds and manipulation | - |

Don't hesitate to check the amazing work done by the authors and contributors of these libraries!

## License

Distributed under the Apache License Version 2.0. See LICENSE for more information.

## Acknowledgements

* Logo generated with DALL-E by OpenAI