WinRT: Correctly set voice for case where no utterances are in queue.

Fixes #29
This commit is contained in:
Nolan Darilek 2022-07-22 10:08:13 -05:00
parent b50c5b6b93
commit 7cf80fb64d
1 changed files with 1 additions and 0 deletions

View File

@ -193,6 +193,7 @@ impl Backend for WinRt {
self.synth.Options()?.SetSpeakingRate(self.rate.into())?; self.synth.Options()?.SetSpeakingRate(self.rate.into())?;
self.synth.Options()?.SetAudioPitch(self.pitch.into())?; self.synth.Options()?.SetAudioPitch(self.pitch.into())?;
self.synth.Options()?.SetAudioVolume(self.volume.into())?; self.synth.Options()?.SetAudioVolume(self.volume.into())?;
self.synth.SetVoice(&self.voice)?;
let stream = self let stream = self
.synth .synth
.SynthesizeTextToStreamAsync(&text.into())? .SynthesizeTextToStreamAsync(&text.into())?