View Full Version : Compress/Decompress Wave file to MP3 and vice versa
cindy_16051988
04-17-2006, 06:15 PM
Hello. Sorry to disturb you all. I hope to get your opinion. For your information, I have a Visual C++ 6.0 software to record and playback human speech. All the speech is recorded with sampling rate of 16kHz in wave file format. Each wave file size is 188kbytes. I have 20 wave files in each practice or each usage of software. And, I need to save all these 20 wave files into a single floppy disk (1.44 Mbytes).
Total size of 20 wave files = 20*188k = 3,760,000 bytes
Total floppy disk needed = (3,760,000)/1,440,000 = 2.6 floppy disks
But, I must save all the 20 wave files into a single floppy disk
I hope it can work like this: save the data as a wave file in the temporary directory and then convert wave file to MP3 file in your floppy disk. To load a file, convert the mp3 file to wave file in the temporary directory and then load the wave file to the memory.
Can this method enable me to save all 20 wave files in a single floppy disk?
I don’t know how to insert the encoding/decoding program codes into my current software without causing any new bugs.
Or, other than the MP3 compression method, do you have another method or idea of minimizing the size of each wave file? Please tell me.
Hope to hear you soon, thanks.
noddin0ff
04-17-2006, 06:29 PM
If I understand, the MP3 format is never going to be a usable playback for you in this system? If you are just trying to transport files via a floppy, AND would prefer to have the WAV files the same on each end, I'd first try more standard compression software like WinZip. These programs will make the files as small as possible without loosing data.
Any time you convert to MP3, data will be discarded. This might be OK for your needs. The conversion to MP3 will degrade the quality to some degree (small or large) depending on the degree of compression and this degredation is not reversible.
cindy_16051988
04-17-2006, 08:14 PM
If I understand, the MP3 format is never going to be a usable playback for you in this system? If you are just trying to transport files via a floppy, AND would prefer to have the WAV files the same on each end, I'd first try more standard compression software like WinZip. These programs will make the files as small as possible without loosing data.
Any time you convert to MP3, data will be discarded. This might be OK for your needs. The conversion to MP3 will degrade the quality to some degree (small or large) depending on the degree of compression and this degredation is not reversible.
Hello, noddinOff, thank you for your post, really appreciate.
Sorry, Please forgive my stupidness, I dont understand what you mean by " MP3 format is never going to be a usable playback for you in this system?". I am so sad why I am so stupid.
Yes, you are right. I want to transport files via a floppy and have the WAV files on each end. But I must do compression in order to save in single floppy.
I have tested on market available MP3 compression software and I can accept the quality very well. My problem is how to implement the compression/decompression source codes in my currect software?
Hope to hear you, please, really need help, please.
noddin0ff
04-18-2006, 06:30 AM
I dont understand what you mean by " MP3 format is never going to be a usable playback for you in this system?".
My clumbsy way of asking if you wanted WAV at both ends.
Yes, you are right. I want to transport files via a floppy and have the WAV files on each end. But I must do compression in order to save in single floppy.
I have tested on market available MP3 compression software and I can accept the quality very well. My problem is how to implement the compression/decompression source codes in my currect software?
Hope to hear you, please, really need help, please.
Unfortunately, I don't have any experience whatsoever with Visual C++. But, it sounds like WAV files are created somewhere on your harddrive when you record? I assume you also have a Windows OS installed? You should be able to convert the files to MP3 or alternatively compress with WinZip in the Windows OS after they are created in C++?
I realize you want to have it all done in C++. For this I have no clue. I can't code. But since the floppy is for transport only, it doesn't matter what form the compression is. It doens't have to be MP3 unless you need the lossy compression to removed data to save space. BUT using lossy compression like MP3 would essentially be the same as recording at a lower sampling rate...Something you could probably do up front by recording at less than 16khz to create smaller files.
A possible resourse for code is
http://sourceforge.net/projects/
I searched for 'c++ compression' and found this among others.
http://sourceforge.net/projects/scz-compress
I wouldn't know what to do with this but maybe you will.
cindy_16051988
04-18-2006, 05:36 PM
My clumbsy way of asking if you wanted WAV at both ends.
Unfortunately, I don't have any experience whatsoever with Visual C++. But, it sounds like WAV files are created somewhere on your harddrive when you record? I assume you also have a Windows OS installed? You should be able to convert the files to MP3 or alternatively compress with WinZip in the Windows OS after they are created in C++?
I realize you want to have it all done in C++. For this I have no clue. I can't code. But since the floppy is for transport only, it doesn't matter what form the compression is. It doens't have to be MP3 unless you need the lossy compression to removed data to save space. BUT using lossy compression like MP3 would essentially be the same as recording at a lower sampling rate...Something you could probably do up front by recording at less than 16khz to create smaller files.
A possible resourse for code is
http://sourceforge.net/projects/
I searched for 'c++ compression' and found this among others.
http://sourceforge.net/projects/scz-compress
I wouldn't know what to do with this but maybe you will.
Hi, NoddinOff, thank you very much for your reply.
Yes, you are right. I just want to reduce the size of each wave file because i have insufficient storage in a single floppy. It is not necessary to use MP3 compression. But I have no idea of other method than MP3 compression, mind to suggest me some?
I know I can reduce the sampling rate from 16kHz to 8kHz, doing this will reduce each wave file size into half. But, this is still not enough to save all 20 wave files into a single floppy.
So, I am thinking if I reduce sampling rate from 16kHz to 8kHz and also reduce from 16 bit to 8 bit, it is possible to save all 20 wave files into a single floppy disk. I realized that sampling rate of 8kHz wont be a problem for speech but I am afraid that the change of 16 bit to 8 bit will cause me BIG problem, is it?
Hope to hear you, thank you very much, appreciate.
E-Stat
04-19-2006, 04:52 AM
I have 20 wave files in each practice or each usage of software. And, I need to save all these 20 wave files into a single floppy disk (1.44 Mbytes).
My guess is that the files will still not fit on the limited storage of the floppy even after spending lots of time fiddling with the files.
Perhaps there is some compelling reason to continue to use a floppy, but I trust you aware that for about $20 you can eliminate the issue altogether with a USB drive.
rw
N. Abstentia
04-19-2006, 09:37 AM
E-Stat beat me to it. Floppy drives have been obsolete for over 5 years now.
Go to WalMart and plonk down $20 for a USB flash drive that will hold over 500 floppies. Throw the floppies in the trash.....in fact there's a very good chance that the computer you are taking the files to does not even have a floppy drive.
cindy_16051988
04-19-2006, 06:26 PM
Hi, thanks for your all replies.
No, We cant manage to supply each pen drive or CDRW for each child.
So, floppy is the only solution if wish to do the compression process.
I am wondering if other than compression method, is there any other methods that I can go to reduce the size of each wave file?
E-Stat
04-20-2006, 05:30 PM
So, floppy is the only solution if wish to do the compression process.
Produce three floppies for as long as you can find the media.
rw
cindy_16051988
04-23-2006, 06:18 PM
Produce three floppies for as long as you can find the media.
rw
E-Stat, thanks for your reply.
I also I can have 3 floppy disks for each child but we couldnt...
Ad I am really new to this field, I also hope to find an easier way for me to do but to no avail...
I just dont know what else can I do?
Please, if anyone knows, could you please give me any clues?
N. Abstentia
04-24-2006, 08:32 AM
If you're not willing to upgrade to the proper technology I'm afraid you're out of luck. There's just no way to get 20 full length .wav files onto a 1.44 meg floppy disk.
Why not set up a free gmail account and just email the files there? Then the files could be accessed over the web from anywhere. They give you almost 2 gigs of storage space.
noddin0ff
04-24-2006, 11:06 AM
Short of figuring out how to compress in C++ (and I think a C++ forum would be the place to go for that) all you can do is lower the resolution of the WAV. Are you recording in MONO. That will save 50% over stereo. Drop the sampling rate and go to 8 bit and see what happens.
What kind of ancient set up are you using that you make kids carry around floppies...? Are you supplying them all with ancient computers???
There is a such thing as a 2.88MB 3.5" floppy. You'd still need a drive that could read it and they aren't as cheap as 1.44MB floppies.
http://froogle.google.com/froogle?q=2.88MB+floppy+drive&hl=en&hs=QBl&lr=&safe=off&client=firefox-a&rls=org.mozilla:en-US:official&sa=X&oi=froogle&ct=title
Powered by vBulletin® Version 4.2.0 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.