Notifications
Clear all

eSpeak on a Raspberry Pi 4

116 Posts
9 Users
30 Likes
20.5 K Views
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

@spyder

By the way, if you just want to mess around with eSpeak you only need to do the very simple install I outlined in the OP of this thread.   There's no need to install all the rest of the stuff unless you plan on working with dictionaries getting deeper into the language aspect of it.

DroneBot Workshop Robotics Engineer
James


   
Spyder reacted
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

@robo-pi

I want to examine its range of possibilities as a possible replacement for Mycroft, so, only the full package will suffice. The speakers should be no problem (sorta), just need an extension cable from the output to a jack on the patch panel on the back (which I don't exactly have yet), then there's the issue of a microphone, which presents another problem. The Ice Tower that I'm using for the SteamPunk laptop doesn't leave any room for a HAT, which means, no add on sound board with mic. I do have a USB mic laying around (somewhere) for which I've left no place to mount (another issue to address) but, I seem to have the time available to make such changes

I'm currently imagining something along the lines of this...

soundhorn

being mounted... someplace. Obviously not that big, or in the back, as the lid would get in the way. Maybe on the side... or one one each side... Dunno, haven't gotten that far yet

 


   
robotBuilder reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2043
 

@Spyder

I like your wry, or is it dry, sense of humour 🙂

 


   
Spyder reacted
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

@robotbuilder

Why thank you 😎 

I used to work at it, but, once I stopped taking life seriously, it now comes naturally


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @spyder

I want to examine its range of possibilities as a possible replacement for Mycroft

Mycroft is a personal assistant that also speaks via audio.  eSpeak is just a TTS or text-to-speech synthesizer.  So you need to tell eSpeak what to say.  It's not going to offer any conversation.

It's basically just a voice for your computer.  Nothing more.  You need to give it the text to speak.

You can build your own personal assistant using eSpeak as the voice synthesizer, but that will require that you code the actual personal assistant entirely on your own.

I would imagine that Mycroft also has an SRE?  Speech Recognition engine capability so that it can hear you speaking to it as well?

So eSpeak is not going to be a replacement for a personal assistant.  At best it can be used as the voice for a personal assistant program.

~~~~

There are so many options when it comes to having computers talk and recognize speech.   And which software you chose all depends on what your ultimate goal is.

My goal is to build a robot that has an "AI mind" or artificial intelligent mind.    That mind by itself won't be able to speak via the audio speakers unless I have a TTS engine.  So that's what I'll be using eSpeak for.  It will just be the voice-box of my robot so-to-speak.   It's just the program I'll be using when I want my robot to say what it has on its "mind". 😊 

So in my case eSpeak is just a TTS tool I'll be using so that my robot will have the ability to speak.  That's all.  My AI program will decide what the robot will actually have to say.

Similarly I'll be using Pocket Sphinx as the SRE or Speech Recognition Engine.  Pocket Sphinx just turns audible words into text.  Period.  That's all it does.   You will then need to do something with the text that it generates.

Again, I'll be using Pocket Sphinx as the "ears" for my robot, as well as translating spoken words into text were I can then process the text in my AI program and respond based on what the text says. 

So neither eSpeak nor Pocket Sphinx are personal assistants.  They are just simple tools for translating text to speech and speech to text.   That's all they do.

~~~~

What excites me about both of these packages is that they are designed to be used on SBCs with limited resources and they don't take up a lot of space, or bog down the computer by hogging up all the processing power.  They are both very lightweight systems that work very quickly using minimal resources.

This leaves the vast majority of space and processing power on the Raspberry Pi to be devoted to my actual AI project.

I'm also very happy with the dictionary capabilities of both eSpeak and Pocket Sphinx.  They both have dictionaries that can be easily modified programmatically from Python.  Because of this, I can have my robot's AI mind build these dictionaries as it grows.   And that's what I need for this AI project. 

My AI project will have many dictionaries, but for the most part each dictionary will have three parts:

  1. The main dictionary of the AI mind.
  2. The eSpeak dictionary
  3. The Pocket Sphinx dictionary.

When my robot learns a new word it places this word in its own AI mind dictionary.  This dictionary will be quite complex and will be constructed from numpy matrices.   It will have more than just the spelling of the word, it will also have a complex association of meanings associated with the word, including possible sensory perception sensations.  In other words, if the robot can sense temperature it will be able to associate words like freezing, cold, warm, hot, burning, etc, to the actual sensory input they represent.

Once the robot learns a word and its meaning, it will then place that word in the eSpeak dictionary so that it can speak it, and also place it in the Pocket Sphinx dictionary so that it can understand the word when someone says the word.

So that's the highway I'm heading down.  And this is why both eSpeak and Pocket Sphinx appeal to me.  They are the perfect tools for this particular AI project.

There are many other TTS and SRE software packages available.  Many of which are dependent on the Internet and a cloud server.   Most of those speak better than eSpeak and may even translate speech to text better than Pocket Sphinx.  But they don't fit my criteria for my AI project.

There are also many different personal assistant programs available.  But those are a totally different thing entirely.  A personal assistant package would not do me any good at all.   That's somebody else's attempt at building an AI mind.   That's not what I want.  I want to build the mind of my own robot from scratch. 😊 

So it all depends on what  you want to do with it.

Like Steve @codecage mentioned, eSpeak can be used in conjunction with "AI on the Jetson Nano" to put into audible words what it sees on a camera image.   The AI work is being done by OpenCV, and TTS is being done by eSpeak.

eSpeak is just a way to get the results spoken to a speaker.  That's all it does.  It's just a TTS tool.  Your program will need to tell eSpeak what to say.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @spyder

I'm currently imagining something along the lines of this...

soundhorn

being mounted... someplace.

That would be so cool.   I too like the steampunk look.

In fact, I have a 1947 Chevy I'm kind-a "restoring", only not really.   I don't have the money to do a proper restoration, nor do I necessarily care to go that route.   In fact, I'm planning on painting the care two-tone and everyone on the antique car forum were booing that idea because cars from that period were never two-tone from the factory.  I don't care.  I like two-tone so that's what I'm going for.  To heck with a perfect restoration!

In any case, I have a lot of old Radio Shack Nixie tubes.  I probably bought these when I was a kid. I've had them forever.  In any case I'm thinking of making a Nixie tube speedometer for the '47 Chevy.  The antique restorers would roll over in their grave as no '47 Chevy ever came stock with a Nixie Tube speedo. 🤣 

But hey, I'm just having fun with my old car.

Here's a picture of the actual car:

AA Chevy Side View
Chevy (2)

And here's how I would like to paint it two-tone.

AA Two Tone

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @robo-pi

you need to tell eSpeak what to say.  It's not going to offer any conversation.

I see. Well, it was a thought. I'll just have to keep going down the rabbit hole of the onboard database backend for which the instructions are thrillingly, exotically, and totally as helpful as describing the color blue to a blind man thru the process of sign language

At least, for now, it talks, and listens, and responds in a somewhat sensible manner (even if it does seem to think that the specific gravity of gold is a mere 19.3, while everybody knows it's 19.5, or, used to be when I went to school. Obviously this new gold is a somewhat inferior grade to that which I had once lovingly adorned my faithful pet dinosaur)

Posted by: @robo-pi

That would be so cool

Would be ? I'm sure you've seen it by now... Remember the "building a box" thread ?

abox22

I'm only just now (thanks to you) discovering that I'd forgotten to add speakers to the thing

I was so concerned with power and looks that sound completely slipped the ever grinding cogs of my once functional mind


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

@robo-pi

Oh, and I do remember you telling me about the car. And, as coincidence would have it, I just this afternoon ran across a nixie tube pc board (don't ask what I was searching for)

https://www.dhgate.com/product/5v-1a-electronic-diy-kit-in14-nixie-tube/508903569.html


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @spyder

Would be ? I'm sure you've seen it by now... Remember the "building a box" thread ?

Yes it IS cool! 😎  And I definitely remember the "building a box" thread.  I just meant that it will be cooler yet when you add the new steampunk speakers.

Posted by: @spyder

I was so concerned with power and looks that sound completely slipped the ever grinding cogs of my once functional mind

Speaking of missing cogs.  I was talking with a neighbor the other day and I asked him how his brother is doing.  He looked at me with confusion and said, "He died over 5 years ago".  Of course, the moment he said it I instantly remembered that I KNEW that!   It can be quite embarrassing when the cogs are missing in the mind. This is one reason I like to remain a hermit.

I'm building a "Robot Daughter" to take care of me in my old age.  The problem is that I waited until my old age to build her!  So I may not get her done in time. 😊 

And now with this coronavirus thing I've been thinking of making a T-Shirt that says, "Will I still be alive in 2022?"

If only to be able to hang that T-shirt on a clothesline in 2022 and say, "Whew! I made it!"  I'm thinking that by then the coronavirus should be pretty much behind us.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

@spyder

I already bought all the driver chips to make a Nixie Tube DRO.   Now I need to find a place where I can order some ambition to do it. 🤣 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @robo-pi

So I may not get her done in time. 😊

I'm not very prolific when it comes to twitter. (I've been subscribed for 9 years and only have 99 followers)

But it occurred to me to post something the other day...

"Remember that project that you were going to do 2 months ago when you wished that you just had one more day to finish it ?

 

Is it done yet ?"


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

@spyder

I get totally side-tracked.   In fact, I already have eSpeak and Pocket Sphinx installed and ready to go.  I should just jump on in and start working on my AI project immediately.   But instead I'm making all these videos to help distract other people from what they were originally working on. 🤣 

Actually I'm making these videos for two reasons:  One is so that I can have something to go back to when I forget how to do all this stuff.   And that's not as much of a joke as it might sound like.

And the other reason I'm doing it is because after I get my AI project up and running I'll be posting information on that as well, and hopefully videos too.  If anyone is interested in following that project they will probably want to also know all about eSpeak and how I'm accessing it from Python, etc.   So this way, instead of getting bogged down with having to explain that to everyone all the time I can just point them to these videos so they can catch up quickly.

The strange thing is that my AI project doesn't actually need to be able to speak audibly or be able to recognize speech.  I could do the AI project just using text-in and text-out.   But I thought it would be far more fun to have speech and speech recognition capabilities.  So why not that squared away from the get go?

Also I thought it would be interesting to have my AI program actually construct these speak dictionaries itself.   After all, the program is all about building dictionaries and learning the meanings and associations of words.   So it's basically a dictionary-building program.   May as well have it build its own TTS and SRE dictionaries while I'm at it.   It shouldn't be that much extra programming, especially as they get built up, they'll start taking care of themselves after a certain point.

When I'm done I should have a robot that can actually learn new words and their meanings.   It will be like Johnny 5 in Short Circuit wanting more and more input.   I'll probably have to end up letting it go to an actual school some day.   Then it will be away at college when I'm dying at home with no robot daughter to care for me.

That's sounds about normal for life right?

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @robo-pi

That's sounds about normal for life right?

Michio Kaku says that AI will bring about the end of mankind, and here we are working as hard as we can to further that end

Ah well, who are we to stand in the way of progress

Bring on the robot overlords !


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @spyder
Posted by: @robo-pi

That's sounds about normal for life right?

Michio Kaku says that AI will bring about the end of mankind, and here we are working as hard as we can to further that end

Ah well, who are we to stand in the way of progress

Bring on the robot overlords !

I don't think I'll live long enough to see it.   Besides what scares me far more is when men build unintelligent robots that just do as men tell them to do.   That's probably more dangerous than robots that think for themselves. 😊 

If I succeed in building a robot daughter I'm sure she'll be very sweet. 😎 

And if she ends up killing me it won't be a big deal since I'm about ready to croak naturally anyway. 🤣 

It's not like it would be a major loss to humanity.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2043
 
Posted by: @robo-pi

When I'm done I should have a robot that can actually learn new words and their meanings.   It will be like Johnny 5 in Short Circuit wanting more and more input.

Problem solved. Just leave your robot out in an electric storm and wait for it to be hit by lightening, voila, you have a conscious robot.

 


   
ReplyQuote
Page 2 / 8