Akai10969 commited on
Commit
d057c07
·
verified ·
1 Parent(s): 14d7501

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -309,7 +309,7 @@ inference_model = InferenceModel('/home/user/app/checkpoints/mt3/', 'mt3')
309
  def inference(url):
310
  print(f"[{current_time()}] 运行:输入地址: {url}")
311
  os.system(f"yt-dlp -x {url} -o 'audio.%(ext)s'")
312
- audio = glob2.glob('audio.*')
313
  with open(audio, 'rb') as fd:
314
  contents = fd.read()
315
  audio = upload_audio(contents,sample_rate=16000)
 
309
  def inference(url):
310
  print(f"[{current_time()}] 运行:输入地址: {url}")
311
  os.system(f"yt-dlp -x {url} -o 'audio.%(ext)s'")
312
+ audio = glob2.glob('audio.*')[0]
313
  with open(audio, 'rb') as fd:
314
  contents = fd.read()
315
  audio = upload_audio(contents,sample_rate=16000)