Solved

Audio compression

Posted on 1997-07-21
11
278 Views
Last Modified: 2010-04-04
I need to compress a 10kHz sampled wav file by 10:1 (or higher if poss)
Any ideas?
Comments only please unless you have some example code.
Sorry about the points - I've given away too many recently.....
0
Comment
Question by:bcrotaz
  • 6
  • 4
11 Comments
 
LVL 1

Expert Comment

by:lowlevel
ID: 1339416
compress it into mp3, get yourself mp3-code to use the mp3-data?
0
 
LVL 4

Expert Comment

by:erajoj
ID: 1339417
There is NO way (with todays tech) to compress a wav-file by
10:1 and keep ALL sound information unless the sound is a perfect
sinus-wave or some other periodic signal, since most sound
is too complex and has a tendency to act almost like noise when
compressed.
There are compromises though, and these are for instance
MPEG audio layer 2 & 3 (like lowlevel mentions). But the code
is quite complicated.

The easy way is to lower the bandwidth of the signal by filtering
it with a lowpass filter or resample the sound to a lower
samplefreq and saving it as a wav with subformat;
ADPCM or GSM 6.10. These subformats work in Windows and you
can play them with the TMediaPlayer. To save to these formats; use GoldWave or some other sound editor.
Example:
  I used a "Beavis & Butthead" sample in 8kHz with good quality.
  Original size: 45,022 bytes
  ADPCM        : 16,856  -"-
  GSM          :  6,772! -"-
  Both new samples turned out to have better quality than
  expected.

/// John

0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1339418
GSM?
0
 
LVL 4

Expert Comment

by:erajoj
ID: 1339419
Yes, GSM!
The GSM cellular phone standard contains an audio compression
specification for speech, based on a Regular Pulse Excited -
Linear Predictive Coder (RPE-LPC) with a Long Term Predictor loop.
Basically, information from previous samples, which does
not change very quickly, is used to predict the current sample.
The coefficients of the linear combination of the previous
samples, plus an encoded form of the residual, the difference
between the predicted and actual sample, represent the signal.

/// John

0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1339420
Sorry to reject the answer, it's vaguely helpful, but I would like some more input on this one.

If it helps anyone, I can record at full bandwidth (5kHz audio, 10kHz sampling), then I want to take a 1 hour long file and compress it afterwards, in the background.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:bcrotaz
ID: 1339421
Aha - got some more points!
0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1339422
Although it wasn't mentioned above (I thought it did it automatically...) - this is now worth 150....
0
 
LVL 4

Expert Comment

by:erajoj
ID: 1339423
What quality are we talking about here?
  Is lowering of bandwidth an option?
  Is it speech or music or birdsong or ...
What compression speeds are we talking about?
  MP3 takes "forever" to compress.
Can you not use external applications for
compression & playing?

Have you got any preferences whatsoever?
  (wav output format, QUALITY, etc...)

/// John

0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1339424
OK - it's for logging FM radio station output.  I need stereo and mono options.  I'm recording real time all the time, and saving a new file every hour.  The aim is to get 24 hours onto a CD, with 5 mono tracks ( poss 2xstereo + mono ).  I must be able to get back to the original sample rate on playback to ensure transmitted time-of-day is correct, and I can switch between the files with no break in audio on playback.
It's my own playback software, so the recorded file can be in any format at all.  It just must be compressed as small as possible.  Quality wise, not much worse than 8-bit 8k sampling sounds.
I can do the original recording at any quality.   The compression is a background task once the one hour file is complete.

Does that help?

If someone can tell me where to go for more info and codeable methods of doing this, or has a component to do a form of compression, please suggest it!
0
 
LVL 4

Accepted Solution

by:
erajoj earned 150 total points
ID: 1339425
Hi again,

I just can't give up on this... ;-)
At this place you can get RealAudio SDK:S for Decoding/Encoding
RealAudio :
http://www.real.com/products/tools/sdk/apply.html
(Haven't tested myself (YET) but it's a fairly good
audio compression with, obviously, freeware SDK)

Here are good audio compression start links:
  http://www.mpeg.org/index.html/audio.html
  http://www.mpeg.org/~tristan/MPEG/links.html#links

Here for instance is one good page:  http://fas.sfu.ca/cs/undergrad/CourseMaterials/CMPT479/material/notes/Chap4/Chap4.3/Chap4.3.html

Maybe these can help you some:
http://sunsite.lanet.lv/ftp/mirror/x2ftp/msdos/programming/mxcode/ampegsrc.zip
ftp://garbo.uwasa.fi/pc/sound/codct4_b.zip
http://203.69.2.248/DELPHI/D32FREE/MSACM.ZIP

Can't really help you more since the piles of work I HAVE TO DO
keeps falling over me all the time! ;^)

/// John

0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1339426
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX enumerated colours 2 84
oracle global variables 4 63
Firemonkey DbLookupComboBox equivalent ? 2 32
Not able to call Delphi XE10 dll function from Delphi 6.0 4 16
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now