Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,7 @@ def recognize_emotion(audio):
|
|
30 |
# Determine if input is a file path or file-like object
|
31 |
audio_path = audio if isinstance(audio, str) else audio.name
|
32 |
print(f'Received audio file:', audio_path)
|
|
|
33 |
|
34 |
# Load and resample audio to 16kHz if necessary
|
35 |
speech_array, sampling_rate = torchaudio.load(audio_path)
|
|
|
30 |
# Determine if input is a file path or file-like object
|
31 |
audio_path = audio if isinstance(audio, str) else audio.name
|
32 |
print(f'Received audio file:', audio_path)
|
33 |
+
|
34 |
|
35 |
# Load and resample audio to 16kHz if necessary
|
36 |
speech_array, sampling_rate = torchaudio.load(audio_path)
|