espeak 0.1.2 copy "espeak: ^0.1.2" to clipboard
espeak: ^0.1.2 copied to clipboard

Text to phoneme conversion, powered by espeak-ng.

espeak #

pub package

Text to phoneme conversion, powered by espeak-ng.

The native library compiles automatically via Dart Native Assets (requires a C compiler).

Usage #

import 'package:espeak/espeak.dart';

final espeak = Espeak.init('./espeak-data');
final phonemes = espeak.phonemize('Hello world');
print(phonemes); // həlˈoʊ wˈɜːld
espeak.dispose();

Phoneme Data #

espeak needs compiled phoneme data at runtime. Add espeak as a dependency and run the compiler:

dart run espeak:compile_data --all --exclude=fo --output ./espeak-data

Then pass the output path to Espeak.init().

Note: espeak_cli is also available but dart pub global activate doesn't support native assets yet. Use dart run from a project that depends on espeak instead.

0
likes
140
points
0
downloads

Documentation

API reference

Publisher

verified publishergau.moe

Weekly Downloads

Text to phoneme conversion, powered by espeak-ng.

Repository (GitHub)

Topics

#tts #phoneme #speech #nlp #ffi

License

MIT (license)

Dependencies

ffi, hooks, native_toolchain_c

More

Packages that depend on espeak