Question about moving servo with voice commands

So I’m new to the voice command what would be a set example for moving servos with voice. Also what if’s and else what are those here’s a example

void loop()
{
// Receiving the output from the processing.
receiver.sync();

// Matching the received output to move the servo
if (output == 1)
{
if(angle > 5){
sg90.write(angle);
angle--;
delay(100);
}
}
else if (output == 2)
{
angle = 90;
sg90.write(angle);
}
else if (output == 3)
{
if(angle < 180){
sg90.write(angle);
angle++;
delay(100);
}

Can anybody break it down what does mean in other words and what parts would I need to add voice command for the arduino.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

You would need a voice recognition shield. This will allow you to recognise seven voice commands at a time. You have to teach this board the words by repeating it a few times. It will be keyed into your voice.

Search for an
Arduino voice recognition shield

Having said that the results are not spectacular.

1 Like

I’d appreciate it @Grumpy_Mike but out of curiosity isn’t there a more better voice command shield that offers more voice commands or is 7 the limit it can do for the arduino. Could I add more….

This one claims 15 voice commands.

1 Like

Voice recognition takes a lot of compute power, especially if you want to deal with different voices. You can see this with how much Alexa struggles even with a host of cloud machines backing her up.

I am not a fan of Alexa or the other offerings from a privacy perspective but I suspect using those systems for the recognition part would work better than any shield you can purchase.

1 Like

It’s a start @wildbill id imagine there’s a way maybe python where I can download a wav file from my computer and give the robot( my project ) a voice and a personality voice line…. Plus for it to respond to my commands . I’ve seen some videos on YouTube inmoov projects that has been done successfully.

You guys wouldn’t know a example for voice command I’ve been trying to search one but haven’t found one yet?

Yeah I’ll give it a go @jremington thanks :pray:

Please read the reference documentation:
https://www.arduino.cc/reference/en/language/structure/control-structure/if/

Voice recognition takes a lot of compute power, especially if you want to deal with different voices. You can see this with how much Alexa struggles even with a host of cloud machines backing her up.

I am not a fan of Alexa or the other offerings from a privacy perspective but I suspect using those systems for the recognition part would work better than any shield you can

Have you seen this? Not cheap and I am not sure how good it is. It was sold for using a Raspberry Pi, and The MagPi Magazine even had a free one as a cover prize. Check it it is Arduino compatible.

Voice Kit

@jremington This one claims 15 voice commands

But it says

Those 15 pieces are divided into 3 groups, with 5 in one group. First we should record the voice instructions group by group. After that, we should import one group by serial command before it could recognize the 5 voice instructions within that group. If we need to implement instructions in other groups, we should import the group first.

I think it is the same one I remember.

That would probably be the Elechouse V3, which is clear about seven commands at any one time (out of 80 stored).

The 5 out of 15 was the Elechouse V2. Which is also the number claimed for the Geetech module. Perhaps they are the same module, made by yet another company.

There are some pretty good voice recognition software packages for the Raspberry Pi, and may run on the tiny RPi Zero. That would be a much better way to go than the extremely limited modules mentioned above, at about the same price.

Edit: Cheetah looks promising, entirely off line and it does run on the Zero! Cheetah Streaming Speech-to-Text SDK - Picovoice Docs

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.