This guide shows how to install the Speech SDK for the .NET Framework (Windows). If you just want the package name to get started on your own, run Install-Package Microsoft.CognitiveServices.Speech in the NuGet console.
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
Create a Visual Studio project and install the Speech SDK
You need to install the Speech SDK NuGet package so you can reference it in your code. To do that, you might first need to create a helloworld project. If you already have a project with the .NET desktop development workload available, you can use that project and skip to Use NuGet Package Manager to install the Speech SDK.
Create a helloworld project
Open Visual Studio 2019.
In the Start window, select Create a new project.
In the Create a new project window, choose Console App (.NET Framework), and then select Next.
In the Configure your new project window, enter helloworld in Project name, choose or create the directory path in Location, and then select Create.
From the Visual Studio menu bar, select Tools > Get Tools and Features. This step opens Visual Studio Installer and displays the Modifying dialog.
Check whether the .NET desktop development workload is available. If the workload hasn't been installed, select the check box next to it, and then select Modify to start the installation. It might take a few minutes to download and install.
If the check box next to .NET desktop development is already selected, select Close to close the dialog.
Close Visual Studio Installer.
Use NuGet Package Manager to install the Speech SDK
In Solution Explorer, right-click the helloworld project, and then select Manage NuGet Packages to show NuGet Package Manager.
In the upper-right corner, find the Package Source drop-down box, and make sure that nuget.org is selected.
In the upper-left corner, select Browse.
In the search box, type Microsoft.CognitiveServices.Speech and select Enter.
From the search results, select the Microsoft.CognitiveServices.Speech package, and then select Install to install the latest stable version.
Accept all agreements and licenses to start the installation.
After the package is installed, a confirmation appears in the Package Manager Console window.
Choose target architecture
To build and run the console application, create a platform configuration that matches your computer's architecture.
From the menu bar, select Build > Configuration Manager. The Configuration Manager dialog appears.
In the Active solution platform drop-down box, select New. The New Solution Platform dialog appears.
In the Type or select the new platform drop-down box:
This guide shows how to install the Speech SDK for C# .NET Core. If you just want the package name to get started on your own, run Install-Package Microsoft.CognitiveServices.Speech in the NuGet console.
Note
.NET Core is an open-source, cross-platform .NET platform that implements the .NET Standard specification.
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
Create a Visual Studio project and install the Speech SDK
Start Visual Studio 2019.
Make sure the .NET cross-platform development workload is available. Select Tools > Get Tools and Features from the Visual Studio menu bar to open the Visual Studio installer. If this workload is already enabled, close the dialog.
Otherwise, select the box next to .NET Core cross-platform development, and select Modify at the lower-right corner of the dialog. Installation of the new feature will take a moment.
Create a new Visual C# .NET Core console app. In the New Project dialog, from the left pane, expand Installed > Visual C# > .NET Core. Then select Console App (.NET Core). For the project name, enter helloworld.
Install and reference the Speech SDK NuGet package. In Solution Explorer, right-click the solution and select Manage NuGet Packages for Solution.
In the upper-right corner, in the Package Source box, select nuget.org. Search for the Microsoft.CognitiveServices.Speech package, and install it into the helloworld project.
Accept the displayed license to begin installation of the NuGet package.
After the package is installed, a confirmation appears in the Package Manager console.
The Speech SDK for Unity supports Windows Desktop (x86 and x64) or Universal Windows Platform (x86, x64, ARM/ARM64), Android (x86, ARM32/64), iOS (x64 simulator and ARM64), and Mac (x64).
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
On Android, an ARM-based Android device (API 23: Android 6.0 Marshmallow or later) enabled for development with a working microphone.
On iOS, an iOS device (ARM64) enabled for development with a working microphone.
On macOS, a Mac device (x64) and the latest LTS version of Unity 2019 (or later) for integrated support for microphone access in Unity Player settings.
Install the Speech SDK
To install the Speech SDK for Unity, follow these steps:
Download and open the Speech SDK for Unity. It's packaged as a Unity asset package (.unitypackage) and should already be associated with Unity. When the asset package is opened, the Import Unity Package dialog appears. You might need to create and open an empty project for this step to work.
Ensure that all files are selected, and then select Import. After a few moments, the Unity asset package is imported into your project.
For more information about importing asset packages into Unity, see the Unity documentation.
This guide shows how to install the Speech SDK for C# Universal Windows Platform (UWP). If you just want the package name to get started on your own, run Install-Package Microsoft.CognitiveServices.Speech in the NuGet console.
Note
The Universal Windows Platform lets you develop apps that run on any device that supports Windows 10, including PCs, Xbox, Surface Hub, and other devices.
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
Create a Visual Studio project and install the Speech SDK
To create a Visual Studio project for UWP development, you need to:
Set up Visual Studio development options.
Create the project and select the target architecture.
Set up audio capture.
Install the Speech SDK.
Set up Visual Studio development options
To start, make sure you're set up correctly in Visual Studio for UWP development:
Open Visual Studio 2019 to display the start window.
Select Continue without code to go to the Visual Studio IDE.
From the Visual Studio menu bar, select Tools > Get Tools and Features to open Visual Studio Installer and view the Modifying dialog.
On the Workloads tab, under Windows, find the Universal Windows Platform development workload. If the check box next to that workload is already selected, close the Modifying dialog and go to step 7.
Select the Universal Windows Platform development check box, and then select Modify.
In the Before we get started dialog, select Continue to install the UWP development workload. Installation of the new feature might take a while.
Close Visual Studio Installer.
Create the project
Next, create your project and select the target architecture:
On the Visual Studio menu bar, select File > New > Project to display the Create a new project window.
Find and select Blank App (Universal Windows). Make sure that you select the C# version of this project type (as opposed to Visual Basic).
Select Next.
In the Configure your new project dialog, in Project name, enter helloworld.
In Location, go to and select (or create) the folder where you want to save your project.
Select Create.
In the New Universal Windows Platform Project window, in Minimum version (the second drop-down box), select Windows 10 Fall Creators Update (10.0; Build 16299). That's the minimum requirement for the Speech SDK.
In Target version (the first drop-down box), choose a value identical to or later than the value in Minimum version.
Select OK. You're returned to the Visual Studio IDE, with the new project created and visible on the Solution Explorer pane.
Select your target platform architecture. On the Visual Studio toolbar, find the Solution Platforms drop-down box. If you don't see it, select View > Toolbars > Standard to display the toolbar that contains Solution Platforms.
If you're running 64-bit Windows, select x64 in the drop-down box. 64-bit Windows can also run 32-bit applications, so you can choose x86 if you prefer.
Note
The Speech SDK supports all Intel-compatible processors, but only x64 versions of ARM processors.
Set up audio capture
Allow the project to capture audio input:
In Solution Explorer, double-click Package.appxmanifest to open the package application manifest.
Select the Capabilities tab.
Select the box for the Microphone capability.
From the menu bar, select File > Save Package.appxmanifest to save your changes.
In Solution Explorer, right-click your solution, and select Manage NuGet Packages for Solution to go to the NuGet - Solution window.
Select Browse.
In Package source, select nuget.org.
In the Search box, enter Microsoft.CognitiveServices.Speech. Choose that package after it appears in the search results.
In the package status pane next to the search results, select your helloworld project.
Select Install.
In the Preview Changes dialog, select OK.
In the License Acceptance dialog, view the license, and then select I Accept. The package installation begins. When installation is complete, the Output pane displays a message that's similar to the following text: Successfully installed 'Microsoft.CognitiveServices.Speech 1.15.0' to helloworld.
This guide shows how to install the Speech SDK for Xamarin. Xamarin is an open-source platform for building modern and performant applications for iOS, Android, and Windows by using .NET. If you just want the package name to get started on your own, run Install-Package Microsoft.CognitiveServices.Speech in the NuGet console.
Note
The Speech SDK for Xamarin supports Windows Desktop (x86 and x64) or Universal Windows Platform (x86, x64, ARM/ARM64), Android (x86, ARM32/64), and iOS (x64 simulator and ARM64).
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
Create a Visual Studio project and install the Speech SDK
To create a Visual Studio project for cross-platform mobile app development with .NET and Xamarin, you need to:
Set up Visual Studio development options.
Create the project and select the target architecture.
Install the Speech SDK.
Set up Visual Studio development options
To start, make sure you're set up correctly in Visual Studio for cross-platform mobile development with .NET:
Open Visual Studio 2019.
From the Visual Studio menu bar, select Tools > Get Tools and Features to open Visual Studio Installer and view the Modifying dialog.
On the Workloads tab, under Windows, find the Mobile development with .NET workload. If the check box next to that workload is already selected, close the Modifying dialog and go to step 6.
Select the Mobile development with .NET check box, and then select Modify.
In the Before we get started dialog, select Continue to install the workload for mobile development with .NET. Installation of the new feature might take a while.
Close Visual Studio Installer.
Create the project
Next, create your project and select the target architecture:
On the Visual Studio menu bar, select File > New > Project to display the Create a new project window.
Find and select Mobile App (Xamarin.Forms).
Select Next.
In the Configure your new project dialog, in Project name, enter helloworld.
In Location, go to and select or create the folder where you want to save your project.
Select Create.
In the New Cross Platform App window, select the Blank template, and then select OK.
In Platform, select the boxes for Android, iOS, and Windows (UWP).
Select OK. You're returned to the Visual Studio IDE, with the new project created and visible in the Solution Explorer pane.
Select your target platform architecture and startup project. On the Visual Studio toolbar, find the Solution Platforms drop-down box. If you don't see it, select View > Toolbars > Standard to display the toolbar that contains Solution Platforms.
If you're running 64-bit Windows, select x64 in the drop-down box. You can select x86 if you want because 64-bit Windows also can run 32-bit applications.
In the Start-up Projects drop-down box, select helloworld.UWP (Universal Windows).
In Solution Explorer, right-click your solution. Select Manage NuGet Packages for Solution to go to the NuGet - Solution window.
Select Browse.
In Package source, select nuget.org.
In the Search box, enter Microsoft.CognitiveServices.Speech. Then select that package after it appears in the search results.
Note
The iOS library inside Microsoft.CognitiveServices.Speech NuGet doesn't have bitcode enabled. If you need the bitcode library enabled for your application, use Microsoft.CognitiveServices.Speech.Xamarin.iOS NuGet for the iOS project specifically.
In the package status pane next to the search results, select all projects: helloworld, helloworld.Android, helloworld.iOS, and helloworld.UWP.
Select Install.
In the Preview Changes dialog, select OK.
In the License Acceptance dialog, view the license, and then select I Accept. Install the Speech SDK package reference to all projects.
After installation finishes successfully, you might see the following warning for helloworld.iOS. This is a known issue and should not affect your app's functionality.
Could not resolve reference "C:\Users\Default\.nuget\packages\microsoft.cognitiveservices.speech\1.7.0\build\Xamarin.iOS\libMicrosoft.CognitiveServices.Speech.core.a". If this reference is required by your code, you may get compilation errors.
The Speech SDK is now installed. You can now delete or reuse the helloworld project that you created in the previous steps.
Use the following procedure to download and install the SDK. The steps include downloading the required libraries and header files as a .tar file from https://aka.ms/csspeech/linuxbinary.
Choose a directory to which the Speech SDK files should be extracted, and set the SPEECHSDK_ROOT environment variable to point to that directory. This variable makes it easy to refer to the directory in future commands.
For example, if you want to use the directory speechsdk in your home directory, use a command like the following:
export SPEECHSDK_ROOT="$HOME/speechsdk"
Create the directory if it doesn't exist yet:
mkdir -p "$SPEECHSDK_ROOT"
Download and extract the .tar.gz archive that contains the Speech SDK binaries:
Validate the contents of the top-level directory of the extracted package:
ls -l "$SPEECHSDK_ROOT"
The directory listing should contain the third-party notice and license files. The listing should also contain an include directory that holds header (.h) files and a lib directory that holds libraries for arm32, arm64, x64, and x86.
Path
Description
license.md
License
ThirdPartyNotices.md
Third-party notices
REDIST.txt
Redistribution notice
include
Required header files for C++
lib/arm32
Native library for ARM32 required to link your application
lib/arm64
Native library for ARM64 required to link your application
lib/x64
Native library for x64 required to link your application
lib/x86
Native library for x86 required to link your application
Choose a directory to which the Speech SDK files should be extracted, and set the SPEECHSDK_ROOT environment variable to point to that directory. This variable makes it easy to refer to the directory in future commands.
For example, if you want to use the directory speechsdk in your home directory, use a command like the following:
export SPEECHSDK_ROOT="$HOME/speechsdk"
Create the directory if it doesn't exist yet:
mkdir -p "$SPEECHSDK_ROOT"
Download and extract the .zip archive that contains the Speech SDK XCFramework:
Create a Visual Studio project and install the Speech SDK
To create a Visual Studio project for C++ desktop development, you need to:
Set up Visual Studio development options.
Create the project.
Select the target architecture.
Install the Speech SDK.
Set up Visual Studio development options
To start, make sure you're set up correctly in Visual Studio for C++ desktop development:
Open Visual Studio 2019 to display the start window.
Select Continue without code to go to the Visual Studio IDE.
From the Visual Studio menu bar, select Tools > Get Tools and Features to open Visual Studio Installer and view the Modifying dialog.
On the Workloads tab, under Windows, find the Desktop development with C++ workload. If the check box next to that workload isn't already selected, select it.
On the Individual components tab, find the NuGet package manager check box. If the check box isn't already selected, select it.
In the corner, select the button labeled either Close or Modify. The button name varies depending on whether you selected any features for installation.
If you select Modify, installation begins. The process might take a while.
Close Visual Studio Installer.
Create the project
Next, create your project and select the target architecture:
On the Visual Studio menu bar, select File > New > Project to display the Create a new project window.
Find and select Console App. Make sure that you select the C++ version of this project type, as opposed to C# or Visual Basic.
Select Next.
In the Configure your new project dialog, in Project name, enter helloworld.
In Location, go to and select (or create) the folder where you want to save your project, and then select Create.
Select your target platform architecture. On the Visual Studio toolbar, find the Solution Platforms drop-down box. If you don't see it, select View > Toolbars > Standard to display the toolbar that contains Solution Platforms.
If you're running 64-bit Windows, select x64 in the drop-down box. 64-bit Windows can also run 32-bit applications, so you can choose x86 if you prefer.
In Solution Explorer, right-click your solution, and then select Manage NuGet Packages for Solution to go to the NuGet - Solution window.
Select Browse.
In Package source, select nuget.org.
In the Search box, enter Microsoft.CognitiveServices.Speech. Choose that package after it appears in the search results.
In the package status pane next to the search results, select your helloworld project.
Select Install.
In the Preview Changes dialog, select OK.
In the License Acceptance dialog, view the license, and then select I Accept. The package installation begins. When installation is complete, the Output pane displays a message that's similar to the following text: Successfully installed 'Microsoft.CognitiveServices.Speech 1.15.0' to helloworld.
This guide shows how to install the Speech SDK for Java. If you just want the package name to get started on your own, the Java SDK is not available in the Maven central repository. Whether you're using Gradle or a pom.xml dependency file, you need to add a custom repository that points to https://azureai.azureedge.net/maven/. (See below for the package name.)
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
Create an Eclipse project and install the Speech SDK
Start Eclipse.
In Eclipse Launcher, in the Workspace box, enter the name of a new workspace directory. Then select Launch.
In a moment, the main window of the Eclipse IDE appears. Close the Welcome screen if one is present.
From the Eclipse menu bar, create a new project by selecting File > New > Project.
The New Project dialog appears. Select Java Project, and then select Next.
The New Java Project wizard starts. In the Project name field, enter quickstart. Choose JavaSE-1.8 as the execution environment. Select Finish.
If the Open Associated Perspective? window appears, select Open Perspective.
In Package Explorer, right-click the quickstart project. Select Configure > Convert to Maven Project from the shortcut menu.
The Create new POM window appears. In the Group Id field, enter com.microsoft.cognitiveservices.speech.samples. In the Artifact Id field, enter quickstart. Then select Finish.
Open the pom.xml file and edit it:
At the end of the file, before the closing tag </project>, create a repositories element with a reference to the Maven repository for the Speech SDK:
The Speech SDK is compatible with Android devices that have 32/64-bit ARM and Intel x86/x64 compatible processors.
Install the Speech SDK by using Android Studio
Open Android Studio, and select Start a new Android Studio project in the Welcome window.
The Choose your project wizard appears. Select Phone and Tablet and Empty Activity in the activity selection box. Select Next.
On the Configure your project page:
For Name, enter Quickstart.
For Package name, enter samples.speech.cognitiveservices.microsoft.com.
For Save location, select a project directory.
For Minimum API level, select API 23: Android 6.0 (Marshmallow).
Leave the two check boxes clear, and select Finish.
Android Studio takes a moment to prepare your new Android project. Next, configure the project to know about the Azure Cognitive Services Speech SDK and to use Java 8.
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
The current version of the Cognitive Services Speech SDK is 1.21.0.
The Speech SDK for Android is packaged as an Android Archive (AAR) file, which includes the necessary libraries and required Android permissions.
It's hosted in a Maven repository at https://azureai.azureedge.net/maven/.
Set up your project to use the Speech SDK. Open the Project Structure window by selecting File > Project Structure from the Android Studio menu bar. In the Project Structure window, make the following changes:
In the list on the left side of the window, select Project. Edit the Default Library Repository settings by appending a comma and the Maven repository URL enclosed in single quotation marks: 'https://azureai.azureedge.net/maven/'.
In the same window, on the left side, select app. Then select the Dependencies tab at the top of the window. Select the green plus sign (+), and select Library dependency from the drop-down menu.
In the window that appears, enter the name and version of the Speech SDK for Android: com.microsoft.cognitiveservices.speech:client-sdk:1.21.0. Then select OK.
The Speech SDK should now be added to the list of dependencies:
Select the Properties tab. For both Source Compatibility and Target Compatibility, select 1.8.
Select OK to close the Project Structure window and apply your changes to the project.
This guide shows how to install the Speech SDK for Python. If you just want the package name to get started on your own, run pip install azure-cognitiveservices-speech.
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see:
Install a version of Python from 3.7 to 3.10. The minimum Python version on macOS is 3.7. Select Add Python to your PATH during the installation process on Windows. To check your installation, open a terminal and run the command python --version. If it's installed properly, you'll get a response like "Python 3.8.8".
Important
Make sure that packages of the same platform (x64 or x86) are installed. For example, if you install the x64 redistributable package, then you need to install the x64 package for Python.
Install the Speech SDK from PyPI
The Python Speech SDK is available as a Python Package Index (PyPI) module. For more information, see azure-cognitiveservices-speech . The Python Speech SDK is compatible with Windows, Linux, and macOS. Install a version of Python from 3.7 to 3.10.
You can check which Python Speech SDK version is currently installed by inspecting the azure.cognitiveservices.speech.__version__ variable. For example, run this command in a terminal:
Use the following procedure to download and install the SDK. The steps include downloading the required libraries and header files as a .tar file from https://aka.ms/csspeech/linuxbinary.
Choose a directory to which the Speech SDK files should be extracted, and set the SPEECHSDK_ROOT environment variable to point to that directory. This variable makes it easy to refer to the directory in future commands.
For example, if you want to use the directory speechsdk in your home directory, use a command like the following:
export SPEECHSDK_ROOT="$HOME/speechsdk"
Create the directory if it doesn't exist yet:
mkdir -p "$SPEECHSDK_ROOT"
Download and extract the .tar.gz archive that contains the Speech SDK binaries:
Validate the contents of the top-level directory of the extracted package:
ls -l "$SPEECHSDK_ROOT"
The directory listing should contain the third-party notice and license files. The listing should also contain an include directory that holds header (.h) files and a lib directory that holds libraries for arm32, arm64, x64, and x86.
Path
Description
license.md
License
ThirdPartyNotices.md
Third-party notices
REDIST.txt
Redistribution notice
include
Required header files for C++
lib/arm32
Native library for ARM32 required to link your application
lib/arm64
Native library for ARM64 required to link your application
lib/x64
Native library for x64 required to link your application
lib/x86
Native library for x86 required to link your application
Configure the Go environment
The following steps enable your Go environment to find the Speech SDK. In both steps, replace <architecture> with the processor architecture of your CPU. This will be x86, x64, arm32, or arm64.
Because the bindings rely on cgo, you need to set the environment variables so Go can find the SDK.
This guide shows how to install the Speech SDK for JavaScript for use with Node.js. If you just want the package name to get started on your own, run npm install microsoft-cognitiveservices-speech-sdk from your existing project.
Important
By downloading any of the Azure Cognitive Services Speech SDKs, you acknowledge its license. For more information, see: