2

I'm new to audio signals. What is the value 32768 that we use here?

Sample code:

rate, data = wavfile.read(wav_loc)
data = data / 32768
Heikki
  • 2,214
  • 19
  • 34

2 Answers2

5

Assuming that the wav-file is 16 bit integer, the range is [-32768, 32767], thus dividing by 32768 (2^15) will give the proper twos-complement range of [-1, 1]

Vaibhav Jadhav
  • 2,020
  • 1
  • 7
  • 20
1

Another answer is that -32767 to +32767 is proper audio (to be symmetrical) and 32768 means that the audio clipped at that point

martinwguy
  • 948
  • 6
  • 14