I see. Thanks!
Rockallica
Posts
-
C# Set voice in Text to Speech -
C# Set voice in Text to SpeechHi, How do I set the voice in Text to Speech in C#? I have a toolStripMenu that I load the voices into. Then when one is chosen, I want it to use that voice. Haven't been able to figure set the voice to the chosen name. Thanks.
private void Get_Voices()
{
ISpeechObjectTokens voices = objSpeech.GetVoices("", "");foreach (ISpeechObjectToken v in voices) { ts\_Menu = new ToolStripMenuItem(); v\_name = v.GetDescription(0); ts\_Menu.Text = v\_name; ts\_Menu.CheckOnClick = true; voicesToolStripMenu.DropDownItems.Add(ts\_Menu); ts\_Menu.Click += voice\_Menu\_Click; }
}
private void voice_Menu_Click(object sender, EventArgs e)
{
ToolStripMenuItem item = sender as ToolStripMenuItem;
foreach (ToolStripMenuItem tempItemp in voicesToolStripMenu.DropDownItems)
{if (tempItemp == item) { tempItemp.Checked = true; } else { tempItemp.Checked = false; } } choosen\_voice = sender.ToString();
}
private void Speak(string txt)
{SpVoice objSpeech = new SpVoice(); objSpeech.Speak(txt, SpeechVoiceSpeakFlags.SVSFlagsAsync); objSpeech.WaitUntilDone(Timeout.Infinite);
}
-
Toolbar DropDownButtonHi, I've add a dropdownbutton to my toolbar(FontSize_TB) that I'm using for a font size selection. (desktop app) When my app loads up I fill it with a certain range of font sizes. How do I get the chosen size from the dropdownbutton ? Also is there a way to center the items in a toolbar? Thanks. :)
-
Toolbar Dropdown buttonHi, I've add a dropdownbutton to my toolbar(FontSize_TB) that I'm using for a font size selection. (desktop app) When my app loads up I fill it with a certain range of font sizes. How do I get the chosen size from the dropdownbutton ? Also is there a way to center the items in a toolbar? Thanks. :)
-
Rotate textAwesome! Just what I needed. Thanks!
-
Rotate textHi, New here. Anyway I'm working on a project and I'm placing some text over some images. All is good with that. However I only want to rotate the text 35 degrees but I can't figure how to do that in Javascript. Here is how I'm displaying the text -
const ctxt = canvas.getContext('2d');
ctxt.fillStyle = 'red';
ctxt.font = '40px Brush Script MT';
ctxt.fillText('TEST',200,178);Thanks.