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
seba
  • Guests
  • Last active:
  • Joined: --
When I run this I get a "No event Interface exists! Please exit application.". What could I be doing wrong? Compiling with 1.0.47.03

Look forward to seeing how this works! :)

Sean
  • Members
  • 2462 posts
  • Last active: Feb 07 2012 04:00 AM
  • Joined: 12 Feb 2007

When I run this I get a "No event Interface exists! Please exit application.". What could I be doing wrong?

Which OS are you using? I'm on XPSP2.
You seem to experience the same problem with me.
CreateRecoContext used to fail with the defaultly installed SAPI on my machine.
It started working after I installed Speech SDK 5.1.

DranDane
  • Members
  • 53 posts
  • Last active: Feb 04 2009 04:30 PM
  • Joined: 26 Jun 2007
After the format of my computer your script is fully working for me Sean. Thank you for your help.

System Monitor
  • Members
  • 508 posts
  • Last active: Mar 26 2012 05:13 AM
  • Joined: 09 Mar 2007
I cant get three, but I tried some other phrases and it worked, that's pretty cool! It would make a great addition to AHK

afromonkey0
  • Members
  • 24 posts
  • Last active: Mar 01 2008 02:00 PM
  • Joined: 13 Oct 2007
That is mindblowingly awesome.

I am definitely making speech based functions now.
Which variable contains the recognised piece of speech? I'm having trouble finding it. Or do you need to call a function to get it?

Sean
  • Members
  • 2462 posts
  • Last active: Feb 07 2012 04:00 AM
  • Joined: 12 Feb 2007

Which variable contains the recognised piece of speech? I'm having trouble finding it. Or do you need to call a function to get it?

There is a part starting in red color, which currently add three words one/two/three. You can add here your own words.

afromonkey0
  • Members
  • 24 posts
  • Last active: Mar 01 2008 02:00 PM
  • Joined: 13 Oct 2007

Which variable contains the recognised piece of speech? I'm having trouble finding it. Or do you need to call a function to get it?

There is a part starting in red color, which currently add three words one/two/three. You can add here your own words.

Thanks, but that wasn't what I meant, I wasn't clear enough.
I mean, when it recognises a word, is a variable set to say which word it recognised, because I would like to make it respond to commands depending on which word it hears. Almost all the variables show 8 figure numbers. Can they be decoded?

Also is it possible to just write out whatever it hears like dictation?

[Edit] I've worked out how to get the string now, but I haven't worked out the second thing about dictation yet.

[Edit Edit] Now I've found that as well. This is gonna be sweet.

Fry
  • Members
  • 885 posts
  • Last active: Jan 17 2011 09:57 PM
  • Joined: 01 Nov 2007
can you tell me the variable

afromonkey0
  • Members
  • 24 posts
  • Last active: Mar 01 2008 02:00 PM
  • Joined: 13 Oct 2007
Yeah, if you add a line like this

text =  % "" . Invoke(pphrase, "GetText")

into the
OnRecognition(prms, this)
section after the
pphrase := Invoke(presult, "PhraseInfo")

the variable 'text' will contain the recognised text

guess
  • Guests
  • Last active:
  • Joined: --
So how can I make the voice recognition run a subroutine or any random ahk code.
Say I want to run a website so I would want to activate the ahk code:

"Run, www.npr.org"
how can I put that in the voice recognition?

is it like this:

.
.
.
; Add here the words to be recognized! Looks like it understands the null pointer.
Invoke(pstate, "AddWordTransition", "+" . 0, "One")
Invoke(pstate, "AddWordTransition", "+" . 0, "Two")
Invoke(pstate, "AddWordTransition", "+" . 0, "Three")
Invoke(pstate, "AddWordTransition", "+" . 0, "run word")

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

#Include CoHelper.ahk
if text = "run word"
.
.
.

afromonkey0
  • Members
  • 24 posts
  • Last active: Mar 01 2008 02:00 PM
  • Joined: 13 Oct 2007
I'd go with
if IsLabel(text)
gosub, text

text:
run, www.whatever.com


very untested code btw

automaticman
  • Members
  • 658 posts
  • Last active: Nov 20 2012 06:10 PM
  • Joined: 27 Oct 2006
? What are you using now?

Shoot ... GlovePIE ...



DranDane
  • Members
  • 53 posts
  • Last active: Feb 04 2009 04:30 PM
  • Joined: 26 Jun 2007
I use GlovePIE for all that require voice recognition. This software allow me to script. Shoot is too simple for me.

automaticman
  • Members
  • 658 posts
  • Last active: Nov 20 2012 06:10 PM
  • Joined: 27 Oct 2006

I use GlovePIE for all that require voice recognition.

Thanks, I hope GlovePIE has some (pro) audio adjustment settings. Aren't there differences between "voice recognition algorithms"? Are most using that one from Microsoft?

DranDane
  • Members
  • 53 posts
  • Last active: Feb 04 2009 04:30 PM
  • Joined: 26 Jun 2007
They are both using the API of Microsoft.