Skip to main content

read_speaker_vector

Function read_speaker_vector 

Source
pub fn read_speaker_vector(path: &Path) -> Result<Vec<f32>, FttsError>
Expand description

Read a precomputed 1,024-wide speaker vector.

See the module docs on why this is a raw vector rather than a .ftvoice pack.

§Errors

FttsError::Input when the file is unreadable or is not exactly SPEAKER_VECTOR_BYTES bytes — a truncated vector would otherwise be padded with silence and change the voice in a way only listening could detect.