Lets say I have a text file which contains a long list of 8bits data and i want to create a .wav or .au file from it.
Forexample, my text file contains 8000 bytes for 1 second of audio with the sample rate of 8kHz.

How do I create a .wav file that can be played in Windows Media Player? It is the creating .wav part that I am not so sure of.. Any advice or reference..?

I have read that .wav file contains headers which contain information like sample rates, file size etc..

Oh.. lets say if i have a choice between .wav file and .au file, which is easier to create..?

Recommended Answers

All 2 Replies

If those files pre-well known formatted so you can read the information of the file and the rest of file let's say the music took it and change its extension to .wav or .au this applies only you don't need to make operation on the bytes.

I am actually doing a VoIP program.. In the process of doing the proram, i need to investigate how the sound signal is like.. So, the client will send a bunch of bytes to the server (consists of sampled signals) and when the server receives the data bytes, it will create a .wav file or .au file. The reason is:
1) so that i can play the sound out to gauge its quality
2) so that i can read the file in matlab to perform FFT, and maybe some processing.
3) in doing all these, i will be able to compare both the original signal and the received signal in MATLAB environment because i am familiar with MATLAB.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.