pub fn speaker_from_reference_pcm(
bundle: &ModelBundle,
pcm: Vec<f32>,
cleanup: ReferenceCleanup<'_>,
) -> Result<Vec<f32>, FttsError>Expand description
Derive a speaker vector from already-decoded mono 24 kHz reference PCM.
The PCM-level half of speaker_from_voice, split out so hosts that capture audio
themselves (the iOS app through ftts-ffi) run exactly the enrollment pipeline the
CLI runs — same cleanup stages, same encoder, same finiteness refusal — instead of a
parallel one that quietly skips the denoiser.
§Errors
When feature extraction or encoding fails, or the encoder yields a non-finite vector.