mirror of https://github.com/ndarilek/tts-rs.git
Try to intercept cases where voice might be nil.
This commit is contained in:
parent
4d01717e75
commit
569bb160b8
|
@ -42,6 +42,12 @@ impl AvFoundation {
|
||||||
utterance: id,
|
utterance: id,
|
||||||
) {
|
) {
|
||||||
trace!("speech_synthesizer_did_start_speech_utterance");
|
trace!("speech_synthesizer_did_start_speech_utterance");
|
||||||
|
let vid: id = unsafe { msg_send![utterance, voice] };
|
||||||
|
if vid == nil {
|
||||||
|
println!("nil voice");
|
||||||
|
} else {
|
||||||
|
println!("Got voice ID");
|
||||||
|
}
|
||||||
unsafe {
|
unsafe {
|
||||||
let backend_id: u64 = *this.get_ivar("backend_id");
|
let backend_id: u64 = *this.get_ivar("backend_id");
|
||||||
let backend_id = BackendId::AvFoundation(backend_id);
|
let backend_id = BackendId::AvFoundation(backend_id);
|
||||||
|
|
Loading…
Reference in New Issue