Skip to content
A simple wrapper for Google's Text-To-Spech API for Dart and Flutter projects.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android
example
lib
test
.gitignore
CHANGELOG.md
LICENSE
README.md
README.md~
pubspec.lock
pubspec.yaml
text_to_speech_api.iml

README.md

text_to_speech_api

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
  text_to_speeech_api: ^0.0.1
  • Initialize the TextToSpeechService (optional: provide your api key)
TextToSpeechService service = TextToSpeechService('sample api key');
  • List the available voices (no api key required)
await service.availableVoices();
  • Convert your text to a File object (api key required)
File mp3 = await service.textToSpeech(
  text: 'Hello World',
  voiceName: 'de-DE-Wavenet-D',
  audioEncoding: 'MP3',
  languageCode: 'de-DE'
);
You can’t perform that action at this time.