• This repository has been archived on 17/Feb/2022
  • Stars
    star
    380
  • Rank 112,766 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Apply audio effects such as reverb and EQ directly to audio files or NumPy ndarrays.

Deprecated: I strongly recommend checking out github.com/spotify/pedalboard instead!

Contact me if you'd like this package to persist, and/or if you'd like to take over ownership of this repo.

pysndfx

GitHub Workflow Status PyPI PyPI license

Apply audio effects such as reverb and EQ directly to audio files or NumPy ndarrays.

This is a lightweight Python wrapper for SoX - Sound eXchange. Supported effects range from EQ and compression to phasers, reverb and pitch shifters.

Install

Command:

pip install pysndfx

The system must also have SoX installed.

For Debian-based operating systems: apt install sox

For Anaconda: conda install -c conda-forge sox

Usage

First create an audio effects chain.

# Import the package and create an audio effects chain function.
from pysndfx import AudioEffectsChain

fx = (
    AudioEffectsChain()
    .highshelf()
    .reverb()
    .phaser()
    .delay()
    .lowshelf()
)

Then we can call the effects chain object with paths to audio files, or directly with NumPy ndarrays.

infile = 'my_audio_file.wav'
outfile = 'my_processed_audio_file.ogg'

# Apply phaser and reverb directly to an audio file.
fx(infile, outfile)

# Or, apply the effects directly to a ndarray.
from librosa import load
y, sr = load(infile, sr=None)
y = fx(y)

# Apply the effects and return the results as a ndarray.
y = fx(infile)

# Apply the effects to a ndarray but store the resulting audio to disk.
fx(x, outfile)

There's also experimental streaming support. Try applying reverb to a microphone input and listening to the results live like this:

python -c "from pysndfx import AudioEffectsChain; AudioEffectsChain().reverb()(None, None)"

More Repositories

1

tensorflow-convlstm-cell

A ConvLSTM cell with layer normalization and peepholes for TensorFlow's RNN API.
Python
398
star
2

audioscrape

Scrape audio from YouTube and SoundCloud with a simple command-line interface.
Python
81
star
3

vscode-git-line-blame

Display inline information of the last commit that edited the currently selected line in the editor
TypeScript
21
star
4

ml-vst

(WIP) Create VST plugins with JUCE that run machine learning models.
C++
18
star
5

dotfiles

My idiosyncratic config for personal computing
Nix
12
star
6

drum-transcriber

Convert audio recordings of drums into MIDI files with Hidden Markov Models.
MATLAB
10
star
7

ml-runtimes

Nix packages for interactive ML development
Nix
8
star
8

mirpkgs

Nix packages for reproducible MIR research
Nix
8
star
9

pmqd

Perceived Music Quality Dataset
Python
6
star
10

model-development-template

For developing new ML models with Jupyter Notebooks in VS Code
Makefile
2
star
11

meson-build-test

Testing Meson for fun and learnings
C
1
star
12

nix-pip-flake

Testing Python inside a venv with nix flakes
Nix
1
star
13

ipytoolbox

A collection of IPython magics and other utilities
Jupyter Notebook
1
star
14

music-loops-with-librosa

A little Streamlit app that lets visitors create music loops with librosa and NumPy
Python
1
star
15

msaf-encodec

Music structure analysis with deep embeddings
Jupyter Notebook
1
star
16

bark-example

Python
1
star
17

posesynth

Playing around with ml5.js
Svelte
1
star
18

leetspeaker

Make it easier being 1337 online with the leetspeaker.
Haskell
1
star
19

huggingface-evaluate-test

Just a little test of the evaluate package
1
star
20

worms-speechbank-synthesis

Use LLMs to generate more speech lines in the classic PC game Worms
Jupyter Notebook
1
star
21

motion-synth

Generate and visualize harmonic audio from a motion detected video stream with HTML5.
JavaScript
1
star
22

nix-jax-mnist

A toy example of training MNIST with JAX
Python
1
star
23

onnx-js-audio-test

Nix
1
star