fix bug: return original sample rate

This commit is contained in:
Joel Mathew Thomas
2025-02-26 13:56:59 +05:30
parent 7672817ff3
commit b0939cb5b8
+2 -1
View File
@@ -13,12 +13,13 @@ def save_and_classify(file_path, file_content):
destination.write(file_content) destination.write(file_content)
# Read the saved audio file # Read the saved audio file
_, org_sr = read_audio(file_path) # Get original sampling rate
waveform, sr = read_audio(file_path, 16000, mono=True) waveform, sr = read_audio(file_path, 16000, mono=True)
# Classify the audio # Classify the audio
audio_class = classify_audio(waveform, sr) audio_class = classify_audio(waveform, sr)
return audio_class, sr return audio_class, org_sr
@shared_task @shared_task
def normalize_audio_task(file_path): def normalize_audio_task(file_path):