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