Hierarchy

  • BaseStreamingTurnDetector
    • TurnDetector

Constructors

Accessors

  • get model(): TurnDetectorModel
  • Current model name. Starts at the construction-time selection and flips to 'turn-detector-v1-mini' after a cloud→local fallback: the detector and its (single) active stream share one mutable ThresholdOptions, and the stream writes the swap back here so EOU metrics and audio_recognition see a consistent view. The fallback is one-way and sticky.

    Returns TurnDetectorModel

  • get thresholds(): Readonly<Record<string, number>>
  • Most-recent materialized threshold map (after any cloud→local fallback rescale or server-default adoption).

    Returns Readonly<Record<string, number>>

Methods

  • Threshold above which a pause is a backchannel opportunity, or undefined when backchannel is disabled (server sent none, or the local mini model).

    Parameters

    Returns Promise<undefined | number>

  • Threshold below which the detector treats the prediction as "unlikely to be end-of-turn". Returns undefined when the language isn't covered.

    Parameters

    Returns Promise<undefined | number>

  • Replace the user threshold override at runtime. The shared ThresholdOptions re-resolves against the current (server or shipped) defaults, so an active stream picks it up immediately.

    Parameters

    • opts: {
          backchannelThreshold?: number | Record<string, number>;
          unlikelyThreshold?: number | Record<string, number>;
      } = {}
      • Optional backchannelThreshold?: number | Record<string, number>
      • Optional unlikelyThreshold?: number | Record<string, number>

    Returns void