Skip to main content

Crate libdengjen

Crate libdengjen 

Source

Modules§

error_codes
synth_event
synth_mode

Structs§

AudioInfo
DengjenFFIError
DengjenVoice
PiperSynthConfig
SynthesisEvent
SynthesisParams
Parameters for libdengjenSpeak and libdengjenSpeakToFile.

Constants§

DENGJEN_ABI_VERSION
Bumped on any incompatible change to the exported functions or structs.
PIPER_SYNTH_CONFIG_NO_SPEAKER

Functions§

_internal_libdengjenFreePiperSynthConfig⚠
Safety
_internal_libdengjenFreeString⚠
Public destructor for strings managed by the other side of the FFI.
_internal_libdengjenUnloadDengjenVoice⚠
Safety
libdengjenAbiVersion
The ABI version this library was built with; bindings compare it with the one they were generated against before making any other call.
libdengjenCancel⚠
Safety
libdengjenFreePiperSynthConfig⚠
Safety
libdengjenFreeString⚠
Safety
libdengjenFreeSynthesisEvent⚠
Safety
libdengjenGetAudioInfo⚠
Safety
libdengjenGetPiperDefaultSynthConfig⚠
Safety
libdengjenGetSynthesisParameter⚠
Reads a single named entry from the voice’s generic synthesis parameters map — the read-side counterpart to libdengjenSetSynthesisParameter. Returns true and writes *out_value_ptr if key is present in the voice’s current generic parameters map; returns false (not an error) if key is absent, or if the loaded backend has no synthesis config at all (e.g. Kokoro).
libdengjenLoadVoiceFromConfigPath
libdengjenSetPiperSynthConfig⚠
Safety
libdengjenSetSynthesisParameter⚠
Sets a single named entry in the voice’s generic synthesis parameters map. This is an additive escape hatch alongside the named-field setters (e.g. libdengjenSetPiperSynthConfig): key may be any string, but whether it has any effect depends on the loaded backend — a backend that doesn’t recognize key silently ignores it. Piper only recognizes length_scale, noise_scale, and noise_w; Kokoro ignores all three (it has no tunable synthesis parameters).
libdengjenSpeak⚠
Safety
libdengjenSpeakToFile⚠
Safety
libdengjenUnloadDengjenVoice⚠
Cancels any running synthesis, waits for nonblocking workers to stop, then frees the voice. No callback fires after this returns, so user_data may be released immediately afterwards. The exception is a call from inside a callback of the same voice: it frees the voice without waiting, and that worker still delivers a final FINISHED event, so keep user_data alive until it arrives.

Type Aliases§

DengjenFFIResult
SpeechSynthesisCallback