|
Hello everyone,
I have added the Speech Recognition option to a Windows Application. I am using "Command & Control" approach and everything works fine regarding the Speech Recognition.
The problem is that the speech recognition reacts "activate commands" with similar words than the set command words. Let's say if the Command Word is Play, the speech recognition mistake the word such as "Pause" and other words that sounds like Play and starts with the letter "P" for the set command "Play". It seems as the Speech Recognition only look to match first few Letters rat5her than the actual word.
I welcome any information with a great intrest. Thank you very much and have a great day.
Khoramdin
-- modified at 13:59 Monday 26th March, 2007
|
|
|
|
|
Couple things worth trying: make sure the system speech recognition has some practice discerning your voice commands. You can train voice recognition using some of the various speech wizards in Windows.
Second thing to try is adding a word dictionary to the speech recognition, containing only the words you're interested in ("Play", "Stop", and so on). This will limit the possible words it will match, making matches more accurate.
|
|
|
|
|
Hi All,
I am trying to create a paint event for my project. See below for my code. I am getting a whole bunch of errors. I am new to GDI+, so I am not sure what I am doing wrong. I am writing in C# and using Visual Studio 2005.
I have declared public Point front; in my global variables. I added the reference to System.Drawing. What am I doing wrong? Please see below for errors and code.
Error 10 An object reference is required for the nonstatic field, method, or property 'Triax_ReVamp.Filtered_Tilt.front'
Error 11 An object reference is required for the nonstatic field, method, or property 'Triax_ReVamp.Filtered_Tilt.front'
Error 12 'System.Drawing.Point.x' is inaccessible due to its protection level
Error 13 An object reference is required for the nonstatic field, method, or property 'Triax_ReVamp.Filtered_Tilt.front'
Error 14 'System.Drawing.Point.y' is inaccessible due to its protection level
Error 15 The best overloaded method match for 'System.Drawing.Graphics.DrawEllipse(System.Drawing.Pen, System.Drawing.RectangleF)' has some invalid arguments
Error 16 Argument '1': cannot convert from 'System.Drawing.Brush' to 'System.Drawing.Pen'
<br />
private static void f1_paint(object sender, System.Windows.Forms.PaintEventArgs e)<br />
{<br />
Graphics g = e.Graphics;<br />
Size ballsize = new Size(30, 30);<br />
Rectangle r = new Rectangle(front, ballsize);<br />
front.x = 176;<br />
front.y = 717;<br />
<br />
}<br />
Thanks,
Laura
|
|
|
|
|
laura1316 wrote: The best overloaded method match for 'System.Drawing.Graphics.DrawEllipse(
The code you posted does not contain DrawEllipse(...)
However based on the error message you can't pass a Brush when a Pen is required, they are not the same thing.
led mike
|
|
|
|
|
Oops sorry, here is the code with the draw ellipse function call.
That did fiz 2 errors but I still have 5 more errors. Please help!
Error 10 An object reference is required for the nonstatic field, method, or property 'Triax_ReVamp.Filtered_Tilt.front'
Error 11 An object reference is required for the nonstatic field, method, or property 'Triax_ReVamp.Filtered_Tilt.front'
Error 12 'System.Drawing.Point.x' is inaccessible due to its protection level
Error 13 An object reference is required for the nonstatic field, method, or property 'Triax_ReVamp.Filtered_Tilt.front'
Error 14 'System.Drawing.Point.y' is inaccessible due to its protection level
<br />
Graphics g = e.Graphics;<br />
Size ballsize = new Size(30, 30);<br />
Rectangle r = new Rectangle(front, ballsize);<br />
Pen p = new Pen(Color.Blue, 4);<br />
front.x = 176;<br />
front.y = 717;<br />
g.DrawEllipse(p, r);<br />
Thanks,
Laura
|
|
|
|
|
Where does 'front' come from ? It's obviously a Point, you can't set the x and y, I think they are private and you can set X and Y.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
10,11 and 13 are all the same problem and you do not seem to have posted the relevant code (again). If you don't improve your postings you will find people will not bother replying.
12 and 14 can be fixed with:
front.X = 176;<br />
front.Y = 717;
led mike
|
|
|
|
|
Hello,
Just an info:
Make sure that your Pen instance p will be disposed.
Specially in the Paint event you will get a lot of Pen instances in your memory (plus: I think pen is also a GDI object, which is shown in the taskmanager) which are not able to get cleaned from the GC.
I would recomend a "using" block for your code.
using(Pen p = new Pen(Color.Blue, 4)
{
g.DrawEllipse(p, r);
}
All the best,
Martin
|
|
|
|
|
can anyone suggest me the simplest way of sorting a datagrid
|
|
|
|
|
|
Hi!
Im facing a very strange problem, im doing a project in C# 2005. it waz all going well until 2day, my project is being built successfully but no output is shown.
i didnt made any big changes in project, it waz working perfectly but all of a sudden it stopped showing output...also no error or exception is being showed.
I tried almost every thng, closed app, restarted system, copied all code in new project and recompiled it, but no result...My Visual Studio is running all other projects perfectly so there is'nt any problem with it.
Please help me in this regard, im 2much worried abt it.
Regards,
Affan Ahmad Toor
|
|
|
|
|
Check the project properties: what does it say for project output? What happens when you do a "Rebuild All" on your project?
p.s. you're more likely to receive help if you spell whole English words, rather than substituting them with IM-speak like 2day, waz, abt, etc.
|
|
|
|
|
Judah Himango!
Thank you for reply and the suggestion, next time i will keep it in mind.
no error is shown when i Rebuild All project. It displays message in status bar "Rebuild All Succeeded"
the project properties are default and i did not changed them at all.
can you suggest what is the reason behind this strange behaviour?
Regards,
Affan Ahmad Toor
|
|
|
|
|
In the project properties, check where the output assembly (dll or exe) is going. Then look into that directory and verify the output assembly is there.
|
|
|
|
|
Hi!
Thanks for reply, i checked the project properties, the path is "bin\Release\" and in Release folder exe of projects is available.
one more thing i noticed that when i run the exe from Release folder it does not show output but it appears in Task Manager in Processes tab.
Tell me one more thing, does this happened without any reason or is it a bug in Visual Studio or some thing else? i dont understand why it happened, every thing was going fine and suddenly it stopped working...
Regards,
Affan Ahmad Toor
|
|
|
|
|
Affan Toor wrote: d that when i run the exe from Release folder it does not show output but it appears in Task Manager in Processes tab
That should be a clue: are you doing any kind of threading or something that would block the UI thread? Best way to continue here is set a breakpoint in your form's constructor and make sure everything goes as expected.
|
|
|
|
|
Hi!
Thanks for reply. Yes i am using a thread, but i dont think that thread is blocking the UI thread because i did not made any change in thread part, it is same as before.
Stil i have checked by setting breakpoint in form's constructor, as you suggested, but no clue! no error or exception and every thing went normally..
is it possible that solution file of my project is somehow corrupted?
Regards,
Affan Ahmad Toor
|
|
|
|
|
You could also try setting a breakpoint for the background thread. My bet is it's somehow blocking the UI from drawing.
Most helpful would be to post your code here.
|
|
|
|
|
Hi!
Thanks for reply, i have done all work again since last backup and now my project is running perfectly.
I still dont know what was the fault in previous code but i can not afford to figure out the problem due to time constraint...
It was very kind of you to help me. Thank you very much for all this help, i will be looking forward to get more help from you in future.
Regards,
Affan Ahmad Toor
|
|
|
|
|
What sort of project is it ? If you set breakpoints, is it running properly ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus!
Thank you for reply, it is a project related to mobile to PC communication. i am using GsmComm library for SMS and Phonebook managment.
It does not show any error or output even if i set break point, project is compiled and status bar shows "Ready" message, but no output is showed.
one more thing! i am also using thread, and i am starting it when startup page loads, previously it was also working perfectly.
Please suggest me what i am missing and what is the reason of this strange behaviour.
Thanks,
Regards,
Affan Ahmad Toor
|
|
|
|
|
So where do you expect to see output ? The program is running fine, right, just no output ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi!
Thanks for reply, the output must be displayed after program is compled successfully, just like normally happens.
yes you are rite, program is running fine but no output is generated. did i do something wrong? what is the reason behind this?
Regards,
Affan Ahmad Toor
|
|
|
|
|
If this has already been addressed, just point me in the right direction, please.
I'm trying to make an automatic wallpaper changer (using that user32.dll api that everyone uses, although there are differences among the parameters they choose). What I've done works fine on a PC at work, but it won't work on my Inspiron e1505. I understand it not wanting to display anything but a bitmap, but it didn't even want to display bitmaps on the laptop. Does it have to do with my Inspiron's odd-sized display or something (it's wider than normal displays)? Any ideas?
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Can you post your code? We're otherwise in the dark.
|
|
|
|
|