![]() |
AT&T API Platform SDK for Microsoft®
2.3.3
Wrapper classes that allow developers to build robust applications using .NET
|
This cookbook shows you how to develop a Text To Speech Service application using the Platform SDK for Microsoft.
The Platform SDK for Microsoft provides the following method:
To use these methods in an application, perform the following steps:
To convert text to speech, invoke the TextToSpeech method using the RequestFactory instance by passing text to be converted along with optional content type, content language, return audio format and X-Args, as shown in the following code example.
// Text to be converted to speech audio. // Must be of type specified in the Content-Type header. string textToConvert = "xxxxxxxxxxxx"; // Must be defined as one of the following values: // text/plain // application/ssml+xml string contentType = "text/plain"; // US English string contentLanguage = "en-US"; TextToSpeechResponse response = this.requestFactory.TextToSpeech(textToConvert, contentType, contentType);