New Homepage Forums Special Shields how to activate voice Recognizer with push button?

This topic contains 4 replies, has 2 voices, and was last updated by avatar ironoside 1 year, 3 months ago. This post has been viewed 210 times

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #97332
    avatarironoside
    Participant

    I want to use a push button connected to 1sheel hardware, instead of tab to speak in Voice Recognizer. anyone can help me with that?

    also is it possible to make the application read my speech each automatically after each 2-3 second?

    #97567
    avatarAmr
    Keymaster

    Hi,

    This is possible to start the speak with a physical push button. So easy, just make an if condition in the void loop() section and check for the button. If pressed, then go for this code:

    VoiceRecognition.start();

    And for automating the speak operation each certain amount of time, you can use millis() function as a timer and keep reading its output. its output is >= 2 or 2 seconds (for exmple), then run the VoiceRecognition.start(); code line.

    You can give it a try and tell me if it worked out with you 🙂

    #97641
    avatarironoside
    Participant

    i simple used VoiceRecognition.start(); and it always running Thx for the help.

    but there is a new problem in the app. the app constantly resetting after not receiving any voice command and shows: speechRecognizer.Erroe_No_Match in the application.
    is there a way to remove the notification sound and those error msg while running?
    becuz i want my app to be running 24hrs while receiving voice commands anytime. and when i dont send a command it doesnt show error or notification noise

    #97763
    avatarAmr
    Keymaster

    I think this happens because you are forcing the voice recognition start command to run continuously and at every time, it checks if it really received a human voice command, if not it shows that error msg which means it couldn’t find any human voice command that matches the pre-saved voice commands it has.

    If that was the case with you then don’t call the VoiceRecognition.start(); repeatedly each certain time and just call it when you need it, like when a button is pressed or some sort of sensor get a certain value … etc.

    Have I made it clear to you?

    #99823
    avatarironoside
    Participant

    its clear thx

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.