PiRobot Build 5: Raspberry Pi Audio Hardware, Software & Text To Speech


$ sudo apt-get install alsa-utils


$ sudo nano /etc/modules

Add snd_bcm2835 (if its is not already there)

$ sudo nano /usr/share/alsa/alsa.conf

change the line “pcm.front cards.pcm.front” to “pcm.front cards.pcm.default”

$ sudo apt-get install mplayer


$ sudo nano /etc/mplayer/mplayer.conf

Hit control + v to get to the end of the file fast (page by page).

add line nolirc=yes

$ sudo apt-get install lame


$ sudo apt-get install festival


$ sudo apt-get install espeak


Google Translate Bash Shell Script install


$ mkdir ~/TTS

$ cd ~/TTS

$ sudo wget https://gist.github.com/r1b4z01d/5350927/download.tar

$ sudo mkdir /tmp/dirtree

$ sudo tar xfz download.tar -C /tmp/dirtree

$ sudo find /tmp/dirtree -type f -exec mv -i {} . \;

$ sudo rm -rf /tmp/dirtree

$ sudo rm download.tar

$ sudo chmod u+x GoogleSpeech.sh

$ wget http://r1b4z01d.com/audio.mp3


$ sudo reboot

Reboot the Raspberry Pi

$ lsmod

Displays the kernel modules currently loaded

Look for snd-bcn2835     Broadcom snd-bcn2835



$ amixer cset numid=3 1

OutputSelect: 0=auto, 1=analog, 2=hdmi

$ amixer cset numid=1 -- 100%


$ speaker-test -t sine -f 440 -c 2 -s 1
$ speaker-test -t wav -c 2

ALSL speaker-test utility


$ aplay ./usr/share/scratch/Media/Sounds/Animal/Kitten.wav

http://linux.die.net/man/1/aplay WAV player that comes with ALSA

$ sudo find -name *.wav




$ mplayer ~/TTS/audio.mp3

$ echo "hello" | festival --tts

$ sudo espeak -ven+m2 -k6 -s250 "hello" 2>/dev/null

$ ~/TTS/GoogleSpeech.sh hello<em id="__mceDel"><em id="__mceDel"><em id="__mceDel"> </em></em></em>

Click/Poping update your firmware


PiRobot Build 2: Adding Heat Sink & Temp Tests Raspberry Pi

I wanted to add heat sinks to keep the core Raspberry Pi temperature down while running cpu intensive processes. I have made some huge strides on the PiRobot project, I just need get may act together and make all the posts. Here is one of the last things I have done but it is going to be an easy blog post so I decided to publish this 1st.

I checked the Raspberry Pi core and external temperatures during 3 stages for both OEM and after the heat sinks were installed. As a control the device had an external temperature reading of 24.7°c off and unplugged. While Idling the OEM average core temperature was 43.29°c with a max of 44.4°c and a min of 42.2°c. The external temperature was just about 40°c.

The 1st load test I did was using Python finding prime numbers. It found 78497 primes in 5:42.61 but the CPU usage never went above 25% so I needed to find another test. After reading how I can use the basic calculator as the CPU benchmark I modified the original equation so that the CPU would be maxed out for at least 20 minutes:

 $time echo "scale=10000; a(3)*8" | bc -l

You may need to install the bc package:

 $sudo apt-get install bc

After 20 minuets of 100% CPU usage the average core temperature was 45.38°c on the OEM Raspberry Pi, it maxed out at 47.1°c.

After installing the heat sinks on the Raspberry Pi the core and external temperatures definitely dropped. After idling for 24 hours the external temperature was 38.5°c and the  core temperature was 39.5°c. After ruining the same bc equation for over 20 minutes (100% CPU usage) the average core temperature was 42.67°c with a miximum temerature of 44.4°c. For more details of temperatures download this: HeatSinkTests.xls.

Raspberry Pi Heat Sink:

raspberry pi

Happy Saint Patty’s Day Everyone, have fun and stay safe!


This gallery contains 5 photos.

Happy Saint Patty’s Day, I decided to make corn beef and and cabbage for the 1st time and in a pressure cooker! On lunch I went to the market to get some lunch, I picked up a plate of corn beef and … Continue reading

DIY Tacoma Speaker Mounts (2010)


This gallery contains 8 photos.

DIY Tacoma Speaker Mounts for A 2010 Toyota Tacoma. I love just about every aspect of my new Toyota Tacoma but the stereo is horrible. After about a week of constantly reaching to turn up the stereo and it already maxed out I decided to … Continue reading