From 93b81c1b09192c9b9a393fe125b57055382b9c73 Mon Sep 17 00:00:00 2001 From: Esther Alter Date: Mon, 17 Jun 2024 15:48:16 -0400 Subject: [PATCH] Let Casey finish speaking --- text/src/tts.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/text/src/tts.rs b/text/src/tts.rs index e6f572c..ef2b0ef 100644 --- a/text/src/tts.rs +++ b/text/src/tts.rs @@ -259,6 +259,8 @@ fn on_utterance_end(_: UtteranceId) { #[cfg(test)] mod tests { + use std::{thread::sleep, time::Duration}; + use crate::Enqueable; use common::get_test_config; @@ -279,6 +281,8 @@ mod tests { assert!(tts.is_speaking()); tts.stop(); tts.update(); + // Let Casey finish speaking. + sleep(Duration::from_secs(1)); assert!(!tts.is_speaking()); } }