MingLi commited on
Commit
6c97f40
1 Parent(s): 1efcf52
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -72,7 +72,8 @@ def handel_files(f_ls):
72
  file_output = file.replace(".mp3", ".wav")
73
  ffmpeg_convert(file, file_output)
74
  elif file.endswith(".wav"):
75
- file_output = file
 
76
  ffmpeg_convert(file, file_output)
77
 
78
  if file_output:
@@ -89,7 +90,7 @@ def handel_files(f_ls):
89
 
90
  def whisper_handler(file):
91
  file_name = os.path.basename(file)
92
- gr.Info(f"处理文件 - {file_name}")
93
  return pipe(file)["text"]
94
 
95
 
 
72
  file_output = file.replace(".mp3", ".wav")
73
  ffmpeg_convert(file, file_output)
74
  elif file.endswith(".wav"):
75
+ # check wav file is valid or not
76
+ file_output = file+".wav"
77
  ffmpeg_convert(file, file_output)
78
 
79
  if file_output:
 
90
 
91
  def whisper_handler(file):
92
  file_name = os.path.basename(file)
93
+ gr.Info(f"处理文件 - {file_name.split('.')[0]}")
94
  return pipe(file)["text"]
95
 
96