September 2018: New Microsoft Cognitive Services Speech SDK available
We released a new Speech SDK supporting the new Speech Service. The new Speech SDK comes with support for Windows, Android, Linux, Javascript and iOS.
Please check out Microsoft Cognitive Services Speech SDK for documentation, links to the download pages, and the samples.
NOTE: The content of this repository is supporting the Bing Speech Service, not the new Speech Service. Bing Speech Service has been deprecated, please use the new Speech Service.
This repository contains samples for transcribing speech to text using Microsoft Speech Service, an offering within Microsoft Cognitive Services, formerly known as Project Oxford.
The C# client library is provided as Nuget packages. There are two NuGet packages available at nuget.org.
- Microsoft.ProjectOxford.SpeechRecognition-x86 for x86 build.
- Microsoft.ProjectOxford.SpeechRecognition-x64 for x64 build.
This sample is a Windows WPF application to demonstrate the use of Speech-to-Text with Microsoft Speech API. It demonstrates the following features using a wav file or external microphone input:
- Short-form recognition
- Long-form dictation
- Recognition with intent
- Start Microsoft Visual Studio 2015 and select File > Open > Project/Solution.
- Navigate to the folder where you cloned the repository.
- Double-click the Visual Studio 2015 Solution file
SpeechToText-WPF-Sample.sln
. - There are 2 projects in the solution. One is for the x86 platform, and the other is for the x64 platform. Choose the build platform (x86 or x64) and configuration (Debug or Release) of your preference, and build the project.
- For intent recognition to work, you need to sign up to the Language Understanding Intelligent Service (LUIS). Please put the endpoint URL of your LUIS app in
app.config
file in thesamples/SpeechRecognitionServiceExample
folder. For more infomraiton on the endpoint URL of LUIS app, see Publish LUIS App. You must replace the character&
in the LUIS endpoint URL with&
to ensure that the URL is correctly interpreted by the XML parser.
Before running the sample, you must first have a subscription key. You can get free trial subscription keys from the Cognitive Services Subscription page. After you select the Speech API, click Get API Key to get the key. It returns a primary and secondary key. Both keys are tied to the same quota, so you may use either key.
Paste your subscription key to the text edit box saying "Paste your subscription key here to start" on the top right corner. You can choose to persist your subscription key in your machine by clicking "Save Key" button. When you want to delete the subscription key from the machine, click "Delete Key" to remove it from your machine.
Microsoft will receive the audio you upload and may use them to improve the speech API and related services. By submitting an audio, you confirm you have consent from everyone in it.
We welcome contributions. Feel free to file issues and pull requests on this repository and we'll address them as we can. Learn more about how you can help on our Contribution Rules & Guidelines.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.
Sample images are licensed separately, please refer to LICENSE-IMAGE.
Developers using Cognitive Services, including this client library and sample, are expected to follow the "Developer Code of Conduct for Microsoft Cognitive Services", found at http://go.microsoft.com/fwlink/?LinkId=698895.