rename samples/ to test_audio, and move it to tests/

This commit is contained in:
Joel Mathew Thomas
2025-01-11 03:24:05 +05:30
parent 65fefe5ace
commit 5164e2cebd
9 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ from src.input.file_reader import read_audio
from src.preprocessing.resample import resample
def test_normalize_audio():
file_path = "samples/cafe_crowd_talk.aiff"
file_path = "tests/test_audio/cafe_crowd_talk.aiff"
audio, _ = read_audio(file_path)
normalized_audio = normalize_audio(audio)
@@ -16,14 +16,14 @@ def test_normalize_audio():
assert normalized_audio.min() >= -1.0
def test_trim_audio():
file_path = "samples/cafe_crowd_talk.aiff"
file_path = "tests/test_audio/cafe_crowd_talk.aiff"
audio, sr = read_audio(file_path)
trimmed_audio = trim_audio(audio, sr)
assert len(trimmed_audio) <= len(audio)
def test_classify():
file_path = "samples/cafe_crowd_talk.wav"
file_path = "tests/test_audio/cafe_crowd_talk.wav"
expected_class = "Speech"
predicted_class = classify_audio(file_path)