473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Im trying to use Speech namespace to make voice recognition but it dosent work:

Im using windows 7 and Visucal c# Express edition 2008 with .Net 3.5

This is the code:



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

namespace Speech_Recognition
{
public partial class Form1 : Form
{

Choices myChoices;
GrammarBuilder myGrammerBuilder;
Grammar myGrammer;
SpeechSynthesizer mysynt;
SpeechRecognizer myspeech;
public Form1()
{
InitializeComponent();
myChoices = new Choices();
mysynt = new SpeechSynthesizer();
myspeech = new SpeechRecognizer();
myspeech.SpeechRecognized += rec_SpeechRecognized;


}

private void Form1_Load(object sender, EventArgs e)
{
myChoices.Add("please");
myGrammerBuilder = new GrammarBuilder(myChoices);
myGrammer = new Grammar(myGrammerBuilder);
myspeech.LoadGrammar(myGrammer);
myspeech.Enabled = true;


}
void rec_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
myLetters.Text = e.Result.Text;
}

}
}


I tried using my microphne but it dosent help i said please many times and nothing happened.

What did i do wrong? I thought its something to do with culture settings but i couldnt find how to set it up.



Thanks for helping
Sep 8 '10 #1
1 1709
I dont directly see anything wrong with the code, nor have I any experience with this component.
There are how ever few things I would check:
- Is microphone recording anything at all
- Is this microphone set as default input device?
- or Must this app been told, which device to listen to?
- What is level of sound quality needed for recognition, and is this achieved?
- What happens if you try other words, or simple sounds "A", "B".. etc?
- Are there more events on these components you can subscribe to? Just to get more feeling what can be done.
- more?
Sep 8 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ashok | last post by:
I have developed a custom IE application in C# using webbrowser control. But i am facing couple of issues when user clicks on an Exit link on a page the application is getting grayed out, but not...
0
by: Xarky | last post by:
Hi, I am writing an application making use of MSAgent and a dll for voice recognition. The dll & MSAgent are provided in the following links...
3
by: BobAchgill | last post by:
I would like to add both voice to my program to read aloud to the user And, I would like to add Speech recognition to my same program so he can speak text into my program. As a VB.Net...
1
by: Junior | last post by:
Hi guys. I want to incorporate voice recognition in a new .NET application I'm developing. I would like to recognize among a group of 30-40 words. But I would also like to avoid using 3dr party...
9
by: zxo102 | last post by:
Hi everyone, I am using a python socket server to collect data from a socket client and then control a image location ( wxpython) with the data, i.e. moving the image around in the wxpython frame....
2
by: Peted | last post by:
Hello, i wanted to experiment with voice recognition and c# express edition 2005 Can someone direc me to good intro on the subject and just abreif spiel on how i should get started, ie any...
13
by: newlearner | last post by:
hi, Im new into Ajax and Javascript, I have a doubt... I have a External javascript. and a couple of html files and I load These through ajax request and response. The html pages contain a...
1
by: Slickuser | last post by:
I am running Windows XP Pro SP 2, have Office 2003, installed SDK 5.1, Visual Studio 2005. I tested out the voice the recognition code from this link but seem it can't recognize System.Speech. I...
0
by: RobertJohn | last post by:
Hi all Not exactly an Access question, but perhaps someone can help. Does MS Office Professional come with voice recognition built in as part of the package, or do I still need something like...
1
by: gracepaul | last post by:
hi all. how can i do voice recognition through vb.net coding thanks grace
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.