private void button1_Click(object sender, EventArgs e) { //RegisterNamibianCulture(); using (OpenFileDialog openFileDialog = new OpenFileDialog()) { openFileDialog.Multiselect = false; openFileDialog.Filter = "Wav audio file|*.wav"; openFileDialog.Title = "Open a Wav audio File"; if (openFileDialog.ShowDialog() == DialogResult.OK) { //System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("ta-IN"); //SpeechRecognitionEngine recognizer = new SpeechRecognitionEngine(culture ); recognizer.SetInputToWaveFile(openFileDialog.FileName); recognizer.LoadGrammar(new DictationGrammar()); RecognitionResult Result = recognizer.Recognize(); if (Result != null) { foreach (RecognizedWordUnit Word in Result.Words) { //InputLanguage lang = GetArabicLang(); //if (lang == null) // throw new NotSupportedException("tamil language keybord is not installed."); ////Set the current language of the system to ////the InputLanguage instance you need. //InputLanguage.CurrentInputLanguage = lang; InputLanguage lan; richTextBox1.Text = Convert.ToString(Word.Text, System.Globalization.CultureInfo.CreateSpecificCulture("ta-IN")); textBox1.Text = Convert .ToString (Word.Text,System.Globalization.CultureInfo.CreateSpecificCulture("ta-IN")); listBox1.Items.Add(textBox1.Text); } } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)