tts_azure 0.0.5 copy "tts_azure: ^0.0.5" to clipboard
tts_azure: ^0.0.5 copied to clipboard

outdated

Text to Speech from Azure. A Flutter package that interacts with the Azure Cognitive Services REST API to convert text to speech.

Speech to text from Azure. #

image alt image alt

A Flutter package to use Text to Speech from Azure.

Package that interacts with the Azure Cognitive Services REST API to convert text to speech.

Getting Started #

  1. Create an account and subscribe in Azure
  2. Add subscription.
  3. Add the Cognitive Services resource and get the endpoint and subscription key
  4. Install tts_azure package.

Usage #

Complete Example #

There is a very simple example project in the example folder. Check it out. Otherwise, keep reading to get up and running.

To use this package, add tts_azure as a dependency in your pubspec.yaml file

Setting up #

First, you must define a new TTS Azure object by initializing it and passing it the required parameters as such:

final ttsazure = TTSAzure("YOUR_SUBSCRIPTION_ID", "YOUR_REGION_IDENTIFIER");

Convert Text ➡️ Speech #

Finally, the only thing left to do is call the play() method to convert the text to speech, in this way:

String text = "Hello World";
String lang = "en-US";
String shortName = "BenjaminRUS"; // The voice.

ttsazure.play(text, lang, shortName);

NOTE: The Azure API allows you to use the authentication token (automatically obeyed by this package) only for 10 minutes, so this package updates the token in a minimum time of 9 minutes.

Author: @leonus96

12
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Text to Speech from Azure. A Flutter package that interacts with the Azure Cognitive Services REST API to convert text to speech.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

audioplayer, flutter, http, path_provider, xml

More

Packages that depend on tts_azure