Skip to main content

try_synthesize

Function try_synthesize 

Source
pub fn try_synthesize(
    bundle: &ModelBundle,
    request: &WireRequest<'_>,
) -> Result<Option<SynthesizedAudio>, FttsError>
Expand description

Try to synthesize through a resident daemon, spawning one if none is listening.

Ok(None) means “no resident path available, run inline” and is always safe; the daemon spawned in the background (if any) will serve the NEXT invocation. Ok(Some) is a completed synthesis; Err is a genuine synthesis error from the daemon, carrying the same exit-code class the inline path would have produced.