How to convert audio cassettes to mp3

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#16 Post by Flash »

Bruce B wrote:<snip>
I read something about wavrec and thought I'd check and see if it was installed, before I downloaded and installed it.
Good thinking!
Maybe wavrec and other small utilities get installed as support files with other packages like Xripper, Gcombust, or XS sound editor or ??.
Would that be one of those dependency things, or is that different?
wavrec --help tells you pretty much how to use it.
Thanks!

User avatar
Ian
Official Dog Handler
Posts: 1234
Joined: Wed 04 May 2005, 12:00
Location: Queensland

#17 Post by Ian »

Has anybody tried ripperX.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#18 Post by BarryK »

XS should do the job without any trouble.
XS can save to any file format supported by the Snack library, which includes MP3.

There are some plugins for XS, that are supposed to be loaded at startup, except that XS couldn't find them -- I have fixed that for Pup 1.0.4.
The plugins are in 1.0.3, in /usr/lib/snack/ I think, so XS can load them -- there's a plugin loading thing in the menu.

If you just want to record audio cassettes, Audacity is an overkill.
...except, if it has some kind of hiss-reduction/background-noise-reduction capability, that would be useful, but perhaps that would be too much to ask of Audacity.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#19 Post by Flash »

Ian wrote:Has anybody tried ripperX.
Yes indeed:
http://www.murga.org/~puppy/viewtopic.php?p=3709#3709
But not for recording from line-in; only for ripping tracks from CDs (and converting them to mp3.)

I didn't know you could use it for recording. I'm not in Puppy right now so I can't check.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#20 Post by Flash »

Here's Lobster's post on using XS sound editor to record.

User avatar
klhrevolutionist
Posts: 1121
Joined: Wed 08 Jun 2005, 10:09

How to

#21 Post by klhrevolutionist »

I was wondering if there's a way to record stuff from shoutcast??
say I was listening to a comedy show and wanted to record??

Bruce B

How I did it

#22 Post by Bruce B »

Thanks everyone for the help and suggestions.

I knew it would be very feasible to convert cassettes to mp3 files, but I'd never done it before.

Now that I've done it and worked out a system, I'd like to share with you all what I've learned and how I did it.

After trying several techniques it became obvious that the cl utility wavrec (included with Puppy) is the way to go for making the initial recording. The basic problem with the graphical programs is mostly that the files are potentially huge, and it takes a lot of time and resources for these programs to handle and save huge files.

USING WAVREC


Usage: wavrec [options] output_file

Options:
  • -h This info (or use --help)
    -q Quiet mode (no messages)
    -s rate Sampling rate
    -x Debug mode
    -S Stereo (undoes -M)
    -M Mono (undoes -S)
    -t secs Set time limit
    -b bits Set number of bits (8/16)
    -k key Set IPC Key for lock
    -R Remove and recreate semaphore locks.
    -l Lock for play.
    -u Unlock for play.
    -L Lock for record.
    -U Unlock for record.
    -d dev Override default of /dev/dsp
    -V Display version and Copyright info (or use --version)
I was recording mono cassettes and the options I used were as follows:

# wavrec -s 44100 -M -t 1800 -b 16 00.wav

If I was recording stereo, I'd use these arguments:

# wavrec -s 44100 -S -t 1800 -b 16 00.wav

Basically, what I did was set my walkman on the desk and plugged it into the sound card input with a male - male four foot 1/8" stereo adapter cord.

The first step one needs to do is calibrate and adjust the volume of the recording. In order to get any sound at all I had to use Puppy's Xtmix, then enable 'IN GAIN' and adjust the volume settings.

A quick technique for the calibration process is enter these commands on the command-line:

# wavrec -s 44100 -S -t 8 -b 16 test.wav;wavplay test.wav

This will record for 8 seconds and then playback for 8 seconds.

Note: if you have a powerful output device, I'd recommend starting out with low volume levels. The reason why is: I don't know how much power the sound card input can handle. Play it safe. My walkman only has power to drive dynamic earphones, so I needed the volume very high.

Adjust the recording time so that it is longer than the anticipated playing time so you don't fall short and have to start over.

One nice thing is wavrec takes very little cpu usage so you can record in the background and have most of your computer's resources for other tasks.

At the end of your preset recording time wavrec will stop and return to the command prompt. You will have very big file which needs to have silence trimmed off the end of the recording.

I tried a few graphical editors to open these files, but it takes them forever and a day to open, edit and save a 300 MB file. Some won't open these files because they are too big.

In any event I discovered a command line utility called wavsplit. Wavsplit will trim the silence in just a few seconds. I'll make a dotpup package post it with all the other dotpups.

WAVSPLIT

-----------------

WAVSPLIT version 1.1.0 (http://www.fomalhaut.de)
Licensed under GPL by author Tobias Weihmann
Hour patch by Sacha Bartok (sacha@myrealbox.com)
Modified for frames, hours, seconds, decimal seconds by Alan Fitch

Usage: wavsplit [options] wavfile split split split...
  • Options:
    -q --quiet Quiet mode (no messages)
    -H --Hours Use Hours
    wavsplit [options] wavfile hr:min:sec [hr:min:sec]...
    -f --frames FPS use Frames
    FPS (frames per second) must be either 12, 24, 25, or 30
    wavsplit [options] wavfile min:sec:fr [min:sec:fr]...
    -s --seconds Use Seconds
    wavsplit [options] wavfile sec [sec]...
    -h --help This info

    You can combine both Hours and frames options

    Examples:
    wavsplit --frames 30 file.wav 32:21:15 45:10:0
    wavsplit --Hours file.wav 1:32:21:59.2 1:45:10:0.3
    wavsplit --seconds file.wav 300.1 500.2
-----------------

You can break the file in several pieces if you want. All I needed to do was trim the silence from the ends.

My command string would look like this example:

# wavsplit -H 00.wav 00:23:14

What wavsplit does is make a subdirectory based on the basename of the wav file. It puts the split files in that subdirectory. It doesn't modify the original.

The question is: "How do you know where to split the file?"

I used xmms (a dotpup package) on the command line like this:

xmms 00.wav &

Xmms has a slider that makes it very simple to find the end of the recording. It also displays the position in minutes and seconds so it makes it simple to know precisely where to split the file.

CONVERTING WAV TO MP3

Once you have your wav files all ready for decoding you can use lame or bladeenc. Lame is included with puppy and bladeenc can be downloaded.

The common command string for lame is:

# lame -h inname.wav outname.mp3

You can also use:

# lame -h *.wav

The command for bladeenc (not included with Puppy) is:

# bladeenc *.wav

This decoding process is time consuming and uses plenty of cpu power at low priority.

Disclaimer: There are probably dozens of ways to do this and probably better ways. I'm not trying to claim this is the way, rather this is how I did it with Puppy, and it worked great.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Sound Recording

#23 Post by Lobster »

Have placed the info here if anyone has ideas to add
just double click and edit
http://www.goosee.com/puppy/wikka/SoundRecording

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#24 Post by Flash »

Thank you Bruce B. :)

You can also use RipperX to convert wav files to mp3 once you have the wav files on the HD. It might be easier to use the ripperX GUI rather than configure Lame from the command line.

As for the Lame settings to use, it doesn't make sense to use very high quality mp3 settings to convert wav files taken off an audio tape (unless you're talking about a hi-fi reel-to-reel tape deck, and even that's probably only FM radio quality, not CD quality.) Using lower quality settings might speed up the process of converting wav files to mp3, and it would certainly result in smaller mp3 files.

Bruce B

#25 Post by Bruce B »

Thanks Flash.

I updated the wiki as follows:
  • So much for the command line .wav to .mp3 encoding. How about GUI encoding? You may find it easier and more flexible to use Puppy's ripperX to convert your .wav files to mp3 format, instead of the command line conversions outlined above.

    Also, ripperX's mp3 tab in the 'configuration section' allows you to easily modify bit rates and quality modes for a smaller file and faster conversion. You would not need the highest quality settings in this type of recording process.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#26 Post by Flash »

:oops: It seems that my record of never opening my mouth without making a fool of myself remains intact. When I tried it last night I couldn't find a way to use ripperX to convert a wav file on the hard drive to mp3, not unless ripperX first ripped the wav file to the hard drive from a CD.

I thought I remembered using ripperX to convert a wav file that was on the hard drive to mp3, or at least seeing that it could be done. I must have misremembered.

I am so sorry.

Bruce B

#27 Post by Bruce B »

You are right! I re-edited the wiki. Thanks.

BTW - I always use bladeenc. I have it in my mind that it is better. However, I don't have good enough ears to know for sure. :)

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

Just in case someone wants it.. here is wavsplit

#28 Post by PeterSieg »

Just downloaded and compiled wavsplit 1.2.1 by using bladehunters
opttools.sfs compiler environment :)
Just unzip and get a wavsplit* directory with executable, readme and source.

PS
Attachments
wavsplit.zip
(32.65 KiB) Downloaded 862 times
Have fun :)

Bruce B

#29 Post by Bruce B »

Funny, last night I put wavsplit up as a dotpup, in the additional software section.

http://www.murga.org/%7Epuppy/viewtopic ... &start=165

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

Ups

#30 Post by PeterSieg »

Ups - Sorry.. missed that one..

PS
Have fun :)

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

wavsilence

#31 Post by PeterSieg »

Hi. According to some info found on the net, a util called wavsilence
should be able to split large wav file automatically. One recommended
cmd is:
wavsilence -v -s -b 64 -n '%2' -c 0 -i filename.wav
There is also a readme included...
I have attached a fresh compiled version.. not tested by myself, but like
to know if it does the job...

PS
Attachments
wavsilence.zip
(12.7 KiB) Downloaded 684 times
Have fun :)

Bruce B

#32 Post by Bruce B »

Peter, thanks for the utility.

I replied (I thought) to you but I just noticed that I can't find the reply.

I've discovered how simple it is to record streaming sound with these utilities.

I think after I learn some more techniques I'll put all this together in an updated pup package.

I'm really satisified with the sound quality. Nevertheless I'm going to buy connecters with gold plating, they are not much more expensive.

Talk to you soon I hope.

Post Reply