Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Voice recognition


  • Please log in to reply
45 replies to this topic
afromonkey0
  • Members
  • 24 posts
  • Last active: Mar 01 2008 02:00 PM
  • Joined: 13 Oct 2007
If you change your speech settings in the control panel, the speech changes.

ahk newbie
  • Guests
  • Last active:
  • Joined: --
hi all,

how do you assign certain words to execute certain functions.

for example, but saying "yahoo", it will open up www.yahoo.com
and by saying "hotmail", it will open up www.hotmail.com

or any other commands, in that sense.

sorry i am new in this, and have been trying but have failed.

thanks in advance! :)

TylerIsBack
  • Guests
  • Last active:
  • Joined: --
Wrong place to ask. There's a forum for Asking For Help. Any guesses which one it is? Because I'll give you a hint, its not this one.

carsong-
  • Guests
  • Last active:
  • Joined: --

hi all,

how do you assign certain words to execute certain functions.

for example, but saying "yahoo", it will open up www.yahoo.com
and by saying "hotmail", it will open up www.hotmail.com

or any other commands, in that sense.

sorry i am new in this, and have been trying but have failed.

thanks in advance! :)


OnRecognition(prms, this)
{
   Global   pspeaker
   presult := DispGetParam(prms, 3, 9)
   pphrase := Invoke(presult, "PhraseInfo")
   
   ; grab the text we just spoke
   txt := Invoke(pphrase, "GetText")
   ; check if it is a Label
   if(IsLabel(txt))
      gosub, %txt%
      
   Release(pphrase)
}

One:
Msgbox, One
Return

Two:
Msgbox, Two
Return

Three:
Msgbox, Three
Return


  • Guests
  • Last active:
  • Joined: --
I don't know how picky you all want to get, but there is command/voice recognition software in sourceforge. You can easily set it up so that when you say something it launches an ahk script. As for a combination of voice commands...maybe you can set it up so that while one script is running, if another certain one is already up, it performs a different action...

I only mention that last part because I find ahk's best feature to be the fact that I can take two hotkeys, press both of them, and it performs a third action.

quatermass
  • Members
  • 220 posts
  • Last active: Dec 16 2013 09:00 PM
  • Joined: 14 Dec 2005

I don't know how picky you all want to get, but there is command/voice recognition software in sourceforge.


Care to tell us where?

I can only find Linux ones.
Stuart Halliday

I should register
  • Guests
  • Last active:
  • Joined: --
Where do I install the SpeechSDK51.exe?
Or Doesn't it matter?

DranDane_
  • Guests
  • Last active:
  • Joined: --
With Vista the SpeechSDK51 is already included

With XP it's here http://www.microsoft... ... 83171b4530

  • Guests
  • Last active:
  • Joined: --
It Doesn't matter. But i think you don't have the choice. It's a microsoft patch.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Just wanted to let you know this seems to be working great on my 64bit XP. Unless I'm missing something Microsoft's speech SDK doesn't integrate with x64 so some speech recognition programs I've tried don't work.

I've been trying to figure out if I can use phrases instead of single words. I have found some work such as ExitScript when they are typed as one word but others such as OpenNotepad trigger even when just saying notepad. Is there a way to use phrases?

Thank you for this great tool.

  • Guests
  • Last active:
  • Joined: --

Looks like foom is busy.
Anyway, here is the verbatim translation of the script foom linked.
I can't test it myself as no mike is installed on my machine.
If you hear "Starting Succeeded", then, try to say one/two/three.

NEED CoHelper.ahk.

#Persistent
OnExit, CleanUp

CoInitialize()
pspeaker := ActiveXObject("SAPI.SpVoice")
plistener:= ActiveXObject("SAPI.SpSharedRecognizer")
pcontext := Invoke(plistener, "CreateRecoContext")
pgrammar := Invoke(pcontext, "CreateGrammar")
Invoke(pgrammar, "DictationSetState", 0)
prules := Invoke(pgrammar, "Rules")
prulec := Invoke(prules, "Add", "wordsRule", 0x1|0x20)
Invoke(prulec, "Clear")
pstate := Invoke(prulec, "InitialState")

; [color=red]Add here the words to be recognized![/color] Looks like it understands the null pointer.
Invoke(pstate, "AddWordTransition", [color=red]"+"[/color] . 0, "One")
Invoke(pstate, "AddWordTransition", [color=red]"+"[/color] . 0, "Two")
Invoke(pstate, "AddWordTransition", [color=red]"+"[/color] . 0, "Three")
;;

Invoke(prules, "Commit")
Invoke(pgrammar, "CmdSetRuleState", "wordsRule", 1)
Invoke(prules, "Commit")
ConnectObject(pcontext, "On")

If (pspeaker && plistener && pcontext && pgrammar && prules && prulec && pstate)
	Invoke(pspeaker, "Speak", "Starting Succeeded")
Else	Invoke(pspeaker, "Speak", "Starting Failed")
Return

CleanUp:
Release(pstate)
Release(prulec)
Release(prules)
Release(pgrammar)
Release(pcontext)
Release(plistener)
Release(pspeaker)
CoUninitialize()
ExitApp


OnRecognition(prms, this)
{
	Global	pspeaker
	presult := DispGetParam(prms, 3, 9)
	pphrase := Invoke(presult, "PhraseInfo")
	Invoke(pspeaker, "Speak", "You said " . Invoke(pphrase, "GetText"))
	Release(pphrase)
}

#Include CoHelper.ahk


I get the message:
No event interface exists! Now exit the application!

Any ideas why?

  • Guests
  • Last active:
  • Joined: --
Is there something new to this? Anyone developed a better script?

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

Is there something new to this? Anyone developed a better script?


Try the script from here, Voice Recognition COM by raven-gm. It runs in the background but you can add new voice commands on the fly by saying "New Rule".

Also try this beta script I've been working on, Easy Automation AHK. It uses the same script as an input module. To use, run the script EasyAutoEdit.ahk, select "Voice Commands" from the input drop down list, enter the phase to speak and click "Use This Phrase". Then select any command you want to use from the commands drop down list and add them the same way. Click "Create Subroutine" in the main window and the subroutine is added to a master script that runs in the background. You can then add other subroutines using any of the input methods from the drop down box the same way. One note, don't use the "Test" function of the current release.

  • Guests
  • Last active:
  • Joined: --
I cannot download cohelper can someone send it to me ?
E-mail <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

I cannot download cohelper can someone send it to me ?
E-mail <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->


Looking through my system I don't seem to have cohelper but I use voice commands quite a bit. As far as I can tell the only libraries needed, for the script I linked to above, is Com and Common_QuickMessage which is downloaded on the same page as the script.

If I'm missing something let me know and I'll look again.
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.