This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |