Python audiotools pcm.read () read only 88200 frames instead of 13397580

I am using the Python Audiotools library to access the raw data of a song. When I convert .flac

to .wv

and then to_pcm()

do a pcm.read()

, it only shows me the first 88200

frames of the song instead of whole frames 13397580

. The framework that he shows is correct. I crossed over with Audacity. Can anyone help me on why this might be happening? I am sampling in 44.1kHz

. So, 88200

frames means that it shows me exactly the first 2

seconds.

Here is my code

import os
from audiotools import *

files = os.listdir('./') 
stream = open(files[3])
wave = stream.convert("sample.wv",WavPackAudio)
pcm_wave = wave.to_pcm()
print len(pcm_wave.read())

for frame in frames:
  print frame,
  print "\t",

      

+3


source to share





All Articles