flowery_tts 1.2.0 copy "flowery_tts: ^1.2.0" to clipboard
flowery_tts: ^1.2.0 copied to clipboard

A free Text-to-Speech service providing 850+ voices with English translation support. This package is an unofficial wrapper of Flowery TTS API.

example/example.dart

import 'dart:io';

// Import the package.
import 'package:flowery_tts/flowery_tts.dart';

// Source: https://en.wikipedia.org/wiki/Dart_(programming_language)
const paragraph = '''
Dart is a programming language designed by Lars Bak and Kasper Lund and
developed by Google. It can be used to develop web and mobile apps as
well as server and desktop applications.

Dart is an object-oriented, class-based, garbage-collected language with
C-style syntax. It can compile to machine code, JavaScript, or WebAssembly.
It supports interfaces, mixins, abstract classes, reified generics and
type inference.''';

// Main function.
void main() async {
  // Instantiate a new Flowery class.
  const flowery = Flowery();

  // Convert the given text.
  final audio = await flowery.tts(text: paragraph, voice: 'Anna');

  // Convert the raw audio output as an audio file.
  final file = File('audio.mp3')..writeAsBytesSync(audio);

  // ignore: avoid_print
  print('Saved audio file at "${file.absolute.path}".');
}
7
likes
160
pub points
69%
popularity

Publisher

unverified uploader

A free Text-to-Speech service providing 850+ voices with English translation support. This package is an unofficial wrapper of Flowery TTS API.

Repository (GitHub)
View/report issues

Topics

#api-wrapper #free #text-to-speech #translation #tts

Documentation

API reference

License

MIT (license)

Dependencies

http, meta

More

Packages that depend on flowery_tts