tisdag 28 augusti 2012

Audio Recorder’ for Linux: easily record audio streams to mp3

But if you want – nay need – to record something from a radio station, a live web-cast performance or some other ‘audio’ event playing on your computer in Ubuntu how can you do so?






As the name somewhat obviously spells out ‘Audio Recorder’ is a small utility for recording audio. It’s able to capture output from your soundcard, microphone, web browser – even Skype; basically if it plays through your speakers Audio Recorder can record it.

If that boast sounds familiar to you then congrats: you have an excellent memory. ‘Audio Recorder’ is the revamped, renamed version of ‘Audio Rec’ – a traditional GNOME panel applet that offered much of the same. With traditional GNOME applets receiving the toe-end of the developer boot in 11.04, ‘Audio Recorder’ has reincarnated itself as an application proper - complete with obligatory with indicator-applet control.

Features

Whilst the feature set hasn’t changed since we last covered the app way back  in the far reaches of yester year, the way in which some of the features are implimented has. The nifty advanced timer – which can be used to auto-record audio at a set time, stop recording upon silence or adhere to a file size limit, etc – is still useful but certainly lacks the user-friendliness of old. Quite frankly the manually-editable configuration file approach used is just too much of a chore to bother with.
Recording can automatically triggered by various Linux music players – including Ubuntu default Banshee – as well as with Skype.
The Indicator-Applet used houses four standard options: hide window, stop/start recording, pause recording and quit. The icon used, however, leaves a lot to be desired.

Install

Available for Ubuntu 10.10 and 11.04, Audio Recorder can be installed via its own dedicated PPA.
To install via terminal issue the following commands: -
sudo apt-add-repository ppa:osmoma/audio-recorder
sudo apt-get update && sudo apt-get install audio-recorder
sudo apt-get install gir1.2-appindicator3-0.1
sudo apt-get install libappindicator3-dev
sudo apt-get install libappindicator3-1

Audio Recorder can be launched from the Applications > Audio/Sound sub menu. For 11.04 users just search ‘Audio Recorder’ in the Application lense.

Timer commands

Timer commands can stop, start and pause recording on a given condition.
The general syntax of the commands are
start [at | if | after | on] condition
stop [at | if | after | on] condition
pause [at | if | after | on] condition

The timer field can contain several commands and lines written in English. Press the [Save] button or CNTR + S keys to save the command text. Use the # character to comment out unused lines.

Conditions

Clock time:

This can stop or start the recording at given clock time. The time has format hh:mm:ss (hours:minutes:seconds) and you can either use the 24-hour clock or 12-hour notation with am or pm suffix (ending).
These two timer commands will start recording at 09:30 pm.
start at 09:30 pm
start at 21:30

These commands will stop recording at 9 o'clock in the morning.
stop at 09:00
stop at 09:00 am

The time is valid once a day. The command will fire again next day.
Note. Use the colon ":" to distinguish clock time (hh:mm::ss) from time period or duration.

Stop or pause recording on silence:

Use the silence word to stop or pause recording when there is no particular input on the line. You can also give the silence duration in minutes/seconds and signal level in decibel (dB) or percent (%). The default silence period is 7 seconds and the default level value is -24 dB (that is around 7%).
Notice: If you use the silence word to pause recording, the recording will automatically continue after the condition becomes false (untrue).
Some examples
stop if silence
stop if silence 5s
And
pause if silence 5s -24dB
pause if silence
In these two cases the recording will pause when the average signal level goes under -24dB (7%) for 5 seconds time. The recording will automatically resume when the signal level rises over -24dB (ca. over 7%).

Activate recording on sound or voice:

Use the sound, voice or audio words to start recording when the signal level rises over a given level. All these three words mean the same. As with the silence command, you can give the duration in seconds and signal levels in dB or %. The default duration is 7 seconds and the default level value is -24 dB (that is around 7%).
Examples
start if sound
start if sound 4s
start if voice 3 sec 10%
start if audio -20dB

Notice: If you use the sound (voice or audio) words to start recording, the recording will automatically pause temporarily when the signal level drops under the given level value.
Click the level-bar to show/hide the current % or decibel (dB) value.

File size:

Stop or pause recording after certain file size. The file size must be an integer or decimal number. The size unit can be bytes, kB, MB, GB or TB.
For example this will stop recording when the file size reaches 500 KB.
stop if 500 kB
pause if 0.5MB

This will stop recording after 2GB or 12:00 pm.
stop after 2 GB | 12 pm

Time period:

Stop, start or pause recording after given time period. The period or duration has syntax #h #m #s.
Eg. this command will stop recording after 1 hour 20 minutes and 15 seconds.
stop after 1h 20m 15s
This will start recording after 22 minutes.
start after 22min
And this will pause recording after 30 minutes or 20 MB.
pause after 30 minutes | 20 mb
You can abbreviate the word hour with h, minutes with m or min, and seconds with s or sec.

Combine several values in one command

You can add several conditions to one line. Separate the conditions with the | character. The values are then or'ed.
For example, this will stop recording after 20 minutes or when the file size exceeds 1GB or if there is no input (the line is empty, silent) in 5 seconds time.
stop after 20 min | 1GB | silence 5s
Another example.
start if sound 6% | 10:00 pm

Commenting out lines

Use the # character to comment out (deactivate) lines.
This command has no effect.
# stop after 800 MB | 20:00:00

Command-line options related to the timer

You can study the audio level values by starting the program with --debug-signal option. The program will then print various level values (signal values) in dB (decibel) and % format. Pay attension to the last "Avg.rms=" value. The timer will use it to trigger the commands.
This example will start the program from a command line. Start a terminal window from the desktop's main menu and type
audio-recorder --debug-signal
or
audio-recorder -d
Then activate the timer and study the "Avg.rms" value. It may help you to set correct level value for the silence and sound|voice|audio commands.
Notice: You must activate the timer, and use one of silence, sound, voice or audio commands to see the level values.

Controlling the recorder from command line

You can easily control the program from a terminal window by using the -c or --command argument.
Valid commands are: status, start, stop, pause, show, hide and quit.
Some examples:
audio-recorder --command start
audio-recorder --command start,hide
audio-recorder --command hide
audio-recorder --command stop
audio-recorder --command stop,hide
audio-recorder --command quit

The status command returns one of these strings: 'not running', 'on', 'off' or 'paused'.
audio-recorder --command status

For other options, type
audio-recorder --help


http://ppa.launchpad.net/osmoma/audio-recorder/ubuntu/pool/main/a/audio-recorder/

Inga kommentarer: