Skip to main content

store_read_aloud

Function store_read_aloud 

Source
pub fn store_read_aloud(dir: &Path, samples: &[f32]) -> Result<(), Error>
Expand description

Write one recording into the read-aloud set: the passage read, the take the words were recorded in, and a manifest naming the wav’s own sha256.

Every recording is KEPT: the set is a list, a later recording adds to it rather than replacing it, and the page drops one by name when its reader asks. The take’s meta.json lands last, which is what makes it complete to read_aloud - an interrupted write reads as no recording rather than as a partial one. The outcome is the caller’s to report, because the recording is a press somebody is watching.