Skip to content

Instantly share code, notes, and snippets.

Solving environment /

Scott H. Hawley drscotthawley

Solving environment /
View GitHub Profile
drscotthawley /
Last active Apr 29, 2018
Accessing Sox Audio Effects from Python via Pysox
import pysox
import librosa
import numpy as np
def apply_sox_effect(signal, sr, fxstr):
# This writes signal to a .wav file, processes it sox to another file, loads that and returns it.
# signal: a numpy list of numbers; the audio signal
# sr: the sample rate in Hz, must be an integer
# fxstr: a semicolon-separated string starting with the effect name followed by parameter values in order