speech-emotion-recognition / src /preprocessing /preprocessing_test.py
Laila16's picture
test and change path
e88666e
Raw
History Blame Contribute Delete
376 Bytes
import librosa
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from config import TRAIN_AUDIO
# just to check the audio information
audio_path = os.path.join(TRAIN_AUDIO, 'dia47_utt11.mp4')
audio, sr = librosa.load(audio_path, sr=None)
print("Sampling rate:", sr)
print("Audio length:", len(audio))
print("Duration (seconds):", len(audio)/sr)