A little snippet...

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

A little snippet...

Postby Bazza » Sun Feb 27, 2011 11:35 pm

Hi guys...

This might be of interest to some of you out there...

'/dev/audio' IS needed for this to work...

If '/dev/audio' does not exist then install oss-compat from your distro`s

Recording and playing back a short, simple sample from the command
line. This is easiest on a laptop/notebook/netbook with a builtin mic`.

1) Assume that you are already booted up into a Linux OS of your flavour.
2) Assume you know how to open up a terminal.
3) Assume you know how to create a new folder/drawer/directory.
4) Open up a Terminal/CLI.
5) you might need to be in root mode for this to work but in my case on
this Debian 6.0.0 it worked without "su" mode.
6) Use a temporary folder/drawer/directory to save to and "cd" to it.
7) In my case /home/wisecracker/TMP...

Now from the CLI to record, type:-

cat /dev/audio > sometestfile[RETURN/ENTER]

Immedaitely after ENTERing, start talking loudly into the mic for about
four seconds. Press Ctrl-C to exit the command at the end of the four

The file "sometestfile" should be autosaved to the temporary drawer
and will be NO GREATER than 32768 bytes in size. It may be smaller
but NOT greater.

Now to replay the recorded audio type:-

cat sometestfile > /dev/audio[RETURN/ENTER]

And your dulcet tones will be heard in the speakers.

Good eh!... ;o)

Bazza, G0LCU...

Team AMIGA...
User avatar
LXF regular
Posts: 1482
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests