Code Monkey home page Code Monkey logo

dm_aux's Introduction

AUX

AUX is an audio processing library in JAX, for JAX.

Overview

JAX is a library resulting from the union of Autograd and XLA for high-performance machine learning research. It provides NumPy, SciPy, automatic differentiation and first-class GPU/TPU support.

AUX, built on top of JAX, provides audio processing functions and tools to JAX. It is a sister library of PIX designed for image processing in JAX. Likewise, all operations in AUX can be optimized through jax.jit.

Installation

AUX is a pure-Python package using JAX for accelerated and optimized linear algebra.

First, follow JAX installation instructions to install JAX with the relevant accelerator support.

Then, assume you are in the dm_aux directory, install AUX using pip:

$ pip install -e . -r requirements/requirements.txt

Quickstart

AUX is a module containing tools that work on the raw waveform (PCM) and spectrogram. For example, assume that we want to add some additive Gaussian noise to a raw audio waveform.

import dm_aux as aux
import jax

# Load an waveform into a NumPy array with your preferred library.
x = load_waveform()

key = jax.random.PRNGKey(0)

x_with_noise = aux.additive_gaussian(key, x, noise_level_in_db=-30)

All the functions in AUX can be jax.jited. You can leverage it to speed up the audio processing.

# `jax.jit`ed function.
x_with_noise = jax.jit(aux.additive_gaussian)(key, x, noise_level_in_db=-30)

Testing

You may use our unit tests to test your development environment and to know more about the usage of the tools and functions. All the tests are in the files with the _test suffix, and can be executed using pytest:

$ pip install -e . -r requirements/requirements-test.txt
$ python -m pytest [-n <NUMCPUS>] dm_aux

Citing AUX

This repository is part of the DeepMind JAX Ecosystem, to cite AUX please use the DeepMind JAX Ecosystem citation.

Contribute!

We are very happy to accept contributions!

Please read our contributing guidelines and send us PRs!

dm_aux's People

Contributors

wanglouis49 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.