espeakng-sys-0.1.3 has been yanked.
eSpeak NG bindings for Rust
FFI bindings to the C library eSpeak NG for Rust
Current eSpeak NG version: 1.51
Dependencies
Example
This example shows how you can convert a &str to a Vec
use *;
use ;
use ;
use Cell;
use lazy_static;
use ;
/// The name of the voice to use
const VOICE_NAME: &str = "English";
/// The length in mS of sound buffers passed to the SynthCallback function.
const BUFF_LEN: i32 = 500;
/// Options to set for espeak-ng
const OPTIONS: i32 = 0;
lazy_static!
/// Spoken speech
/// Perform Text-To-Speech
/// int SynthCallback(short *wav, int numsamples, espeak_EVENT *events);
///
/// wav: is the speech sound data which has been produced.
/// NULL indicates that the synthesis has been completed.
///
/// numsamples: is the number of entries in wav. This number may vary, may be less than
/// the value implied by the buflength parameter given in espeak_Initialize, and may
/// sometimes be zero (which does NOT indicate end of synthesis).
///
/// events: an array of espeak_EVENT items which indicate word and sentence events, and
/// also the occurance if <mark> and <audio> elements within the text. The list of
/// events is terminated by an event of type = 0.
///
/// Callback returns: 0=continue synthesis, 1=abort synthesis.
unsafe extern "C"
Common issues
-
'a `libclang` shared library is not loaded on this thread'Enable the
clang-runtimefeature. -
(Flatpack)
/usr/lib/sdk/llvm16/lib/libclang.so: undefined reference to `LLVMInitializeWebAssemblyAsmPrinter@LLVM_16'Enable the
clang-runtimefeature.
License
espeakng-sys is dual licensed under the Apache-2.0 and MIT license, at your discretion.
Do note though, espeak-ng itself is licensed under the GPL