What is my IP address and can you email it to me?
Instructions for getting your IP address emailed to you can be found on the RPi wiki
It works. Yay.
What is my IP address, and can you tell it to me?
This is to get the Pi to find it’s own IP address and tell you vocally over the 3.5mm audio jack.
First of all, you need to install Festival, which is the text-to-speech converter.
- Install the Festival package
- apt-get install festival
- Install the alsa utilities/drivers if you do not already have them
- apt-get install alsa-utils
- Edit /etc/modules
- Make sure that
- is in the file.
- Once it is (it might be already) you do not need to do the modprobe again after each reboot.
- Make sure that
- Push audio to the 3.5mm jack
- amixer cset numid=3 1
- (If you want to put it back to automatic, or HDMI, change it to 0 (auto) or 2 (HDMI))
Test out your audio
- Do the following:
- su root
- cd /opt/vc/src/hello_pi
- cd hello_audio
- You should hear something like a siren run through a bad 50s sci-fi tv show.
- Let’s try testing ‘aplay’ to see if that works. Use one of the ‘alsa’ sample files.
- aplay /usr/share/sounds/alsa/Front_Center.wav
- Yes! It works. Dull, but it works.
- Install mplayer:
- apt-get install mplayer
- Edit /etc/mplayer/mplayer.conf. Add the following line:
- mplayer /usr/share/sounds/alsa/Front_Center.wav
- Yes! Works!
Try out Festival
- To make Festival say hello, try this:
- echo “Hello” | festival –tts &
- YES! It spoke to me!!! Woo-hoo!!!
The Script and running it
- Return to your root folder:
- cd /root
- mkdir bin
- cd bin
- Create and edit a file called: say_my_ip_address.sh and use this:
- Save and quit.
- Make the file executable:
- chmod a+x say_my_ip_address.sh
- Edit /etc/rc.local
- Add the following lines:
- And reboot
- Don’t forget to have your earphones plugged in!