Implement volume control

main
Elnu 1 year ago
parent 54de45b58b
commit 4d024d07a7

@ -14,10 +14,16 @@ pub struct Data {
} }
lazy_static! { lazy_static! {
static ref NARRATOR: GTTSClient = GTTSClient { static ref NARRATOR: GTTSClient = {
volume: 1.0, dotenv::dotenv().expect("Failed to load .env file");
language: Languages::English, GTTSClient {
tld: "com", volume: std::env::var("VOLUME")
.ok()
.and_then(|str| Some(str.parse().unwrap()))
.unwrap_or(1.0),
language: Languages::English,
tld: "com",
}
}; };
} }

Loading…
Cancel
Save