analysing speech C program help needed (WAV files) 
Author Message
 analysing speech C program help needed (WAV files)

Can anyone out there help me or offer some advice on where I can find out
the following information?
I have a Creative Labs PCI164 Sound Blaster Card on my PC. As a project I
have to write a simple speech recognition device. I need to save speech to
files. In what is the format of it? I have written a program in C to analyse
speech, I now need to actually record the speech, to a WAV file, and
understand the exact format of this file. What I actually require and need
to find out is the byte positions of variables in this file. For example ,
the first 10 bytes may store the sampling rate, next may come other vital
variables and then the actual speech wave measurements that the soundcard
may make.
If anyone has had any experience of using WAV files in C programs and could
tell me how best to do all this I'd be very grateful.
If not then maybe you could point me to another forum that might help me?
These may sound stupid questions but I am new to this field of study and
need someones more expert help.


Mon, 03 Jun 2002 03:00:00 GMT  
 analysing speech C program help needed (WAV files)

Quote:

> understand the exact format of this file. What I actually require and need
> to find out is the byte positions of variables in this file. For example ,
> the first 10 bytes may store the sampling rate, next may come other vital

http://homepages.strath.ac.uk/~cadu02/misc/wavfmt.html

--
              /"\                              m i k e    b u r r e l l

               X        AGAINST HTML MAIL      http://mikpos.dyndns.org
              / \



Mon, 03 Jun 2002 03:00:00 GMT  
 analysing speech C program help needed (WAV files)
Matthew Potter a crit dans le message

Quote:
>files. In what is the format of it? I have written a program in C to
analyse
>speech, I now need to actually record the speech, to a WAV file, and
>understand the exact format of this file. What I actually require and need
>to find out is the byte positions of variables in this file. For example ,
>the first 10 bytes may store the sampling rate, next may come other vital
>variables and then the actual speech wave measurements that the soundcard
>may make.

WAV files are nothing but binary files. Must be fopen()ed in "rb" or "wb"
mode, and fread() or fwrite() from/to char array, according to the WAV file
definition that you will find here.

http://www.wotsit.org/

--
HS
CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
ISO-C Library: http://www.dinkum.com/htm_cl
"It's specified. But anyone who writes code like that should be
transmogrified into earthworms and fed to ducks." -- Chris Dollin CLC



Mon, 03 Jun 2002 03:00:00 GMT  
 analysing speech C program help needed (WAV files)

Quote:

> WAV files are nothing but binary files. Must be fopen()ed in "rb" or "wb"
> mode, and fread() or fwrite() from/to char array, according to the WAV file
> definition that you will find here.

This will not work well on WAV files which use any encoding method
other than PCM integers ie u-law, A-law, ADPCM, GSM 6.10 etc.

An easier alternative is to use libsndfile, a library written for reading
and writing sound files like WAV, AIFF, SND/AU etc. This libarary compiles
and runs on Unix, Win32, MacOS, Beos, OS/2 and probably others.

Have a look at :

    http://www.zip.com.au/~erikd/libsndfile/

Erik
--
+-------------------------------------------------+

+-------------------------------------------------+
"Don't hate the media. Become the media."
- Jello Biafra



Mon, 03 Jun 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Newbie: separate big .cs file into small .cs files

2. resx files needed for cs - files ??

3. Need help with wav files!

4. Starnge signal and 16bits stereo wav file to 16bits mono wav file

5. Converting a 16bits stereo wav file to a 16bits mono wav file

6. WAV recorder and WAV player public source needed.......

7. WAV recorder and WAV player public source needed.........

8. newbe/cs student, need help w/ code

9. Needing advice on Wav programming

10. rapid algorithm needed for analysing numeric data.

11. Student needs source code to play Wav files in Turbo C

12. Does anyone know how to play a .wav file in a c program

 

 
Powered by phpBB® Forum Software