gizai/tasks/transcription
the speech-to-text task. A model family that hears speech gives a Transcriber (gizai/family's transcriber): hear gives the text spoken in 16 kHz mono samples, in a language the model names ("" or "auto": the model finds it).
import * as Transcription from "gizai/tasks/transcription";Types
Transcriber
type Transcriber = { hear: (samples: Vec<f32>, language: string) => string throws string; }A speech model: hear gives the text spoken in samples at RATE, in language ("" or "auto": the model finds it).
hear:(samples: Vec<f32>, language: string) => string throws string
Functions
samplesOf
function samplesOf(ffmpeg: string, data: bytes, rate: i64 = RATE): Vec<f32> throws stringThe mono samples at rate (16 kHz by default) of a recording in any format the program ffmpeg reads (WebM, Ogg,
MP3, WAV, ...).
Effects: fail, read, write, console, io, alloc.
Constants
RATE
const RATE: i64 = 16000The rate of the samples a Transcriber hears.