diff options
| author | elvis <elvis@claros.ar> | 2026-09-26 20:20:19 -0300 |
|---|---|---|
| committer | elvis <elvis@claros.ar> | 2026-09-26 20:20:19 -0300 |
| commit | 8518a63f55153e7f45fd49ad6caff5555f4e374f (patch) | |
| tree | 636684eea3fa6f35d78282ab95eb687ef49154af /crates/asist-core/src/event.rs | |
| parent | 69de76dc9cbedc6092d1e5ce84094a8030de1470 (diff) | |
| download | asist-p-8518a63f55153e7f45fd49ad6caff5555f4e374f.tar.gz asist-p-8518a63f55153e7f45fd49ad6caff5555f4e374f.zip | |
Translate code, comments, logs and terminal UI to English; add English README; rename scriptsHEADmain
Diffstat (limited to 'crates/asist-core/src/event.rs')
| -rw-r--r-- | crates/asist-core/src/event.rs | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/crates/asist-core/src/event.rs b/crates/asist-core/src/event.rs index 549bec0..bf9a6e6 100644 --- a/crates/asist-core/src/event.rs +++ b/crates/asist-core/src/event.rs @@ -1,9 +1,9 @@ use std::time::{Duration, Instant}; -/// Identifica un turno de conversación (una intervención del usuario y la -/// respuesta que provoca). Todo lo que viaja por el bus lo lleva, para que un -/// resultado que llega tarde no se confunda con el turno que ya está en curso -/// —el caso típico cuando el usuario interrumpe al asistente. +/// Identifies a conversation turn (one user utterance and the answer it +/// triggers). Everything travelling on the bus carries it, so a result that +/// arrives late is not mistaken for the turn in progress, the typical case +/// being the user interrupting the assistant. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] pub struct TurnId(pub u64); @@ -13,32 +13,32 @@ impl std::fmt::Display for TurnId { } } -/// Motivo por el que se corta la reproducción en curso. +/// Why the current playback is cut. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum InterruptReason { - /// El usuario ha empezado a hablar encima del asistente (barge-in). + /// The user started talking over the assistant (barge-in). UserSpoke, - /// Petición explícita: tecla, señal o cierre. + /// Explicit request: key, signal or shutdown. Requested, } -/// Todo lo que las etapas se cuentan entre sí. Un único enum mantiene el bus -/// observable: el renderizador y la telemetría ven exactamente los mismos -/// eventos que el orquestador, sin canales paralelos que se desincronicen. +/// Everything the stages tell each other. A single enum keeps the bus +/// observable: the renderer and the telemetry see exactly the same events as +/// the orchestrator, with no parallel channels that fall out of sync. #[derive(Debug, Clone)] pub enum Event { - /// El VAD ha detectado el arranque de una intervención. + /// The VAD detected the start of an utterance. SpeechStarted { turn: TurnId, at: Instant }, - /// Transcripción provisional de la ventana deslizante: `committed` ya es - /// estable, `volatile` todavía puede cambiar. + /// Partial transcription of the sliding window: `committed` is already + /// stable, `volatile` may still change. Partial { turn: TurnId, committed: String, volatile: String, }, - /// Transcripción definitiva de la intervención completa. + /// Final transcription of the whole utterance. Transcript { turn: TurnId, text: String, @@ -46,33 +46,33 @@ pub enum Event { decode: Duration, }, - /// La intervención no contenía nada transcribible. + /// The utterance had nothing transcribable. Discarded { turn: TurnId }, - /// Primer fragmento de texto que devuelve el modelo. + /// First text fragment returned by the model. ReplyStarted { turn: TurnId, ttft: Duration }, - /// Un trozo de respuesta según llega del modelo. + /// A piece of the answer as it arrives from the model. ReplyDelta { turn: TurnId, text: String }, - /// Una frase completa lista para sintetizar. + /// A complete sentence ready to be synthesized. Sentence { turn: TurnId, index: usize, text: String, }, - /// Respuesta completa del modelo para este turno. + /// Complete model answer for this turn. ReplyDone { turn: TurnId, text: String }, - /// El modelo ha pedido ejecutar una herramienta. + /// The model asked to run a tool. ToolRequested { turn: TurnId, name: String, arguments: String, }, - /// Resultado de esa ejecución. + /// Result of that run. ToolFinished { turn: TurnId, name: String, @@ -81,22 +81,22 @@ pub enum Event { took: Duration, }, - /// Primer audio audible del turno: la métrica que de verdad percibe quien habla. + /// First audible audio of the turn: the metric the speaker really perceives. AudioStarted { turn: TurnId, latency: Duration }, - /// Se ha terminado de reproducir todo lo del turno. + /// Everything of the turn has finished playing. AudioFinished { turn: TurnId }, - /// Se ha cortado la reproducción. + /// Playback was cut. Interrupted { turn: TurnId, reason: InterruptReason, }, - /// Aviso no fatal; el turno continúa. + /// Non-fatal warning; the turn continues. Warning { turn: TurnId, message: String }, - /// Fallo que aborta el turno. + /// Failure that aborts the turn. Failed { turn: TurnId, message: String }, /// Cierre ordenado. |