1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-07-27 06:29:38 +00:00

Clean up println! and comparison calls.

This commit is contained in:
Nolan Darilek 2020-08-12 09:54:25 -05:00
parent 427ca027be
commit 7eccb9f573

View File

@ -51,16 +51,10 @@ impl Backend for NSSpeechSynthesizerBackend {
}
fn speak(&mut self, text: &str, interrupt: bool) -> Result<(), Error> {
println!("speak({}, {})", text, interrupt);
trace!("speak({}, {})", text, interrupt);
let str = unsafe { NSString::alloc(nil).init_str(text) };
let success: BOOL = unsafe { msg_send![self.0, startSpeakingString: str] };
println!("Comparing");
if success == NO {
println!("Failed");
Ok(())
} else {
Ok(())
}
let _: BOOL = unsafe { msg_send![self.0, startSpeakingString: str] };
Ok(())
}
fn stop(&mut self) -> Result<(), Error> {