Python knowledge points 100 series (12) - use the modules that come with windows to realize speech recognition

Speech recognition using SAPI:

Development and running environment: win10 64-bit
Python version: 3.8
Module used: speech

Basic knowledge:

What are SAPIs?

SAPI is Microsoft Speech API, which is a voice interface launched by Microsoft, and since WINXP, the system has already had the function of voice recognition;

Speech module:

The main functions of this module are: speech recognition, synthesizing specified text into speech, and outputting speech signals.

Install the Speech module

  • There are many recommended installation methods, pip is recommended;

pip is the package installer for Python. In fact, pip is a package in the Python Standard Library (The Python Standard Library), but this package is special, and it can be used to manage other packages in the Python Standard Library (The Python Standard Library). pip is a command line program. When pip is installed, a pip command is added to the system that can be run from the command prompt.

After installing pip and adding it to the environment variable, you can use the pip command to install third-party modules

  • Install the speech module command:

pip install speech

Guess you like

Origin blog.csdn.net/weixin_42551921/article/details/127987515