Compress/Decompress Wave file to MP3 and vice versa [Archive] - Audio & Video Forums

PDA

View Full Version : Compress/Decompress Wave file to MP3 and vice versa



cindy_16051988
04-17-2006, 06:14 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.

jneutron
04-18-2006, 08:02 AM
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.

Hi Cindy

When I convert waves at mp3 rate of 320kbps, the ratio is about 4 to 1..A 21.456 meg file drops to 4.867, a ratio of 4.4.

At 128 kbps, the ratio is about 10 for this file size.

I culled a file down to 183 kb, it converts to a file size of 17.1 kB at 128kbps.

20 times 17K is 340 K, you should be able to do it.

BTW, I use 320 kbps for archival purposes if I'm storage limited, but 128 kbps is sufficient for most music files, if you're not too concerned with phase artifacts. For vocal, 128 should be great.

Cheers, John

cindy_16051988
04-18-2006, 05:17 PM
Hi Cindy

When I convert waves at mp3 rate of 320kbps, the ratio is about 4 to 1..A 21.456 meg file drops to 4.867, a ratio of 4.4.

At 128 kbps, the ratio is about 10 for this file size.

I culled a file down to 183 kb, it converts to a file size of 17.1 kB at 128kbps.

20 times 17K is 340 K, you should be able to do it.

BTW, I use 320 kbps for archival purposes if I'm storage limited, but 128 kbps is sufficient for most music files, if you're not too concerned with phase artifacts. For vocal, 128 should be great.

Cheers, John

Hi, John, thank you very much for your post.
I need to incorporate compression/decompression source codes into my current software.

I can accept lossy compression.

I am totally new to this as the software is written by one of my previous friend who worked together with me in a voluntary speech rehabilitaion centre. We need this software to train children in the centre. I work part time there.

But, forgive me if my question looked stupid. I cant use a third party software that is 'outside' of my software project platform. I need to incorporate or call the compression/decompression source code into my software.
I have problem of how to call or incorporate the source code into my software.
Can you please give me advice? Please help, really dont know where and how should I start, please, please.
Could you please spend some time to teach me or guide me how to incorporate the source codes into the current software? I promised I will try my best and I promise to be as independent as possible. But, I really need your help at this very beginning, please help. I really appreciate, please.

jneutron
04-19-2006, 04:57 AM
Hi, John, thank you very much for your post.
I need to incorporate compression/decompression source codes into my current software.

I can accept lossy compression.

I am totally new to this as the software is written by one of my previous friend who worked together with me in a voluntary speech rehabilitaion centre. We need this software to train children in the centre. I work part time there.

But, forgive me if my question looked stupid. I cant use a third party software that is 'outside' of my software project platform. I need to incorporate or call the compression/decompression source code into my software.
I have problem of how to call or incorporate the source code into my software.
Can you please give me advice? Please help, really dont know where and how should I start, please, please.
Could you please spend some time to teach me or guide me how to incorporate the source codes into the current software? I promised I will try my best and I promise to be as independent as possible. But, I really need your help at this very beginning, please help. I really appreciate, please.
Alas, I have absolutely no idea how to code the compression algorithms. I use canned software on a pc platform.

It would probably be easier to convert from floppy disks to usb memory sticks and just use 128 or 512meg at the native sampling rate.

When I answered your q, I didn't know you wanted to embed the conversion.

Good luck, sorry I was not of much help.

Cheers, John

noddin0ff
04-19-2006, 06:18 AM
cindy-

your best bet might be to consider alternatives to the floppy. Tell us what computers your using and there may be an alternative. Like E-stat said, you might have a superior and quick solution for only $20. I'm curious to know what part of the world still requires a floppy?

With regard to embedding code...maybe someone here knows how to do that but this is not the best forum for programing. I suggest you look for forums that focus on Visual C++ and ask there. I googled this forum
http://www.tek-tips.com/threadminder.cfm?pid=116
it might be a good place to start. Ask if it is possible to obtain code for MP3 conversion and would anyone help you embed it.

jneutron
04-19-2006, 06:28 AM
Like E-stat said.....

An E-stat sighting??? Where, where??

I wanna see..


What's wrong with this thread? I thought there was another post somewhere, but now it seems gone..missing...vaporized..poof.

Cheers, John

jneutron
04-19-2006, 09:33 AM
Cindy, Cindy, Cindy..tsk tsk...shame on you..

Double posting...ah, where did we go wrong..


Don't you know..if youzis gonna double post, youziz gonna confuse da maroons...no wonder I couldn't figger it out..

Sheesh

Cheers, John

cindy_16051988
04-19-2006, 05:33 PM
I am sorry for the double posts. After I posted, I only realized that I have posted in wrong forum and I dont know how to delete an already-posted message. so I re-posted it. This is my beginning time of joining forum, please forgive me.

jneutron
04-20-2006, 05:28 AM
I am sorry for the double posts. After I posted, I only realized that I have posted in wrong forum and I dont know how to delete an already-posted message. so I re-posted it. This is my beginning time of joining forum, please forgive me.

There has to be some penalty imposed..I'm not sure what, as I left my wet noodle at home.

Maybe the older guys (that of course, doesn't mean me..) could vote some obscure and trivial punishment in keeping with the transgression.

Welcome to the forum, hope you find your answer..

And, stop confusing us mentally challenged older guys, huh??

Cheers, John

swicken
04-20-2006, 08:43 AM
What language/IDE are you currently using to develop the software?

cindy_16051988
04-20-2006, 04:32 PM
There has to be some penalty imposed..I'm not sure what, as I left my wet noodle at home.

Maybe the older guys (that of course, doesn't mean me..) could vote some obscure and trivial punishment in keeping with the transgression.

Welcome to the forum, hope you find your answer..

And, stop confusing us mentally challenged older guys, huh??

Cheers, John

I will keep that in mind, sure.
Sorry, I dont understand what you mean by this sentence "stop confusing us mentally challenged older guys" ?

cindy_16051988
04-20-2006, 04:33 PM
What language/IDE are you currently using to develop the software?

Microsoft Visual C++ 6.0, I use MFC-based with C/C++ language for recording and playback parts

jneutron
04-21-2006, 06:53 AM
I will keep that in mind, sure.
Sorry, I dont understand what you mean by this sentence "stop confusing us mentally challenged older guys" ?

It means...

1.. I am an older guy.

and

2.. I am mentally challenged.

and

3. I am easily confused.


It was intended as a humerous act of self-directed pie-in-the-face.. one intended to lighten the air, and to show that it is important to not take one's self too seriously.

Apparently not humerous enough, though..

Cheers, John

E-Stat
04-24-2006, 07:05 PM
An E-stat sighting??? Where, where??I wanna see..
That would be on her first post of this question.

http://forums.audioreview.com/showthread.php?t=17223

As a computer engineer, I can safely say that the floppy has been pronounced dead. When 256 MB USB drives can be purchased for $20, the value of spending a buck or two for 1.44 MB magnetic media has virtually disappeared. Go buy a new $300 computer from Dell that has a bunch of USB ports.

rw