rename samples/ to test_audio, and move it to tests/
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user