What Are The Semantics Of Wav-File Sample Values? The title is the question.  To make this concrete, assume I have a standard 16-bit single channel wav file, with (although it doesn't matter) a 16000 Hz sampling rate.

Each sample magnitude will be a 16-bit value. 

Is there a specified semantics or interpretation of these values, not relative to any physical value, but relative to the numerical systems of modern computers?  I.e., are those numbers to be interpreted as 16-bit twos-complement, or scaled into single precision floats between -1 and 1, etc?

At the highest level, I recognize this is a little pointless:  They're arbitrary scale.  

But at a practical level, in the python world, librosa does one thing, scipy does another, and converting those different things into a spectrogram or analyzing with a vocoder can yield different results. 

For skeptics, invite you to try the following:

import scipy
import librosa.display

np_eps        = np.finfo('f').eps
np_max        = np.finfo('f').max

x, sr = librosa.load(file, sr=16000)

plt.subplot(2, 2, 1)
D = librosa.amplitude_to_db(np.abs(librosa.stft(x)), ref=1.0)
librosa.display.specshow(D, y_axis='linear')
plt.colorbar(format='%+2.0f dB')

plt.subplot(2, 2, 2)
plt.plot(x)

sr, y = scipy.io.wavfile.read(file)
y = y.astype(float32)
plt.subplot(2, 2, 3)
D = librosa.amplitude_to_db(np.abs(librosa.stft(y)), ref=1.0)
librosa.display.specshow(D, y_axis='linear')
plt.colorbar(format='%+2.0f dB')

plt.subplot(2, 2, 4)
plt.plot(y)


Do not neglect the extra argument to librosa, forcing the sampling rate; in my case, the file I am using is from the Arctic corpus and is sampled at 16 KHz.  Do not neglect the colorbars, which will show you the very obvious shift of 90 dB from one to the other.  This should not be surprising, since 20 * log10 (32768) is approximately 90.3.

I assure you, gentle readers, this will have consequences further down the pipeline of speech vocoders, or neural networks (where normalization techniques might want you to reference to numpy epsilon to avoid negative numbers) or both.
I don't know much about this semantics? of WAV files but their numerical format is the following. (assuming mono) 


Given a recording with 8-bit per sample precision, then those samples are unsigned integers taking values between $0$ and $255$. Due to being unsigned, to represent negative values,  there is a bias of $128$, and the sample values are actually interpreted to be between $-128$ and $127$. In this case a value of $128$ represents silence, maximum value $255$ corresponds to an input full scale positive audio waveform and $0$ represents neagitve full scale input waveform.
For $16$-bit WAV files, you have $16$-bit signed integers that range from $-32768$ to $32767$ and $0$ represents silence. Again, $32767$ represents full scale audio input without scaling.


Note that here I refer to a microphone recording through an ADC system which converts analog audio input in the standard range of about $1$ V rms into WAV samples. Please check this 1-V rms for being something higher, about 1.5 Volts or else depending on particular implementation or some specific audio standard. In any case, the analog circuitry is responsible for transmitting a full scale audio to the ADC whan a 1V (or 1.5V) rms wave is present at the input and then the conversion is performed according to the above setting when WAV recording is performed.