Compare commits

...

4 Commits

Author SHA1 Message Date
Nolan Darilek f404e180e4 Bump version. 2022-07-22 10:13:32 -05:00
Nolan Darilek 7cf80fb64d WinRT: Correctly set voice for case where no utterances are in queue.
Fixes #29
2022-07-22 10:08:13 -05:00
Nolan Darilek b50c5b6b93
Merge pull request #28 from Bear-03/traits
Derive common traits for Gender and Voice
2022-07-22 09:57:49 -05:00
Bear-03 15f28c9af4
Derive common traits for Gender and Voice 2022-07-21 01:25:14 +02:00
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "tts"
version = "0.22.5"
version = "0.23.0"
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
repository = "https://github.com/ndarilek/tts-rs"
description = "High-level Text-To-Speech (TTS) interface"

View File

@ -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())?

View File

@ -648,13 +648,13 @@ impl Drop for Tts {
}
}
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Gender {
Male,
Female,
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Voice {
pub(crate) id: String,
pub(crate) name: String,