Skip to contentSkip to conversation

Microsoft RIFF, WAVE audio data, 1 bit, mono 8000 Hz

DISCUSSION James H. Cloos Jr. 2 participants 4 messages Jul 8, 1999 Sound

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a (free) voice mail service that provides the messages in a wav file which file(1) specifies as:

Microsoft RIFF, WAVE audio data, 1 bit, mono 8000 Hz

sox(1) doesn't recognise this file. (I currently have sox-12.15-5.i386.rpm installed, compiled on my box from the RH60 SRPM.)

Based on sox(1)'s wav.c, the fmt chunk size is 0x32, wFormatTag is 0x0022, wChannels is 1, samples per second is 8000, AvgBytesPerSec is 1067, wBlockAlign is 32, wBitsPerSample is 1 leaving 34 more octets of header info. They are (as chars):

        0x20,0x00,0x01,0x00,
        0xf0,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,
        0x00,0x00,0x20,0x00,
        0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,
        0x00,0x00

So, does anyone have any tips on listening to this?

(And, yes, I have sent a note to the vendor about this; this note is going out at the same time.)

- -JimC
- --
James H. Cloos, Jr. <http://www.jhcloos.com/cloos/public_key> 1024D/ED7DAEA6
<[email protected]> E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.7 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3hEHCmXqfF+19rqYRAjzzAKC1L0DwupHBnr4M+12ihhc12eQ/CwCgwJ/l zxE0KxVUn/CveWNOI8S/bXU=oKqX
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 2 lines

I have a (free) voice mail service that provides the messages in a wav file which file(1) specifies as:

Dial it up and send it a steady tone square wave at about 1KHz. If my guess to the format is right then you will get back something vaguely like

	FF,00,FF,00,FF,00,FF,00

THen you can figure the bitendianness they use. Basically its exactly what it sounds like - single bit above/below threshold values.

So you'd do

	while(len)
	{
		uchar i=*data++;
		int ct;
		for(ct=0;ct<8;ct++)
		{
			if(i&0x80)
				play8bit(0xFF);
			else
				play8bit(0x00);
			i<<=1;
		}
		len--;
	}
#2 lore raw
In reply to James H. Cloos Jr.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" = Eric Mitchell <[email protected]> replied:

Eric> There's a field in the wav header for any applied compression Eric> algorithm. (www.wotsit.com has decent file format docs). Eric> What's that set to? I don't know offhand of any linux .wav Eric> players that deal correctly with compressed data.

Ah. That helped. From that file, the 0x0022 wFormatTag is WAVE_FORMAT_DSPGROUP_TRUESPEECH. Also, the 0x20,0x00 is the size of the remaining raw header data I listed -- data that is specific to the TRUESPEECH format. The 0x01,0x00 is the revision and the 0xf0,0x00 is the number of samples per block.

The rest of the info, esp including the format of the data and all details of the compression are, according to that document, not available.

Bummer.

Thanks for the pointer. I'd managed to forget about wotsit. *How* I don't know. But I had. :(

- -JimC
- --
James H. Cloos, Jr. <http://www.jhcloos.com/cloos/public_key> 1024D/ED7DAEA6
<[email protected]> E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.7 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3hMEhmXqfF+19rqYRArOrAJ9/pstOEPVLKPO1dE9t97jvY8aUuACfZtV6 EPoOAw6cgePRU4wzOLXAyuI=bxZ6
-----END PGP SIGNATURE-----

#3 lore raw
In reply to James H. Cloos Jr.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" = Eric Mitchell <[email protected]> replied:

Eric> There's a field in the wav header for any applied compression Eric> algorithm. (www.wotsit.com has decent file format docs). Eric> What's that set to? I don't know offhand of any linux .wav Eric> players that deal correctly with compressed data.

Ah. That helped. From that file, the 0x0022 wFormatTag is WAVE_FORMAT_DSPGROUP_TRUESPEECH. Also, the 0x20,0x00 is the size of the remaining raw header data I listed -- data that is specific to the TRUESPEECH format. The 0x01,0x00 is the revision and the 0xf0,0x00 is the number of samples per block.

The rest of the info, esp including the format of the data and all details of the compression are, according to that document, not available.

Bummer.

Thanks for the pointer. I'd managed to forget about wotsit. *How* I don't know. But I had. :(

- -JimC
- --
James H. Cloos, Jr. <http://www.jhcloos.com/cloos/public_key> 1024D/ED7DAEA6
<[email protected]> E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.7 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3hMEhmXqfF+19rqYRArOrAJ9/pstOEPVLKPO1dE9t97jvY8aUuACfZtV6 EPoOAw6cgePRU4wzOLXAyuI=bxZ6
-----END PGP SIGNATURE-----

Signature · 2 lines
         To unsubscribe: mail [email protected] with 
                       "unsubscribe" as the Subject.