cptsubtext commited on
Commit
8d95190
·
1 Parent(s): b830c30

print out a info for lenght

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -19,6 +19,7 @@ api_token = st.text_input("API Token (Unlimited)")
19
  model_size = st.selectbox("Model Size", ("tiny", "base", "small", "medium"))
20
 
21
  def transcribe_to_subtitle(audio_bytes, model_name):
 
22
  """Transcribe audio to subtitle using OpenAI Whisper"""
23
  # Load model based on selection
24
  model = load_model(model_name)
@@ -27,7 +28,6 @@ def transcribe_to_subtitle(audio_bytes, model_name):
27
  # Check file size for free tier
28
  if use_free_tier and len(audio_bytes) > 2 * 60 * 1024:
29
  st.error("Free tier only supports audio files under 2 minutes")
30
- st.error(ffmpeg.probe('in.mp4')['format']['duration'])
31
  return
32
 
33
  # Transcribe audio
 
19
  model_size = st.selectbox("Model Size", ("tiny", "base", "small", "medium"))
20
 
21
  def transcribe_to_subtitle(audio_bytes, model_name):
22
+ st.error(ffmpeg.probe('audio_bytes')['format']['duration'])
23
  """Transcribe audio to subtitle using OpenAI Whisper"""
24
  # Load model based on selection
25
  model = load_model(model_name)
 
28
  # Check file size for free tier
29
  if use_free_tier and len(audio_bytes) > 2 * 60 * 1024:
30
  st.error("Free tier only supports audio files under 2 minutes")
 
31
  return
32
 
33
  # Transcribe audio