Crates.io | tts_rust |
lib.rs | tts_rust |
version | 0.3.5 |
source | src |
created_at | 2021-08-12 09:35:56.455064 |
updated_at | 2022-12-09 13:37:21.232285 |
description | Simple & easy text-to-speech module for your needs. |
homepage | |
repository | https://github.com/dhairy-online/tts_rust |
max_upload_size | |
id | 435171 |
size | 54,093 |
tts_rust
Really Simple Text to Speech module for rust
Add this to your Cargo.toml
file:
tts_rust = "0.3.4"
Uses cargo fmt
as formatter
use cargo update
to update to version 0.3.3
use tts_rust::{ GTTSClient, languages::Languages };
fn main() {
let mut narrator: GTTSClient = GTTSClient {
volume: 1.0,
language: Languages::English, // use the Languages enum
};
narrator.speak("Hello, World!");
}
use tts_rust::{ GTTSClient, languages::Languages };
fn main() {
let mut narrator: GTTSClient = GTTSClient {
volume: 1.0,
language: Languages::English,
};
narrator.speak("Starting test?");
let ms = std::time::Duration::from_millis(1000);
for _x in 1..9 {
narrator.volume += 1.0;
let to_speak: String = String::from("Loop ") + &narrator.volume.to_string();
narrator.speak(&to_speak);
std::thread::sleep(ms);
}
}