diff --git a/src/backends/speech_dispatcher.rs b/src/backends/speech_dispatcher.rs index 1da28d9..12ea534 100644 --- a/src/backends/speech_dispatcher.rs +++ b/src/backends/speech_dispatcher.rs @@ -198,7 +198,7 @@ impl Backend for SpeechDispatcher { Ok(rv) } - fn voice(&self) -> Result { + fn voice(&self) -> Result, Error> { unimplemented!() } diff --git a/src/backends/winrt.rs b/src/backends/winrt.rs index 22b992e..97bd130 100644 --- a/src/backends/winrt.rs +++ b/src/backends/winrt.rs @@ -301,9 +301,10 @@ impl Backend for WinRt { Ok(!utterances.is_empty()) } - fn voice(&self) -> Result { + fn voice(&self) -> Result, Error> { let voice = self.synth.Voice()?; - voice.try_into() + let voice = voice.try_into()?; + Ok(Some(voice)) } fn voices(&self) -> Result, Error> {