cptsubtext commited on
Commit
54450a0
·
1 Parent(s): cd08b5d

add title and exandable readme

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -10,6 +10,11 @@ import os
10
  # Variables
11
  #valid_api_token = st.secrets["API_TOKEN"]
12
 
 
 
 
 
 
13
  # Upload audio file
14
  uploaded_file = st.file_uploader("Upload Audio File", type=["mp3", "wav", "mov"])
15
 
@@ -26,7 +31,8 @@ def transcribe_to_subtitle(audio_bytes, model_name):
26
  model = load_model(model_name)
27
  #speedmodel = load_hf_whisper(model_name)
28
 
29
- # Check file size for free tier
 
30
  #if use_free_tier and len(audio_bytes) > 0.048 * 2 * 60 * 1024:
31
  # st.error(len(audio_bytes))
32
  # st.error("Free tier only supports audio files under 2 minutes")
 
10
  # Variables
11
  #valid_api_token = st.secrets["API_TOKEN"]
12
 
13
+ st.title("Speech-to-Text")
14
+
15
+ with st.expander("README"):
16
+ st.write("This little tool accepts and audiofile. After choosing the model a WebVTT file will be generated. The content of the WebVTT will be shown and a user can choose to download it. This can be used as Subtitle file e.g. in Davinci Resolve Import Subtitles" )
17
+
18
  # Upload audio file
19
  uploaded_file = st.file_uploader("Upload Audio File", type=["mp3", "wav", "mov"])
20
 
 
31
  model = load_model(model_name)
32
  #speedmodel = load_hf_whisper(model_name)
33
 
34
+ # Check how long the audio is free tier
35
+ newAudio = AudioSegment.from_wav("audiofiles/download.wav")
36
  #if use_free_tier and len(audio_bytes) > 0.048 * 2 * 60 * 1024:
37
  # st.error(len(audio_bytes))
38
  # st.error("Free tier only supports audio files under 2 minutes")