Click here to Skip to main content
15,568,455 members
Home / Discussions / C#
   

C#

 
GeneralRe: Retrieving data from a webpage Pin
dan!sh 3-Jan-17 20:53
professional dan!sh 3-Jan-17 20:53 
GeneralRe: Retrieving data from a webpage Pin
MAW303-Jan-17 22:28
MAW303-Jan-17 22:28 
GeneralRe: Retrieving data from a webpage Pin
dan!sh 3-Jan-17 23:01
professional dan!sh 3-Jan-17 23:01 
GeneralRe: Retrieving data from a webpage Pin
MAW304-Jan-17 5:43
MAW304-Jan-17 5:43 
AnswerRe: Retrieving data from a webpage Pin
MAW304-Jan-17 19:59
MAW304-Jan-17 19:59 
QuestionRe: Retrieving data from a webpage Pin
Richard MacCutchan4-Jan-17 22:57
mveRichard MacCutchan4-Jan-17 22:57 
AnswerRe: Retrieving data from a webpage Pin
MAW305-Jan-17 3:30
MAW305-Jan-17 3:30 
QuestionC# Text to Speech Pin
Pavlex42-Jan-17 11:32
Pavlex42-Jan-17 11:32 
I have created app that converts text to speech but whatever gender I select it speaks same voice!!!

C#
SpeechSynthesizer ss;
        private void Form1_Load(object sender, EventArgs e)
        {
            ss = new SpeechSynthesizer();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //Read (button_click)
            ss.Rate = SpeedTrackBar.Value; //sets speed
            ss.Volume = VolumeTrackBar.Value; //sets volume
            try
            {
                switch (comboBox1.SelectedIndex)
                {
                    case 0:
                        ss.SelectVoiceByHints(VoiceGender.NotSet);
                        break;
                    case 1:
                        ss.SelectVoiceByHints(VoiceGender.Male);
                        break;
                    case 2:
                        ss.SelectVoiceByHints(VoiceGender.Female);
                        break;
                    case 3:
                        ss.SelectVoiceByHints(VoiceGender.Neutral);
                        break;
                    default:
                        break;
                }
                ss.SpeakAsync(textBox1.Text);
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            //Pause (button_click)
            ss.Pause();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            //Continue (button_click)
            ss.Resume();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            //Record (button_click)
            SpeechSynthesizer ss = new SpeechSynthesizer();
            ss.Rate = SpeedTrackBar.Value;
            ss.Volume = VolumeTrackBar.Value;
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.Filter = "Wave Files| *.wav";
            sfd.ShowDialog();
            ss.SetOutputToWaveFile(sfd.FileName);
            ss.Speak(textBox1.Text);
            ss.SetOutputToDefaultAudioDevice();
            MessageBox.Show("Recording Completed..", "T2S");
        }

AnswerRe: C# Text to Speech Pin
Michael_Davies2-Jan-17 11:38
Michael_Davies2-Jan-17 11:38 
GeneralRe: C# Text to Speech Pin
Pavlex42-Jan-17 11:40
Pavlex42-Jan-17 11:40 
GeneralRe: C# Text to Speech Pin
Pavlex42-Jan-17 12:26
Pavlex42-Jan-17 12:26 
GeneralRe: C# Text to Speech Pin
Pete O'Hanlon2-Jan-17 20:33
mvaPete O'Hanlon2-Jan-17 20:33 
GeneralRe: C# Text to Speech Pin
Bernhard Hiller2-Jan-17 22:27
Bernhard Hiller2-Jan-17 22:27 
QuestionXml Serialization of List<T> Pin
Richard Andrew x642-Jan-17 7:18
professionalRichard Andrew x642-Jan-17 7:18 
AnswerRe: Xml Serialization of List<T> Pin
Eddy Vluggen2-Jan-17 7:37
professionalEddy Vluggen2-Jan-17 7:37 
GeneralRe: Xml Serialization of List<T> Pin
Richard Andrew x642-Jan-17 9:12
professionalRichard Andrew x642-Jan-17 9:12 
GeneralRe: Xml Serialization of List<T> Pin
Pete O'Hanlon3-Jan-17 5:51
mvaPete O'Hanlon3-Jan-17 5:51 
Questionwrite acode Pin
Member 129308832-Jan-17 1:48
Member 129308832-Jan-17 1:48 
AnswerRe: write acode Pin
Jochen Arndt2-Jan-17 1:57
professionalJochen Arndt2-Jan-17 1:57 
AnswerRe: write acode Pin
OriginalGriff2-Jan-17 2:00
mvaOriginalGriff2-Jan-17 2:00 
AnswerRe: write acode Pin
Patrice T2-Jan-17 13:45
mvePatrice T2-Jan-17 13:45 
QuestionSentiment Analysis Pin
Member 1287504731-Dec-16 6:13
Member 1287504731-Dec-16 6:13 
AnswerRe: Sentiment Analysis Pin
OriginalGriff31-Dec-16 6:41
mvaOriginalGriff31-Dec-16 6:41 
AnswerRe: Sentiment Analysis Pin
Gerry Schmitz31-Dec-16 8:18
mveGerry Schmitz31-Dec-16 8:18 
AnswerRe: Sentiment Analysis Pin
Pete O'Hanlon31-Dec-16 8:38
mvaPete O'Hanlon31-Dec-16 8:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.