Espeak and Raspbian for Robots


#1

Hi @syw Are you using Raspbian for Robots?


#2

Hello @syw

Did you mean this as an answer to someone else? Or was it a question?

Cleo


#3

@JohnC Yes, I am using Raspbian for Robots. I tried following the instructions from https://www.dexterindustries.com/howto/make-your-raspberry-pi-speak/ and espeak works fine, but would like to know how I can get the gopigo to speak thru Scratch since that’s the program my 10 year old is more familiar with.


#4

Ah, the tutorial is not yet written but if you take a look at this picture https://github.com/DexterInd/GoPiGo/blob/master/Software/Scratch/scratch_functions.png
You will see the corresponding block
The keyword is SPEAK


#5

@cleoqc, I’ve tried using that command but it’s still not working. I know the speakers are working ok because when I use espeak in the command line, it works fine.


#6

@syw ,
May I ask when was the last time you did a DI software update? This is a new feature and is not present on older cards. Maybe that’s the issue?
Cleo


#7

@cleoqc, I’ve just updated to the latest DI Software, but still nothing from the speaker.
Maybe this screenshot might help:


#8

Thanks for the screenshot. Which robot are you using?


#9

I’m using the gopigo


#10

I have to come to the conclusion that something went wrong with DI Update then.
Did you see a big “UPDATE COMPLETE” in gigantic letters at the end?

And to confirm that it’s the case, could you try the following? (I apologize, it’s going to be a long thing to type)
grep SPEAK /home/pi/Desktop/GoPiGo/Software/Scratch/*

Open up a terminal window, and type this in. I’m sorry, it has to be typed exactly like that, paying attention to upper/lower case letters. You should get two results which may display on more than two lines depending on the width of your terminal window. Or you’ll get nothing at all which is what I suspect.

Cleo


#11

I did get a UPDATE COMPLETE msg. Also got a message to reboot, which I did also.

Here’s are the results from the grep command.


#12

At this point I have no idea why the DI Update didn’t work, but the speaking functionality is not on your Pi. Do you have a Dexter_Software_Update_log on your desktop? Would you mind uploading it here for me to take a look?

While I look into the DI Update issue, let’s look at getting your GoPiGo to speak.
Open a terminal window
enter the following:

wget http://tinyurl.com/gopigospeak sudo cp gopigospeak ~/Dexter/GoPiGo/Software/Scratch/GoPiGoScratch.py

If all goes well, doing a grep afterwards will give a different result
grep SPEAK /home/pi/Desktop/GoPiGo/Software/Scratch/*

And I apologize for taking so long before coming back to you…

Cleo


#13

Thanks Cleo, it works after I replaced the python script.

Here’s the log of the initial update. Not sure why it didn’t replace automatically.
Dexter_Software_Update_log_2017_01_15__05_01_10.txt (21.0 KB)


#14

Yeah! You should be all set to have a speaking GoPiGo now :slight_smile:

And yes, not too sure why DI Update didn’t work. Do you have the log from your last DI Update? Mind adding it in here?
Doh, I just saw it. Never mind.

Well, no, that’s the log from the firmware update aka “Update Robot” button. I need the one that results from “Update Dexter Software” button.


#15

Thanks again for your help!
For the software update, I just ran the “DI Software Update” icon (was that the correct update?) and it generated only one log on the desktop. Should there be another log somewhere else.


#16

That is your desktop??
The DI Update definitely didn’t go well. But there’s a way out.
type in
sudo bash update_backup.sh
and it should restore your DI Update to look like this:

At this point you’ll be able to click on the Update Dexter Software button