Extract data from x for time range lo to hi in milliseconds.
Reads an audio waveform from a file given by the string FILENAME.
Plot the waveform data, displaying time on the X axis.
Record for the specified time at the given sample rate.
Writes an audio file with the appropriate header.
Clip values outside the range to the value at the boundary of the range.
Play the signal through the speakers.
Scale the signal so that [min(x), max(x)] -> [-1, 1], then play it through the speakers at 8000 Hz sampling rate.