Would have written this as a comment, but I don't have enough reputation yet)
The default encoding for WAV files is called "16 bit PCM", which means the recorded sound is represented using 16-bit int data before it is written to your WAV file.
tf.audio.decode_wav() states in the documentation: "Decode a 16-bit PCM WAV file to a float tensor". Thus passing a WAV file using any other encoding (24-bit encoding, in your case) would result in an error like the one you received.