I have installed Speex Voice ACM Codec 1.0.1.1 codec and they seem to have DIFFERENT .wav header then one described in C# code in this NSpeex(C#) package.
I can read .wav files created with “Speex Voice ACM Codec 1.0.1.1”, and decode them successfully, but when I create .wav files, “Speex Voice ACM Codec 1.0.1.1” does not recognize my header. I checked with Hex editor, and there are some bytes in .wav header that “Speex Voice ACM Codec 1.0.1.1” creates, and I do not create, and they are different then what is in NSpeex.PcmWaveWriter class.
So, I agree with this part:
raf.Write(WAVE_FORMAT_SPEEX); // Format tag: Speex
raf.Write((short)channels); // Number of channels
raf.Write(sampleRate); // Sampling frequency
raf.Write((CalculateEffectiveBitrate(mode, channels, quality) + 7) >> 3); // Average bytes per second
raf.Write((short)CalculateBlockSize(mode, channels, quality)); // Blocksize of data
raf.Write((short)quality); // Bits per sample
But, not with the rest what is in the code of NSpeex.PcmWaveWriter class.
In Hex editor I see (after above mentioned part) this in .wav file created by “Speex Voice ACM Codec 1.0.1.1”:
//byte[] speexSpecific ={
// 0x00, 0x01, 0x02, 0x00,0x0a, 0x00,
// 0x00, 0x00, 0xf4, 0x01,
// 0x03, 0x00, 0x00, 0x00};
But I do not know what is that and how to create .wav header to be compatible with “Speex Voice ACM Codec 1.0.1.1”. Again, I can decode their .wav files, and create my .wav files that I can decode, but that codec seems to not recognize my .wav header.
Speex is supposed to be “Open source”, can someone reveal the secret bytes in .wav (speex) header?