AT&T API Platform SDK for Microsoft®  2.3.3
Wrapper classes that allow developers to build robust applications using .NET
 All Classes Namespaces Functions Enumerations Properties
Speech Service Cookbook

Overview

This cookbook shows you how to develop a Speech Service application using the Platform SDK for Microsoft.
The Platform SDK for Microsoft provides the following methods:

  • SpeechToText

To use these methods in an application, perform the following steps:

  1. Add a reference to the SDK as shown in the About the Cookbooks section and import the ATT_MSSDK.Speechv3 namespace.
  2. Create an instance of RequestFactory with the scope type RequestFactory.ScopeTypes.Speech, as shown in the About the Cookbooks section.
  3. Invoke the Speech Service methods using the RequestFactory instance.

Converting Spoken Audio to Text

To convert the spoken audio to text, invoke the SpeechToText method using the RequestFactory instance by passing an audio file name and the context to be applied for Speech to Text conversion as shown in the following code example.

 // Path of the audio file which needs to convert to text
 string fileToUpload = "xxxxxxxxx\\xxxxxxxx\\xxxxx"; 
 SpeechResponse response = this.requestFactory.SpeechToText(fileToUpload, XSpeechContext.Generic);