jBernavaPrah / azure-speech-sdk-rs

Rust implementation of Azure speech SDK. Without external libs.
Apache License 2.0
1 stars 1 forks source link

When i forcibly stop listening,will return error #17

Open li-yu-tfs opened 2 hours ago

li-yu-tfs commented 2 hours ago

When i forcibly stop listening,will return error

thread 'tokio-runtime-worker' panicked at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/alloc/src/vec/mod.rs:2201:36: range end index 4096 out of range for slice of length 2884 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'tokio-runtime-worker' panicked at /xxxxx/azure-speech-0.3.0/src/connector/client.rs:124:79: called Result::unwrap() on an Err value: SendError(Ok(Message { id: "xxxxx", path: "speech.startdetected", headers: [("Content-Type", "application/json; charset=utf-8")], data: Text(Some("{\"Offset\":5100000}")) }))

And I get an error the second time I open it

thread '' panicked at src/handlers/listening_speak.rs:70:10: to recognize: InternalError("channel closed")

li-yu-tfs commented 2 hours ago

I will only initialize azure client once again globally

li-yu-tfs commented 2 hours ago

Actually, the question I want to express is, how do I force stop_listen?