tts_rust icon indicating copy to clipboard operation
tts_rust copied to clipboard

Error while compiling project with tts_rust

Open vladceresna opened this issue 1 year ago • 0 comments

What`s doing? Created file lib.rs with this function:

use tts_rust::{ tts::GTTSClient, languages::Languages };
fn tts_say(text: String) {
    let mut narrator: GTTSClient = GTTSClient {
        volume: 1.0, 
        language: Languages::Ukrainian,
        tld: "com",
    };
    narrator.speak(text.as_str()).unwrap();
}

And in Cargo.toml added:

[dependencies]
tts_rust = "0.3.3"

Error while runtime:

thread '<unnamed>' panicked at core/src/panicking.rs:221:5:
unsafe precondition(s) violated: slice::get_unchecked_mut requires that the index is within the slice
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.

vladceresna avatar Dec 31 '24 13:12 vladceresna