#[non_exhaustive]pub struct DeepgramListenV2Provider {
pub provider_type: DeepgramProviderType,
pub version: DeepgramListenV2Version,
pub model: String,
pub language_hints: Vec<String>,
pub eot_threshold: Option<f64>,
pub eager_eot_threshold: Option<f64>,
pub eot_timeout_ms: Option<u32>,
pub keyterms: Vec<String>,
}Expand description
Deepgram V2 (Flux STT) provider. model is required per spec.
Mirrors DeepgramListenProviderV2 in
asyncapi/schemas/agent/listen-providers/deepgram-v2.yml. The
end-of-turn fields (eot_threshold, eager_eot_threshold,
eot_timeout_ms) tune Flux STT’s built-in turn detection and can also be
changed mid-session with UpdateListen.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.provider_type: DeepgramProviderTypeAlways DeepgramProviderType::Deepgram.
version: DeepgramListenV2VersionAPI version — V2 (Flux STT).
model: StringFlux STT model identifier (e.g. flux-general-en, flux-general-multi).
language_hints: Vec<String>BCP-47 language codes that bias flux-general-multi toward specific
languages. Always serialized as a JSON array under language_hints,
even for a single hint. Without hints the model auto-detects the
spoken language; single-language models ignore the field.
eot_threshold: Option<f64>End-of-turn confidence required to finish a turn. Valid range
0.5–1.0; server default 0.7. Set to 1.0 to fully suppress
natural end-of-turn detection and end turns only with
ForceEndTurn (see AgentHandle::force_end_turn).
eager_eot_threshold: Option<f64>End-of-turn confidence required to fire an eager end-of-turn event.
When set, enables eager end-of-turn / turn-resumed behavior. Valid
range 0.3–0.9.
Note: Flux STT sessions can also emit an EndOfTurn server message
({"type":"EndOfTurn","trigger":"model"|"timeout"}) that is not in
the published AsyncAPI spec yet; it currently surfaces as
AgentResponse::Unknown.
eot_timeout_ms: Option<u32>A turn is finished once this many milliseconds have elapsed after
speech, regardless of end-of-turn confidence. Server default 5000.
keyterms: Vec<String>Keyterms to boost recognition for specialized terminology.
Implementations§
Source§impl DeepgramListenV2Provider
impl DeepgramListenV2Provider
Sourcepub fn new(model: impl Into<String>) -> Self
pub fn new(model: impl Into<String>) -> Self
Construct with the given model and no other fields set.
Sourcepub fn with_language_hints<I, S>(self, hints: I) -> Self
pub fn with_language_hints<I, S>(self, hints: I) -> Self
Replace the language hints (language_hints). Serializes as a JSON
array even when a single hint is given.
Sourcepub fn with_language_hint(self, hint: impl Into<String>) -> Self
pub fn with_language_hint(self, hint: impl Into<String>) -> Self
Append a single language hint. Convenience over
Self::with_language_hints; the field still serializes as a JSON
array.
Sourcepub fn with_eot_threshold(self, threshold: f64) -> Self
pub fn with_eot_threshold(self, threshold: f64) -> Self
Set eot_threshold (valid range 0.5–1.0; server default 0.7).
Sourcepub fn with_eager_eot_threshold(self, threshold: f64) -> Self
pub fn with_eager_eot_threshold(self, threshold: f64) -> Self
Set eager_eot_threshold (valid range 0.3–0.9).
Sourcepub fn with_eot_timeout_ms(self, timeout_ms: u32) -> Self
pub fn with_eot_timeout_ms(self, timeout_ms: u32) -> Self
Set eot_timeout_ms (server default 5000).