A 4-year-old, Linux command line, and microphone

July 30th, 2011

There are certain times when I’m really glad that we have Linux on the house for our boys to play with. I’ve already written how our 4-year-old Jacob has fun with bash and can chain together commands to draw ASCII animated steam locomotives. Today I thought it might be fun to install cw, a program that can take text on standard input and play it on the console speaker or sound card as Morse code. Just the sort of thing that I could see Jacob eventually getting a kick out of.

But his PC was mute. We opened it up and discovered it didn’t have a console speaker. So we traipsed downstairs, dug out an external speaker, and I figured out how to enable the on-board audio chipset in the BIOS. So now the cw command worked, but also there were a lot of other possibilities. We also brought up a microphone.

While Jacob was busy with other things, I set to work getting things hooked up, volume levels adjusted, and wrote some shell scripts for him. I also printed out this reference sheet for Jacob:

He is good at reading but not so good at spelling. I intentionally didn’t write down what the commands do, hoping that this would provide some avenue for exploration for him. He already is generally familiar with the ones under the quiet category.

I wrote a shell script called “record”. It simply records from the microphone and drops a timestamped WAV file in a holding directory. He can then type “play” to simply play back whatever he recorded most recently. Easy enough.

But what he really wanted was sound for his ASCII steam locomotive. So with the help of a Google search for “steam train mp3″, I wrote a script “ssl” (sound steam locomotive) that starts playing the sound in the background if it isn’t already going, and then runs sl to show the animation. This was a big hit.

I also set it up so he can type “play train” to hear that audio, or “play song” to play our favorite train song (Always a Train in My Dreams by Steve Gillette). Jacob typed that in and sat still for the entire 3 minutes listening to it.

I had to hook up an Ethernet cable to his machine to do all this, and he was very interested that I was hooking his computer up to mine in some way. He thought all the stuff about cables in the walls was quite exciting.

The last thing I did was install flite, a speech synthesis program. I wrote a small shell script called “talk” which reads a line at a time from stdin and invokes flite for each one (to give more instant feedback rather than not starting playback until after having read a large block from stdin). He had some fun hearing it say his name and other favorite words, but predictably the most fun was when he typed gibberish at it, and heard it try to pronounce or spell nonsense words.

In all, he was so excited about this new world of computer sound opened up to him. I’m sure there will be lots of happy experimentation and discovery going on.

Update Feb 10, 2012: I have posted the shell scripts behind this.

Categories: Children & Computing, Family, Linux

Leave a comment

Comments Feed4 Comments

  1. Kevin Mark

    as someone volunteering for the OLPC project and a follower of debian blogs, I keep thinking about your adventures as steps that a child can take to ‘explore their computer’. Your explorations after you do a few more could be written up, illustrated and output as a pdf for Gnu parents as a way to bring a child from 0 to newbie gnu user. Learning about what a computer is, how it works, ‘kicking the tires’ as they learn how to interact with a computer, how to learn by playing.

    Reply

    John Goerzen Reply:

    Good idea. I just may do that.

    Reply

  2. Anonymous

    If he likes numbers, you might show him how to use “seq”, and let him use simple commands like “seq 1 10 | talk” to get the computer to count to him.

    Reply

    John Goerzen Reply:

    Nice idea. I bet he’d love that. And a great way to introduce piping.

    Reply

Leave a comment

 

Feed

http://changelog.complete.org / A 4-year-old, Linux command line, and microphone