lunes, 14 de abril de 2014

Giving a voice to the beaglebone black

Adding a sound card to the beaglebone black(English) 




Howdy folks! Now I'm gonna explain you how to add a sound card to the BBB and some examples of using it as a voice syntheziser.

What are we using?

  • A Beaglebone 
  • An audio usb card
  • An audio amplifier or  headphones
Well, before going forward I have to explain why I'm Adding a sound card to my BBB, yes you got me, Im want it to be ALIVE!!( or al least to seems like it is) as you May know in the future I'm gonna be developing a smartass robot and without propper communication skills it won't be that smart right? #)

First of all... Install alsa, in case you don't have it already!!( Internet acces required)
$ opkg install libasound2
$ opkg install alsa-dev 
$ opkg install alsa-lib-dev

then install espeak:

$ opkg install  espeak

Once the install process is finished you have to select the default harware you are going to use...

If you are using a usb audio card plug the dongle and enter the next command to look for your current audio devices:

$ aplay -l

Something like this should appear:








As you see my USB Audio device is set as "card 1", so I need to create/edit the /etc/asound.conf writting the following line:

pcm.!default sysdefault:1

note: sysdefault:1 because my USB card is on "card 1", if your card is set as "card 2" you should write sysdefault:2, 

In case we want to set our default audio output again to HDMI we just need to write:

pcm.!default sysdefault:0


Now let's test the Audio synthesizer!!!!

Connect your headphones or Amplifier equipment to the USB audio card and execute the following command:

$ espeak "Hello World"

Eureka!!! If you're lucky you are going to hear a nice "Hello World" from your beloved BBB =D(If you're not lucky maybe I've missed something, please feel free to comment or send me an email, I'll answer ASAP!! =P

More information about espeak can be found in 

http://travesuras.wordpress.com/2012/01/11/20120111-1/
http://espeak.sourceforge.net/


May the bone be with you...

MCT

No hay comentarios.:

Publicar un comentario