Type of format = 03, not 01

OS: Windows 10
Audacity version: 2.1.2

Is there a detailed explanation as to how Audacity outputs wave files?

I exported an audio file as:

WAV (Mocrosoft) 32-bit float PCM

When I tried to get the duration of a wave file file using librosa.get_duration(‘C:/Users/jbiss/Music/Audio/file-name_’+ str(i) +‘.wav’) I get the following error message:

ParameterError: Audio data must be floating-point

The numpy array is shown as:

np is: [[-0.01107788 -0.00732422 0.00448608 … 0.00283813 0.00213623 0.00479126] [-0.0105896 -0.00891113 -0.00823975 … 0.00268555 0.00149536 0.00488281]]

This looks like 32-bit floating point to me. When I look at the wave file header in a hex editor I see the following:

52 49 46 46 32 90 02 00 57 41 56 45 66 6D 74 20 12 00 00 00 03 00 01 00 44 AC 00 00 20 62 05 00 08 00 40 00 00 00 66 61 63 74 04 00

According to Wav (RIFF) File Format Tutorial, this is a RIFF, WAVE file, but the type of format value 03 at 21-22 is telling me that it is a compressed wave file, otherwise its value would be 01. At locations 37-40 I see that the chunk is “fact”, which according to Multimedia Programming Interface and Data Specifications 1.0 is:

The “ fact” chunk is required if the waveform data is contained in a “wavl” LIST chunk and for all compressed audio formats. The chunk is not required for PCM files using the “ data” chunk format.

When I save the same wave file as an “Other uncompressed files” I see the same header for the aiff file. I need to understand what Audacity is doing with the audio files to develop AI in Python to avoid such errors as that shown in the beginning of this post.

Sincerely, Jeff

That’s a very old version. The current version is 2.4.2, and Audacity 3.0.0 is scheduled for release on Wednesday (17th March).
The current version of Audacity is available via the Audacity website: Audacity ® | Download for Windows


When I export a 32-bit float WAV file, the type of format value is 01.