You can also use the RaspberryPi with the package "espeak" to read out texts - and even whole files.
How to do that and what you have to consider is described in this article
Safety instructions
I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/
Affiliate links/advertising links
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂
Requirements
Before you start with this article you should have prepared the RaspberryPi so that it is accessible via the network and controllable via SSH.
The following three articles describe what needs to be done to prepare the RaspberryPi:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH
Required tool:
-no-
Required material:
In the following list you will find all the parts you need to implement this article.
Log in to the RaspberryPi via SSH
To start, you must first log in to the Rasp Pi with Putty via SSH. How to do this is in the article RaspberryPi - Control the RaspberryPi via SSH described.
Update package management
The package management in Linux is a "central place" through which various software packages can be installed. In order for this to work reliably, the lists and sources of the package management should be updated before each installation of new packages.
sudo apt-get update && sudo apt-get upgrade
Install required package
sudo apt-get install espeak
Start the first voice output
After the installation you can start right away. If you have connected a speaker, you must now enter the following command to activate the set "Hello Nerdiys, I'm a raspberry pi." to spend.
espeak "Hello Nerdiys, I'm a raspberry pi."
Start voice output in German
To execute the output in German, the parameter "-vde" must be added to the command. The "de" stands for German. All other languages can also be entered at this point. A list of all available languages can be found at: http://espeak.sourceforge.net/languages.html
espeak -vde "Hi Nerdiys, I'm a Raspberry Pi."
Convert German terms into Denglish terms
Unfortunately, espeak does not automatically recognize whether it should pronounce words in German or English. For example, in the sentence "Hello Nerdiys, I am a Raspberry Pi." the "Pi" is pronounced very German. Here you can help yourself with a trick: Just change "Pi" to "Pei" and the output sounds much better.
espeak -vde "Hello Nerdiys, I am a Raspberry Pei."
Output current IP address
This way you can also output the output of commands. For example, to output your IP address, simply enter the following command.
espeak "IP Address $(hostname -I)"
Have fun with the project
I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂
PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂