private static void _Monitor_MessageReceived(object sender, ClassLibrary.EventArgs <string> e) { // Invoke on UI thread. //ControlsHelper.BeginInvoke(() => //{ Audio.Global.AddMessageToPlay(e.Data); //}); }
private void AudioGlobal_ProcessedMessage(object sender, ClassLibrary.EventArgs <Capturing.message> e) { InPartTextBox.Text = string.Format("{0}", e.Data.part); InLanguageTextBox.Text = string.Format("{0}", e.Data.language); InNameTextBox.Text = string.Format("{0}", e.Data.name); InGenderTextBox.Text = string.Format("{0}", e.Data.gender); InEffectTextBox.Text = string.Format("{0}", e.Data.effect); InGroupTextBox.Text = string.Format("{0}", e.Data.group); InPitchTextBox.Text = string.Format("{0}", e.Data.pitch); InRateTextBox.Text = string.Format("{0}", e.Data.rate); InVolumeTextBox.Text = string.Format("{0}", e.Data.volume); InCommandTextBox.Text = string.Format("{0}", e.Data.command); int rate; RateTextBox.Text = int.TryParse(e.Data.rate, out rate) ? rate.ToString() : ""; int pitch; PitchTextBox.Text = int.TryParse(e.Data.pitch, out pitch) ? pitch.ToString() : ""; }
private void AudioGlobal_HelpSuggested(object sender, ClassLibrary.EventArgs <string> e) { MainHelpLabel.Text = e.Data; }
private void Global_EffectsPresetSelected(object sender, ClassLibrary.EventArgs <string> e) { SelectEffectsPreset(e.Data); }
/* * * TTS Monitor can receive 3 types of messages (<message>, <sapi xml>, text) from 4 sources (Network, Screen, Clipboard, TTS Monitor TextBox). * * █ ABC1. STEP - Detect incoming type. * * --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * █ A. <Message> (can be splitted): * * <message command="add"><part>Test text to speech. [comment]Test </part></message> * <message command="add"><part>text to speech.[/comment] Test </part></message> * <message command="play" name="Marshal McBride" gender="Male" effect="Humanoid" group="Quest" pitch="0" rate="1" volume="100"><part>text to speech.</part></message> * * A1. STEP - Set-extact attributes (join text parts together). * * name="Marshal McBride" * gender="Male" * effect="Humanoid" * group="Quest" * pitch="0" * rate="1" * volume="100" * text="Test text to speech. [comment]Test text to speech.[/comment] Test text to speech." * * A2. STEP - Convert received <message> attributes to <sapi xml> attributes: * * voice="IVONA 2 Brian" * voiceComment="IVONA 2 Amy" * pitch="0" * rate="1" * volume="100" * text="Test text to speech. [comment]Test text to speech.[/comment] Test text to speech." * * --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * █ B. <Sapi XML>: * * <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-GB">Test text to speech. [comment]Test text to speech.[/comment] Test text to speech.</speak> * * B1. STEP - Set-Extact attributes. * * version="1.0" * xmlns="http://www.w3.org/2001/10/synthesis" * xml:lang="en-GB" * text="Test text to speech. [comment]Test text to speech.[/comment] Test text to speech." * * B2. STEP - Convert received <sapi xml> attributes to <sapi xml> attributes: * * voice="IVONA 2 Brian" * voiceComment="IVONA 2 Amy" * pitch="0" * rate="1" * volume="100" * text="Test text to speech. [comment]Test text to speech.[/comment] Test text to speech." * * --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * █ C. Text: * * C1. STEP - Set-Extact attributes. * * text="Test text to speech. [comment]Test text to speech.[/comment] Test text to speech." * * C2. STEP - Convert received text to <sapi xml> attributes: * * voice="IVONA 2 Brian" * voiceComment="IVONA 2 Amy" * pitch="0" * rate="1" * volume="100" * text="Test text to speech. [comment]Test text to speech.[/comment] Test text to speech." * * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * * █ ABC1. STEP - Split "text" into sentences: * * Test text to speech. * [comment]Test text to speech.[/comment] * Test text to speech. * * █ ABC2. STEP - Convert text to <sapi xml> with assigned <sapi xml> attributes and add to TTS play list: * * <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-GB"><voice required="name=IVONA 2 Brian"><rate absspeed="1"><pitch absmiddle="0">Test text to speech.</pith></rate></voice></speak> * <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-GB"><voice required="name=IVONA 2 Amy"><rate absspeed="1"><pitch absmiddle="0">Test text to speech.</pith></rate></voice></speak> * <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-GB"><voice required="name=IVONA 2 Brian"><rate absspeed="1"><pitch absmiddle="0">Test text to speech.</pith></rate></voice></speak> * */ private void _NetworkMonitor_ProcessChanged(object sender, ClassLibrary.EventArgs <string> e) { ProcessStatusLabel.Text = string.IsNullOrEmpty(e.Data) ? "Process: None" : string.Format("{0}: Running", e.Data); }
private void Global_VoiceChanged(object sender, ClassLibrary.EventArgs <InstalledVoiceEx> e) { ControlsHelper.SetSelectedItem(VoicesGridView, e.Data); }
private void Global_Exception(object sender, ClassLibrary.EventArgs <Exception> e) { throw new NotImplementedException(); }
private void AudioGlobal_VoiceChanged(object sender, ClassLibrary.EventArgs <InstalledVoiceEx> e) { VoicesPanel.SelectItem(e.Data); }
private void AudioGlobal_IntroSoundSelected(object sender, ClassLibrary.EventArgs <sound> e) { SelectRow(e.Data.group); }