wavekat_turn/text/livekit.rs
1//! LiveKit Turn Detector backend.
2//!
3//! Text-based end-of-utterance detection using LiveKit's distilled
4//! Qwen2.5-0.5B ONNX model. Operates on ASR transcript text with
5//! optional conversation context.
6//!
7//! - Model size: ~400 MB
8//! - Inference: ~25 ms on CPU
9//! - License: LiveKit Model License
10
11use crate::{ConversationTurn, TextTurnDetector, TurnError, TurnPrediction};
12
13/// LiveKit end-of-utterance detector.
14pub struct LiveKitEou {
15 // TODO: ONNX session + tokenizer
16}
17
18impl LiveKitEou {
19 /// Create a new LiveKit turn detector, loading the ONNX model.
20 pub fn new() -> Result<Self, TurnError> {
21 todo!("load LiveKit EOU ONNX model")
22 }
23}
24
25impl TextTurnDetector for LiveKitEou {
26 fn predict_text(
27 &mut self,
28 _transcript: &str,
29 _context: &[ConversationTurn],
30 ) -> Result<TurnPrediction, TurnError> {
31 todo!("run ONNX inference")
32 }
33
34 fn reset(&mut self) {
35 todo!("reset internal state")
36 }
37}