Skip to content

alkove.VoiceprintLearner

class VoiceprintLearner(
models: Models,
*,
voiceprint: Optional[Voiceprint] = None,
source: str = 'raw',
)

A print learned from the user’s speech, as the inputs of the web SDK learn it: a window joins only if it sounds like the others.

offer(pcm: Any) -> dict

Speech of any length, cut into 1.5 s windows, quiet ones skipped: {accepted, rejected, restarted, progress, ready}.

forget() -> None

Drops every window: learning starts again from nothing.

Attribute Type Description
progress float 0 to 1: the windows accepted so far, out of the 4 (6 s of voice) a print needs.
ready bool The print has its 4 windows: Focus can use it.
voiceprint Optional[Voiceprint] The print learned so far once ready, else None.