This is a minimal wav2vec 2.0 implementation in plain NumPy inspired by picoGPT.
This implementation:
- 130 lines of code + utils to load and convert parameters.
- Contains only fwd path.
- Slow. Doesn't use GPU, multithreading etc.
- Written in education purpose and may contain bugs.
pip install -r requirements.txt
Tested on Python 3.9
.
python wav2vec.py
transcript: I|HAD|THAT|CURIOSITY|BESIDE|ME|AT|THIS|MOMENT|
- wav2vec.py - model layers implementation
- utils.py - helper functions to download and convert model parameters and example wav file
- Add option to load user specified wav