Audio Enhancer is a command-line tool that can scale specific frequencies in your audio.
Equalization is the process of adjusting the volume of different frequency bands within an audio signal. Such as eliminating noise sounds or making certain voices more prominent.
Fourier Transform can help us converts a signal from a time domain to a frequency domain. After obtaining the frequency series, adjust the volume of the frequency range according to the parameter.
Most equalizers are hardware, this program develops an online equalizer and uses the low-level language C++ to implement FFT and optimize it.
-
Discrete Fourier Transform (DFT)
Signals we heard are continuous and non‑periodic. However, computers can not process infinite data. DFT samples a continuous signal in the time domain, making the Fourier transform discrete in both the time and frequency domains. -
Fast Fourier Transform (FFT)
FFT is an algorithm that computes the DFT of a sequence, or its inverse (IDFT).Computing DFT directly from the definition is too slow to be practical. FFT rapidly computes such transformations by factorizing the DFT matrix into a product of sparse factors. As a result, it reduces the complexity of computing the DFT from
O(N^2)
toO(NlogN)
, whichN
is the data size.
- Audio maker
Creators can use Audio Enhancer to scale the amplitude of a specific frequency.
enhancer -F audio.wav -m debuff -f 1000
file
: An audio file, allow type:.wav
mode
: Scale the specific frequency.gain
: Double the amplitude of the frequency.debuff
: Remove the amplitude of the frequency.
freq
: A frequency position need to be scale. (unit: Hz)
User can use enhancer --help
to read document.
- Automatic build system:
make
- Version control:
git
- Testing framework:
pytest
- Documentation: Update to GitHub README.md
- Continuous integration: Github Action
Planning phase (6 weeks including 2/21, 2/28, 3/7, 3/14, 3/21, 3/28):
Week | Planning |
---|---|
Week 1 (4/4) | Study Fourier Transform Survey information and libraries |
Week 2 (4/11) | Design system architecture |
Week 3 (4/18) | Implement functions |
Week 4 (4/25) | Implement functions Write unit test |
Week 5 (5/2) | Write unit test Build Github Action (CI) |
Week 6 (5/9) | Optimize execution performance |
Week 7 (5/16) | Overall tests |
Week 8 (5/23) | Prepare presentation Write document |
The images below are the result of the audio in the time domain and spectrum domain after doing the enhancer.
Test audio includes 500Hz and 2228Hz and the test goal is to eliminate 500Hz.
- First, I read the .wav and draw the signal. 500Hz waveform for the first 7 seconds, 2228Hz for the last 3 seconds.
- Second, convert the signal from the time domain to the spectrum domain using FFT. You can see that there are two upright lines at 500Hz and 2228Hz.
- Then, I scale the frequency, setting the value of 500Hz to 0.
- Finally, using inverse-FFT to bring signal back to the time domain, the 500Hz waveform is gone.
Fast Fourier Transform
What is the Fourier Transform? A visual introduction.
WAV
Scipy/wavfile.py
Online Tone Generator