Skip to content

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

License

Notifications You must be signed in to change notification settings

gabyfle/SoundML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoundML Logo

SoundML

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

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

opam install soundml

Roadmap

The project is still work in progress.

  • Read and Write audio
  • Compute the FFT of an audio signal
  • Compute the IFFT of an FFT
  • Audio slicing (in a similar way to Owl's slicing)
  • Basic onset detection algorithms
  • Spectral analysis
    • Generic spectrogram helper function
    • Mel spectrogram
    • Chroma spectrogram
    • Constant and linear detrend
  • Time domain analysis
    • RMS computation
    • Zero crossing rate
    • Energy
  • Write test files for the whole library

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. This project uses the Dune build system.

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

Name Version Description
Owl - OCaml Scientific Computing >= 1.1 Library for scientific computing in OCaml. Used to make the heavy computations (FFT, IFFT, etc...)
ocaml-ffmpeg - OCaml bindings to the FFmpeg library. >= 1.2 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 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 Ease of use, audio slicing using milliseconds and manipulation -
Numpy Numerous implementation of SoundML's algorithms were directly taken from Numpy -
Matplotlib The implementation of their spectral helper to compute spectrogram as well as the one of the linear detrend function were took from the matplotlib.mlab module. -

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published