Expand description
WASM-compatible synthesis API
Provides an API that works without filesystem access, suitable for WebAssembly (wasm32) targets. Model and config data are passed as byte slices instead of file paths.
This module is available on all platforms but is designed primarily for WASM.
On native platforms, prefer PiperVoice::load() for convenience.
Structs§
- Wasm
Model Capabilities - Model capabilities detected from ONNX input/output node names.
- Wasm
Synthesis Result - WASM-friendly synthesis result (no file I/O)
- Wasm
Voice - WASM-compatible voice synthesizer. Loads model from bytes rather than file paths.
Functions§
- parse_
config - Parse config JSON string into VoiceConfig
- samples_
i16_ to_ f32 - Convert i16 PCM samples to f32 normalized audio (-1.0 to 1.0)
- samples_
to_ wav_ bytes - Convert f32 audio to WAV bytes (in-memory, no filesystem)