Recall & Review
beginner
What Python library and function do you use to read WAV audio files?
You use the
scipy.io.wavfile.read function from the scipy library to read WAV audio files.Click to reveal answer
beginner
What two pieces of information does
scipy.io.wavfile.read return when reading a WAV file?It returns the sample rate (number of samples per second) and the audio data as a NumPy array.
Click to reveal answer
beginner
How do you write audio data back to a WAV file using scipy?
Use
scipy.io.wavfile.write(filename, rate, data) where filename is the output file name, rate is the sample rate, and data is the audio data array.Click to reveal answer
intermediate
What data type is the audio data returned by
scipy.io.wavfile.read?The audio data is a NumPy array, usually with integer types like
int16 for 16-bit audio.Click to reveal answer
beginner
Why is the sample rate important when working with WAV files?
The sample rate tells you how many audio samples are recorded per second. It affects the playback speed and quality of the audio.
Click to reveal answer
Which function reads a WAV file in scipy?
✗ Incorrect
The correct function to read WAV files in scipy is
scipy.io.wavfile.read.What does the sample rate represent in a WAV file?
✗ Incorrect
Sample rate is the number of audio samples recorded per second.
What data type is typically used for 16-bit WAV audio data in scipy?
✗ Incorrect
16-bit audio data is usually stored as
int16 integers.Which function writes audio data to a WAV file in scipy?
✗ Incorrect
Use
scipy.io.wavfile.write to save audio data to a WAV file.If you want to play back a WAV file correctly, which information is essential?
✗ Incorrect
The sample rate is essential to play back the audio at the correct speed and pitch.
Explain how to read a WAV file using scipy and what information you get from it.
Think about the two outputs from the read function.
You got /4 concepts.
Describe the steps to save audio data back to a WAV file using scipy.
Remember the order of arguments in the write function.
You got /4 concepts.