Skip to content

alkove.Turns

class Turns(
models: Models,
rate: int = 16000,
*,
speech: Optional[SpeechParams] = None,
turn: Union[bool, TurnParams] = True,
interrupt: Union[bool, InterruptParams] = False,
)

Cue alone on the raw microphone, without Focus, for a microphone across the room: its phrases, the user’s turns (turn, turnend) and, with interrupt, the far end’s interruptions, as Chain gives them.

push(pcm: Any) -> List[dict]

Samples in (float32, or int16), the events they gave (speechstart, speechend, turn, turnend, interruptions), in seconds from the stream’s start.

far_end_active(on: bool) -> None

The far end (the agent’s voice) starts or stops: speech that starts while it speaks may interrupt it.

Attribute Type Description
rate int The stream’s rate, in Hz.