This project is a SPN solution for the re-micro-cup digital one-game problem - that is, the use of SPN network to build an isolated word speech recognition model. The project file gives the code for waveform data pre-processing and the code for model training.
----ASR\
|----PreProcess\
| |----preprocess.py
|----Train\
| |----datasplit.py
| |----dtwsplit.py
| |----train_spn.ipynb
|----requirements.txt
|----readme.md
-
Environmental requirements: Python3.8, you need to install the pypi package in requirement.txt, you can install it directly through the command
pip install -r requirements.txt
-
Data preparation: Please prepare the data collection of Google Speech Command and place it in folders according to the label;
-
Data preprocessing: open the file
preprocess.py
to modify the path of the input waveform data file and configure the output path; -
Model training: When performing model training, configure the path in each file in the
./Train/
directory, and thenexecute
dtwsplit.py,
datasplit.pyand
train_spn.ipynbfiles in sequence. Among them, please use jupyter lab/notebook to open
train_spn.ipynb`, and execute them in order from top to bottom. -
Save model: There is a function to export SPN model in
train_spn.ipynb
, you only need to configure the path.
Since the complete training data is relatively large, only a small data set is placed in the warehouse. If necessary, please download Google Speech Command by yourself or download it from Baidu Cloud Disk. (Link: https://pan.baidu.com/s/1fXTGaAYHVPDtipNF287x-w Extraction code: qwi2 )