0 Favourites

How to use speech recognition

  • 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!

  • Bump!

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

    Regards!

  • 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 <img src="smileys/smiley1.gif" border="0" align="middle" />

  • 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

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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?

  • 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.

  • 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!

  • Bump!

    Any information on this? Or maybe a tutorial?

    Thanks a lot :)

  • 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.

  • 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 :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
76 9,273
Pandadoor's avatar
Pandadoor
Unread hot topic
0 Favourites
[plugin] 3D using Copperlicht
72 25,992
Reken's avatar
Reken
Unread hot topic
67 9,858
spartacuswell's avatar
spartacuswell