Reducing wav size?

Soldato
Joined
25 Nov 2004
Posts
4,788
Location
Hertfordshire
Not sure if this is the right forum....but just after a few ideas for this...

Basically, I need to get a few audio samples on a memory module of 512kb capacity.

Problem is, the audio has to be PCM uncompressed wav, and provisionally, a minimum of 16bit, 32khz, stereo.

As for length, well, obviously it won't be full songs or anything - jsut a few seconds is fine. I'm currently getting a 3 second sample at just over 300kb...which is no good.

I've tried cutting out high and low frequencies using Soundforge and also started looking at the possibility of editing the wav file header etc in a hex editor...but not sure if the gain would be worth the effort.

Im not bothered about sound quality here, just as long as it plays something lol.

Anyone have any other suggestions? :)

(or is the 16bit/32khz/stereo asking a bit much?)
 
Associate
Joined
5 Nov 2002
Posts
1,575
Location
Cardiff | UK
Must it be uncompressed WAV?
FLAC and other lossless formats are the same quality.

Monkey audio is also a good one - although it can't be uncompressed on the fly.

You are unlikely to get much mileage out of geting rid of certain frequencies, as unfortunately wav is a very inefficient format.
 
Soldato
Joined
1 Apr 2004
Posts
2,981
Location
Herts, UK
If sound quality is not an issue why have you specified 16bit, 32 KHz stereo.
Even if you did cut off some frequencies you are still sampling at the same frequency.
You can reduce the size a lot by going to mono (125kbps to 62kbps), or drop to 8bit (again 125kbps to 62kbps), or drop to 24KHz (125kbps to 93kbps). If you go down to 8bit, 24KHz, mono you go from 125kbps to 23kbps so your 3 second sample goes from 300kb to about 70kb.
 
Soldato
OP
Joined
25 Nov 2004
Posts
4,788
Location
Hertfordshire
A bit more info, twas a bit vague before: I'm basically using the small memory module to store the audio samples which will be accessed via a program and passed through a DAC to playback through some output (headphones, speakers etc).

This is not on a computer - its a separate circuit board project - so, there will be no processing as such going on besides the DAC, hence no special codecs can be used and hence the need for uncompressed wav.

The DAC being used accepts a minimum of 16bit (which is fine as it is 2's compliment data), but I think I can shift a bit lower on the sampling frequency, so less than 32khz should be ok...

Also, the DAC is designed for accepting stereo data - has a left and right channel output.

I know I said sound quality isn't that important, but it would be good to actually hear the sounds rather than a muffled blurr...what's a good compromise between size and sampling frequency? In this case, is the sampling frequency going to be the only variable I can alter then?
 
Soldato
Joined
1 Apr 2004
Posts
2,981
Location
Herts, UK
dmpoole said:
Can you explain that please?

Basically it keeps every part of the audio signal, even the stuff with nothing in, or that you can't hear anyway.
Formats like MP3 or WMA remove (don't sample) the frequencies above and below the human ear's ability.
Also Wav is stuck at a fixed sampling rate, whereas MP3/WMA can vary the sampling rate. If you have a song, wav sampling at 1 every ms and mp3 1 every ms by default. If the song has a minute of silence, wav would keep sampling that silence at 1 every ms, but mp3 could drop that to 1 every 10ms and the resulting file size would be much smaller for that minute of silence with mp3 as with wav.

OP you say the DAC is designed for left and right signal, but mono can be split for left and right, the two are just the same signal. You should be able to fit about 3 times as much audio with mono 24kHz as you can with stereo 32kHz.
 
Back
Top Bottom