Skip to content

A simple wrapper for Google's Text-To-Spech API. Simply list the available voices and convert your text to a mp3 by providing your API key, language code and voicename.

License

Notifications You must be signed in to change notification settings

r-durao-pvotal/Flutter-GoogleCloudTTS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wavenet

pub package

A simple wrapper for Google's Text-To-Spech API. Simply list the available voices and convert your text to a mp3 by providing your API key, language code and voicename.

Usage

  • add the package as a dependency to your pubspec.yaml file:
dependencies:
  flutter:
    sdk: flutter
  wavenet: ^2.0.5
  • Initialize the TextToSpeechService:
TextToSpeechService service = TextToSpeechService('sample api key');
  • List the available voices:
await service.availableVoices();

They can also be found here: https://cloud.google.com/text-to-speech/docs/voices

  • Convert your text to a File object (api key required):
File mp3 = await service.textToSpeech(
  text: 'Hello World',
  voiceName: 'en-GB-Wavenet-F',
  audioEncoding: 'MP3',
  languageCode: 'en-GB'
  pitch: 0.0,
  speakingRate: 1.0,
);

Credits

This is a fork of https://pub.dartlang.org/packages/text_to_speech_api.

About

A simple wrapper for Google's Text-To-Spech API. Simply list the available voices and convert your text to a mp3 by providing your API key, language code and voicename.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 73.2%
  • Java 11.7%
  • Ruby 7.4%
  • Objective-C 4.5%
  • Swift 2.3%
  • Kotlin 0.7%
  • Shell 0.2%