matlab-with-python icon indicating copy to clipboard operation
matlab-with-python copied to clipboard

Files demonstrating MATLAB and Python interoperability

Using MATLAB with Python

View Using MATLAB with Python on File Exchange

Copyright 2019 The MathWorks, Inc.

Description

These are the supporting files for the How to Call Python from MATLAB and How to Call MATLAB from Python videos.

They show examples of speech-to-text recognition and sentiment analysis of the detected text by combining MATLAB and Python functionality.

More info and examples in the doc for using MATLAB with Python

Setup and Requirements

This example requires MATLAB R2019b or later (for text analytics functionality), as well as Statistics and Machine Toolbox and Text Analytics Toolbox.

You will also need to install Python and the appropriate packages to run this example. The two main ones you will need are as follows; however, you may need to first resolve other unmet dependencies.

pip install speechrecognition pocketsphinx

This example was tested using Python versions 3.6 - 3.9.