From 728c409e25341433f96ff6523f44a675a635058a Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 25 Nov 2020 09:54:46 -0600 Subject: [PATCH] Add example for unscientifically measuring latency of TTS. --- examples/latency.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/latency.rs diff --git a/examples/latency.rs b/examples/latency.rs new file mode 100644 index 0000000..819becc --- /dev/null +++ b/examples/latency.rs @@ -0,0 +1,14 @@ +use std::io; + +use tts::*; + +fn main() -> Result<(), Error> { + env_logger::init(); + let mut tts = TTS::default()?; + println!("Press Enter and wait for speech."); + loop { + let mut _input = String::new(); + io::stdin().read_line(&mut _input)?; + tts.speak("Hello, world.", true)?; + } +}