Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ MODELS = {
|
|
35 |
|
36 |
def convert_audio_to_wav(audio_path):
|
37 |
if os.path.isdir(audio_path):
|
38 |
-
raise ValueError(f"The path provided is a directory: {audio_path}")
|
39 |
wav_path = "converted_audio.wav"
|
40 |
command = ["ffmpeg", "-i", audio_path, "-ac", "1", "-ar", "16000", wav_path]
|
41 |
subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
|
35 |
|
36 |
def convert_audio_to_wav(audio_path):
|
37 |
if os.path.isdir(audio_path):
|
38 |
+
raise ValueError(f"The path provided is a directory, not a file: {audio_path}")
|
39 |
wav_path = "converted_audio.wav"
|
40 |
command = ["ffmpeg", "-i", audio_path, "-ac", "1", "-ar", "16000", wav_path]
|
41 |
subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|