This repo provides examples of co-executing MATLAB® with TensorFlow and PyTorch to train a speech command recognition system.
Signal processing engineers that use Python to design and train deep learning models are still likely to find MATLAB® useful for tasks such as dataset curation, signal pre-processing, data synthesis, data augmentation, and feature extraction. Open-source alternatives exist for those tasks and they could be OK to use when replicating a pre-existing model or training recipe. However, for original technical development work, most users find those tasks easier in MATLAB®.
Creator: MathWorks® Development
- Python™
- MATLAB® R2021a or later
- Deep Learning Toolbox™
- Audio Toolbox™
To accelerate training, a GPU and the following toolbox is recommended:
This repo includes two co-execution examples, with additional requirements.
- PyTorch (tested with version 1.9.0) and NumPy (tested with 1.21.1)
- MATLAB Engine API
- TensorFlow (tested with version 2.0.0)
- Configured Python interpreter
See SetupNotes.mlx
for setup instructions for both examples included with this repo.
There are two high-level examples in this repo.
CallMATLABFromPythonPytorch.mlx
- In this example, Python™ is your main environment. You call into MATLAB® to perform dataset management and audio feature extraction.
CallPythonTensorFlowFromMATLAB.mlx
- In this example, MATLAB® is your main environment. The dataset management, audio feature extraction, training loop, and evaluation happen in MATLAB®. The deep learning network is defined and executed in Python™.
The license is available in the License file in this repository.