How to use speech recognition

Get help using Construct 2

Post » Wed Jan 08, 2014 4:43 pm

Hello Scirra community :)

I have a question. I'm creating a game, and I want to introduce a speech recognition feature in order for the player to interact more with the game.

I'm using the user media object, and yes, it works, I have created a simple test and when I talk, the game sends me to another layout, which is what is it supposed to do.

But my question is, how can I require the player to say certain words or expressions in order for the event to activate? For example, if he/she says with the mic "Play now" or "Play" the game starts.

I need something like this because the make will have visual novel choices and I want to make it interactive with this.

Kind regards!
B
23
S
3
G
3
Posts: 26
Reputation: 1,832

Post » Fri Jan 10, 2014 1:17 am

Bump!

Any information about this? I would really like to add this feature to my game, even if it is complicated.

Regards!
B
23
S
3
G
3
Posts: 26
Reputation: 1,832

Post » Fri Jan 10, 2014 1:37 am

For phones that already have a voice feature built-in you might be able to have it convert to text. But otherwise, I don't believe text generation is a default feature of the object, so you'd have to find a library (in Javascript) to recognize the words they are saying.

Otherwise, pipe the text into a textbox and read it after they speak
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
113
S
39
G
17
Posts: 2,184
Reputation: 19,217

Post » Sat Jan 11, 2014 10:59 pm

Great! Thanks for the info.

And where can I find a library? In this forum? I hope I can understand how to do it, because a speech recognition feature would be great for my game :P
B
23
S
3
G
3
Posts: 26
Reputation: 1,832

Post » Tue Jan 14, 2014 6:34 am

Hi! I loaded the speech recognition example and it says it is supported in Chrome but it does not seem to do anything. I started, said a word, a sentence and so on but there is never any result shown. (I clicked on allow in chrome when I was asked to use the mic)

Any ideas?
B
53
S
16
G
6
Posts: 718
Reputation: 9,150

Post » Tue Jan 14, 2014 12:32 pm

I did not expect that demo to work for me, but it did. "hello hello hello"

Every time you click start you have to approve the mic again, was there a message at the top of the Chrome browser?

edit: I'm still using r156 at the moment.Paradox2014-01-14 12:33:17
B
226
S
60
G
33
Posts: 902
Reputation: 39,989

Post » Fri Jan 24, 2014 3:23 pm

I apologize for the delay with my answer.

Yeah, it works in Chrome, you just need the request speeck recognition event and then a condition to check if the user says something in order for the game to do something like go to another layout.

It works in Chrome only however; but my questions is, do you know how to pipe the text like Jayjay said? Or what library do I need in order to check if the user says specific words? In order to do different functions accordingly to what the player says.

Regards!
B
23
S
3
G
3
Posts: 26
Reputation: 1,832

Post » Mon Feb 03, 2014 12:54 am

Bump!

Any information on this? Or maybe a tutorial?

Thanks a lot :)
B
23
S
3
G
3
Posts: 26
Reputation: 1,832

Post » Mon Feb 03, 2014 1:26 pm

Did you see the built-in example? You don't need a library to check what the user said, the speech recognition engine already does that. So you can just compare the text that is coming in from speech recognition.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238

Post » Sun Feb 09, 2014 3:33 pm

Oh yeah, I'm sorry, I forgot Construct had examples about the speech recognition. Now I understand what I have to do, xD

Thanks so much for the help :)
B
23
S
3
G
3
Posts: 26
Reputation: 1,832

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests