From 7cf80fb64d817b8e34f5f4479f7850cffc1921a5 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 22 Jul 2022 10:08:13 -0500 Subject: [PATCH] WinRT: Correctly set voice for case where no utterances are in queue. Fixes #29 --- src/backends/winrt.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backends/winrt.rs b/src/backends/winrt.rs index d3a349a..70d765f 100644 --- a/src/backends/winrt.rs +++ b/src/backends/winrt.rs @@ -193,6 +193,7 @@ impl Backend for WinRt { self.synth.Options()?.SetSpeakingRate(self.rate.into())?; self.synth.Options()?.SetAudioPitch(self.pitch.into())?; self.synth.Options()?.SetAudioVolume(self.volume.into())?; + self.synth.SetVoice(&self.voice)?; let stream = self .synth .SynthesizeTextToStreamAsync(&text.into())?