| |
2.2.3 File Conversion:
Verification of Conversion to Raw
There are several ways to verify that your conversion has proceeded
correctly, including listening to the audio data. Three procedures are
outlined below.
SoX: Audio Playback
In order to listen to the file,
SoX
must be installed on your system.
To listen to the file speech.raw, convert the file from
raw
format to .au format using
SoX.
Go to the directory:
$ISIP_TUTORIAL/sections/s02/s02_02_p03/
Use the following syntax:
sox -t .sw -r 16000 speech.raw -t .au speech.au
The command line entries for SoX are explained in
Section 2.3.3.
Once conversion has been completed, listen to the file on a computer
running the Sun Solaris operating system using the command:
Other software tools are available for display and audio playback,
including
display signal
and
CoolEdit.
File Size Comparison: Using "ls -l"
The NIST SPHERE header is typically 1024 bytes. Hence, we can use standard
Unix commands to check if the output file is the correct size.
Use the command:
The command will result in this output:
-rw-rw-r-- 1 may isip 97486 Sep 10 15:19 speech.raw
-rw-rw-r-- 1 may isip 98510 Sep 10 15:12 speech.sph
The fifth field contains the file size in bytes. We can see that
speech.raw is exactly 1024 bytes smaller than speech.sph.
Octel Dump (od): Listing Values
From time to time it will be necessary to list the values of a file.
A useful command for this is "od". Since speech.raw consists
of two-byte signed integers, we can use the od command to list the
numeric values of the samples:
This results in the following display:
0000000 4 3 4 3 4 3 3 3
0000020 -1 6 3 4 5 1 3 4
0000040 3 2 5 5 5 5 5 3
0000060 5 4 3 6 2 6 3 4
0000100 4 2 4 3 3 4 4 0
0000120 6 3 4 3 2 4 1 3
0000140 2 5 5 5 4 3 6 3
0000160 1 5 5 5 5 5 5 5
0000200 5 5 5 3 4 4 3 3
0000220 6 3 3 5 2 5 5 3
...
Sample values are displayed as signed decimals using a format of 8 samples
per row. The first column indicates the index of the starting byte
in the file for the data from that row (in an octal format).
|
| |
|