Ejemplo n.º 1
0
        public SpeechSynthesizer(global::Speaker.SpeakerWithSMTC speaker)
        {
            this.speaker = speaker;

            // Update the speech synthesize
            Pitch = DI.SettingsManager.GetVoicePitch();
            Rate  = DI.SettingsManager.GetReadingSpeed();
            SelectVoice(DI.SettingsManager.GetSelectedVoice());
        }
Ejemplo n.º 2
0
        private void WindowsXamlHost_ChildChanged(object sender, EventArgs e)
        {
            // Hook up x:Bind source.
            global::Microsoft.Toolkit.Wpf.UI.XamlHost.WindowsXamlHost windowsXamlHost =
                sender as global::Microsoft.Toolkit.Wpf.UI.XamlHost.WindowsXamlHost;
            global::Speaker.SpeakerWithSMTC userControl =
                windowsXamlHost.GetUwpInternalObject() as global::Speaker.SpeakerWithSMTC;

            if (userControl != null)
            {
                DI.SpeechSynthesizer = new SpeechSynthesizer(userControl);
            }
        }