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

Installation:

$ sudo apt-get install alsa-utils

http://www.alsa-project.org/main/index.php/Main_Page

$ 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

http://mplayerhq.hu/design7/news.html

$ 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

http://lame.sourceforge.net

$ sudo apt-get install festival

http://www.cstr.ed.ac.uk/projects/festival/

$ sudo apt-get install espeak

http://espeak.sourceforge.net

Google Translate Bash Shell Script install

http://elinux.org/RPi_Text_to_Speech_(Speech_Synthesis)

$ 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://zoid.3.13.83.61.nip.io/audio.mp3

Verification:

$ sudo reboot

Reboot the Raspberry Pi

$ lsmod

Displays the kernel modules currently loaded

Look for snd-bcn2835     Broadcom snd-bcn2835

http://en.wikipedia.org/wiki/System_on_a_chip

http://www.broadcom.com/products/BCM2835

$ amixer cset numid=3 1

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

$ amixer cset numid=1 -- 100%

Testing:

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

ALSL speaker-test utility

http://www.mythtv.org/wiki/Using_ALSA’s_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

./usr/share/sounds/alsa/Side_Right.wav

./usr/share/sounds/alsa/Front_Center.wav

./usr/share/sounds/alsa/Side_Left.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!

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 and cabbage from the “already hot” section of their deli department. I walk 30 feet out of the door and wind blew the plate completely out of my hand. So I decided to try to make it myself. I didn’t want to wait for 4 hours for it to cook so I made it using the pressure cooker, less then one and a half hours later….

saint patty's day

saint patty's day

20130317-162624.jpg

corn beef and and cabbage

saint patty\'s day

 

Saint Patty’s Day

 

iPad Dash Dock Prototype

iTV