Click here to Skip to main content
15,845,936 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more: , +
hi all
i have made a text to speech convertor application in winform, and noww
i wnt to make an application just opposite of it
speech to text convertor..
can u guyz please help that how can i do this task..

i did text to speech task with the code below..

using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Speech.Synthesis;
using System.Windows.Forms;

namespace tts
    public partial class Form1 : Form
        SpeechSynthesizer speak = new SpeechSynthesizer();
        public Form1()

        private void button1_Click(object sender, EventArgs e)
            if (textBox1.Text == null)
                MessageBox.Show("please! enter some text in box");
            speak.Volume = trackBar2.Value * 10;
            speak.Rate= trackBar1.Value;

        private void button2_Click(object sender, EventArgs e)
            speak.Rate = trackBar1.Value;
            speak.Volume = trackBar2.Value * 10;


        private void button3_Click(object sender, EventArgs e)
            OpenFileDialog op = new OpenFileDialog();
            op.Title = "open a text file";
            op.Filter = "text files|*.txt";
            textBox1.Text = File.ReadAllText(op.FileName);

                     private void button6_Click(object sender, EventArgs e)
            SaveFileDialog sv = new SaveFileDialog();
                sv.Filter = "wav files|*.wav";
                sv.Title = ("save file as .wav");
                if (sv.ShowDialog() == DialogResult.OK)


Sergey Alexandrovich Kryukov 26-Apr-12 13:48pm    
There are two different things: recognition of text commands, which works and recognition of speech into text document, which is called "dictation".
I want to make sure what exactly you want, because dictation is barely working right now...
syed armaan hussain 2-May-12 18:12pm    
i mean to say ,recognition of speech into text document,
the same technalogy used by IPHONE 4S.. THAT converts user,s speech into text format
Bernhard Hiller 3-May-12 1:57am    
Just saw that line:
if (textBox1.Text == null)
When will the Text property of a TextBox happen to be null?

Actually you want to integrate a speech recognition engine, instead of writing one yourself. Apart from Microsoft's engine, there are Dragon Naturally Speaking, SpeechMagic and Speech Anywhere, and some other products depending on the language(s) to be supported.
Also decide on the work flow: have the engine transcribing a recorded file, or transcribing while you are still dictating? What about correction features? What about having someone else correcting the text? Etc.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900