0
$\begingroup$

First of I am very new to Signal Processing and to python in general. I am trying to write a script where I would feed a voice recording into it, internally apply an eq and have the modified signal returned. Researching the topic I found some ways to process a signal via transfer functions in python, however I only found functions like a low-pass filter etc. which would not fit my needs as I have a specific eq manipulation in mind. I constructed the required filter curve eq in audacity: The needed filter curve constructed in Audacity

If my limited understanding of signal processing is correct I would need to convert the continous curve into a discrete transfer function and then apply this transfer function to the input signal. However I have no clue how I would go about converting the curve into a Transfer-function. Furthermore, as it is the first time I am working with python I have very limited knowledge on how to implement this process in a python script. I would greatly appreciate any help you could provide me, thanks!

$\endgroup$
1
$\begingroup$

You can use the manage/export functionality to convert your Audacity filter preset into a text file. The file contains frequency/value pairs plus some side info. It looks like Audacity builds an 8192 FFT grid and uses a B-spline to interpolate the frequency/value pairs over the entire grid. I assume that just do an inverse FFT plus some circular time shifting to build a linear phase impulse response and than do something like fftfilt() to apply the filter.

You can just read the text file into python, parse it, and then follow the same steps.

$\endgroup$
2
  • 1
    $\begingroup$ This seems to be a very informative answer, +1! Maybe adding a link to the source code in charge of calculating the filter helps the downvoter appreciate it :) $\endgroup$ – Marcus Müller Dec 27 '20 at 18:59
  • $\begingroup$ Hey thanks for the answer! Unfortunately I am still lost. How would I be able to convert those points in the txt file into a function? Do I need to reverse the process audacity does when encoding the function? $\endgroup$ – Yetzel Jan 7 at 10:41
0
$\begingroup$

One option could be to make a track with an impulse, and filter that with your filter in Audacity, and save the resulting impulse response to extract the filter kernel, and then apply that in Python.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.