Newsgroups: comp.speech
Path: pavo.csi.cam.ac.uk!doc.ic.ac.uk!warwick!pipex!uunet!nctuccca.edu.tw!cccanews!news!comserv.itri.org.tw!k400wolf.ccl.itri.org.tw!cckuo
From: cckuo@k400wolf.ccl.itri.org.tw (Chih-Chung Kuo)
Subject: Re: wav file format
Message-ID: <cckuo.1.0@k400wolf.ccl.itri.org.tw>
Lines: 33
Sender: usenet@comserv.itri.org.tw
Organization: Computer & Communication Research	Institute
References: <2ju2n4$ra8@otisun07.oti-hsv.com>
Date: Fri, 18 Feb 1994 09:18:31 GMT

In article <2ju2n4$ra8@otisun07.oti-hsv.com> dcm@oti-hsv.com (David C. Matthews) writes:
>From: dcm@oti-hsv.com (David C. Matthews)
>Subject: wav file format
>Date: 16 Feb 1994 21:20:36 GMT
>What is the format of *wav* files?  This implies speech files
>that end in ".wav".
>
>Thank you in advance for any leads.
>
>-dcm
>--
>dcm (dcm@oti-hsv.com)
 bytes    contents
-------  ------------------------------------------------
  4       "RIFF"
  4       size of the following data
  4       "WAVE"
  4       "fmt "
  4       size of the format data (16 in genreal)
  2       wFormatTag ( 1 for PCM )
  2       nChannels ( 1 for Mono and 2 for stereo )
  4       nSamplesPerSec ( 44100 or 22050 or 11025 )
  4       nAvgBytesPerSec ( = nBlockAlign * nSamplesPerSec )
  2       nBlockAlign ( = wBitsPerSample / 8 * nChannels )
  2       wBitsPerSample ( 16 or 8 )
  4       "data"
  4       size of the following data
  x       speech data

  For 16 bit data, the format is short int in C.
  For 8 bit data, 0 - 128 represent -128 - 0; 129 - 255 represents 0 - 127.
  For stereo data the order is left channel data first then right channel 
data, interleving in turn.
