Skip to content

Latest commit

 

History

History
77 lines (49 loc) · 2.5 KB

File metadata and controls

77 lines (49 loc) · 2.5 KB
author ms.service ms.custom ms.topic ms.date ms.author
eric-urban
azure-ai-speech
linux-related-content
include
02/02/2024
eur

[!INCLUDE Header]

In this quickstart, you install the Speech SDK for Python.

Platform requirements

[!INCLUDE Requirements]

Install the Speech SDK for Python

Before you install the Speech SDK for Python, make sure to satisfy the platform requirements.

Install from PyPI

To install the Speech SDK for Python, run this command in a console window:

pip install azure-cognitiveservices-speech

Upgrade to the latest Speech SDK

To upgrade to the latest Speech SDK, run this command in console window:

pip install --upgrade azure-cognitiveservices-speech

You can check which Speech SDK for Python version is currently installed by inspecting the azure.cognitiveservices.speech.__version__ variable. For example, run this command in a console window:

pip list

Install the Speech SDK by using Visual Studio Code

To install the Speech SDK for Python:

  1. Download and install Visual Studio Code.

  2. Run Visual Studio Code and install the Python extension:

    1. Select File > Preferences > Extensions.
    2. Search for Python, find the Python extension for Visual Studio Code published by Microsoft, and then select Install.

    :::image type="content" source="/articles/ai-services/speech-service/media/sdk/qs-python-vscode-python-extension.png" alt-text="Screenshot that shows selections for installing the Python extension." lightbox="/articles/ai-services/speech-service/media/sdk/qs-python-vscode-python-extension.png":::

  3. Select Terminal > New Terminal to open a terminal within Visual Studio Code.

  4. At the terminal prompt, run the following command to install the Speech SDK for Python package.

    python -m pip install azure-cognitiveservices-speech

For more information about Visual Studio Code and Python, see Visual Studio Code and Getting Started with Python in VS Code.


Use the Speech SDK

Add the following import statement to use the Speech SDK in your Python project:

import azure.cognitiveservices.speech as speechsdk