Scilab Function

wavread - load .wav sound file

### Sequence d'appel

  `y=wavread(wavfile)`
  `y=wavread(wavfile,ext)`
  `[y,Fs,bits]=wavread(wavfile)`
  `[y,Fs,bits]=wavread(wavfile,ext)`

### Parametres

- `wavfile` : string (The .wav extension is appended if no extension is given)
- `Fs` : integer, frequency sampling in Hz.
- `ext` : string (`'size'`) or integer (to read n samples) or 1 x 2 integer vector [n1,n2] (to read from n1 to n2).

### Description

Utility function to read `.wav` sound file. `wavread(wavfile)` loads a sound file specified by the string wavfile, returning the sampled data in y. Amplitude values are in the range [-1,+1]. Supports multi-channel data in the following formats: 8-bit mu-law, 8-, 16-, and 32-bit linear, and floating point.

`[y,Fs,bits]=wavread(wavfile)` returns the sample rate (Fs) in Hertz and the number of bits per sample used to encode the data in the file.

`wavread(wavfile,n)` returns the first n samples from each channel.

`wavread(wavfile,[n1,n2])` returns samples n1 to n2.

`read(wavfile,'size')` returns the size of the audio data contained in the file in place of the actual audio data, returning the vector as [samples channels].

### Voir aussi

`auread` `savewave` `analyze` `mapsound`