0

All of my audio files that I am using producing an output that does not make sense for me when using wavfile.read() I do not why. For example output of one file is

Example of the output of one of my audio files

why is it not originating from zero like a normal audio for instance :-

example of a normal output

I wanted to ask why my output in the first link is not read normally and how to display it normally so I can analysis the audio properly. I have been searching for a couple of days and could solve it so I would appreciate it if someone can guide me or provide me with useful links

  • Does the waveform look normal when opened via Audacity or something? – Random Davis Apr 05 '21 at 22:05
  • Yea using Audacity not when using wavfile.read() – Mahmoud M Hassan Apr 05 '21 at 22:41
  • You should specify what format the audio files are in - sample rate, bit depth, stereo/mono, signed or unsigned, file type, and anything else relevant. This seems like an issue where the audio is being read in an incorrect format. – Random Davis Apr 05 '21 at 22:58
  • The format is WAV File (.wav), the sample rate is 16 kHz, Stereo. I tried to get the bit depth and whether its signed but could not see how to get it using wavfile. – Mahmoud M Hassan Apr 06 '21 at 08:08

1 Answers1

0

It seems that it depends on the library that is reading the audio file which can produce different outputs, I shifted to read my audio files by:-

import soundfile as sf
data, samplerate = sf.read(audioFile)

and now the output representation is originating from zero.