gizai/tasks/speech
text to speech. A speech model of the catalog (Family.speaker) says a text in a voice: one cloned from a recording, or one described in words.
import * as Speech from "gizai/tasks/speech";Types
Voice
type Voice = { samples: Vec<f32>; text: string; described: string; language: string; }A voice: a recording (samples at the speaker's rate) and the words said in it, else a description in words
("female, young adult, moderate pitch"; "": the model's own). language: a code, or "" for the model's guess.
samples:Vec<f32>text:stringdescribed:stringlanguage:string
Speaker
type Speaker = { rate: i64; say: (text: string, voice: Voice) => Vec<f32> throws string; }A speech model: its sample rate, and say, the mono samples of text in voice.
rate:i64say:(text: string, voice: M83.Voice) => Vec<f32> throws string
Functions
ownVoice
function ownVoice(): VoiceThe model's own voice.