Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.06/5 (3 votes)
See more:
I'm developing an windows application that using speech recognition.now i want to add copy, paste and cut to my application. i mean, when i select a word or sentence and say copy, the application copy that and when i say paste, paste it. how to do that? another thing, how can i change between windows with speech ?(alt+tab with voice)

What I have tried:

i can't find anything about this in internet. i find some code for copy and pasting but i don't know how to use it for speech recognition.
Posted
Updated 17-Apr-16 7:42am
Comments
Sergey Alexandrovich Kryukov 17-Apr-16 13:26pm    
There is nothing you need to find on Internet. This is your own feature you have to design and implement. So, you did not try anything adequate to the task. But do try.
—SA

Well you could do worse than starting with some basics from Microsoft

Get Started with Speech Recognition[^]

Do some playing and refine what you need to know.
 
Share this answer
 
v2
Please see my comment to the question; this is the main answer for you.

All you need to use voice recognition is here: System.Speech.Recognition Namespace[^].

There are no any special secrets: read, understand, try out, design, implement. Be careful: presently, speech recognition bundled with Windows gives you amazingly poor fidelity (in contrast to competitor's products). But it will work with small grammars. So, my main advice is only one: create as small grammar as possible. Thoroughly pronounce words.

This is what you need to work with system clipboard:
Clipboard Class (System.Windows.Forms)[^].
or Clipboard Class (System.Windows)[^].

Other system-wide commands will be much harder. Switching between windows will take using raw Windows API you can use through P/Invoke. Nothing too hard though: Window Functions (Windows)[^]:

Apparently, you will need to master P/Invoke:
Platform Invocation Services — Wikipedia, the free encyclopedia[^].

This CodeProject article can also be useful: http://www.codeproject.com/csharp/EssentialPInvoke.asp[^].

Unfortunately, this will badly compromise your platform compatibility: your application will work only in Windows. But for you purpose, I guess you won't mind.

That's all.

—SA
 
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