Answers for "python audio length"

0

how to get the duration of audio python

import wave
import contextlib
fname = '/tmp/test.wav'
with contextlib.closing(wave.open(fname,'r')) as f:
    frames = f.getnframes()
    rate = f.getframerate()
    duration = frames / float(rate)
    print(duration)
Posted by: Guest on July-16-2020
0

python audio length

pip install audioread
Posted by: Guest on May-14-2021

Browse Popular Code Answers by Language