mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-23 04:49:38 +00:00
16 lines
330 B
Rust
16 lines
330 B
Rust
use std::{thread, time};
|
|
|
|
use tts::*;
|
|
|
|
fn main() -> Result<(), Error> {
|
|
env_logger::init();
|
|
let mut tts = Tts::default()?;
|
|
let mut phrase = 1;
|
|
loop {
|
|
tts.speak(format!("Phrase {}", phrase), false)?;
|
|
let time = time::Duration::from_secs(5);
|
|
thread::sleep(time);
|
|
phrase += 1;
|
|
}
|
|
}
|