ayymen commited on
Commit
7c0c939
·
verified ·
1 Parent(s): 753ff9c

Remove 4 minute limit

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -116,11 +116,6 @@ def align(Microphone, File_Upload, text, col1, col2, col3, split_on_newline, pro
116
  # check audio is not too long
117
  audio_data, duration = get_audio_data_and_duration(file)
118
 
119
- if duration > 4 * 60:
120
- raise gr.Error(
121
- f"Detected that uploaded audio has duration {duration/60:.1f} mins - please only upload audio of less than 4 mins duration"
122
- )
123
-
124
  # loading model
125
  progress(0.1, desc="Loading speech recognition model")
126
  model_name = "ayymen/stt_zgh_fastconformer_ctc_small"
@@ -269,8 +264,8 @@ with gr.Blocks(title="NeMo Forced Aligner", theme="huggingface") as demo:
269
 
270
  with gr.Column(scale=1):
271
  gr.Markdown("## Input")
272
- mic_in = gr.Audio(sources=["microphone"], type='filepath', label="Microphone input (max 4 mins)")
273
- audio_file_in = gr.Audio(sources=["upload"], type='filepath', label="File upload (max 4 mins)")
274
  ref_text = gr.Textbox(
275
  label="[Optional] The reference text. Use '|' separators to specify which text will appear together. "
276
  "Leave this field blank to use an ASR model's transcription as the reference text instead."
 
116
  # check audio is not too long
117
  audio_data, duration = get_audio_data_and_duration(file)
118
 
 
 
 
 
 
119
  # loading model
120
  progress(0.1, desc="Loading speech recognition model")
121
  model_name = "ayymen/stt_zgh_fastconformer_ctc_small"
 
264
 
265
  with gr.Column(scale=1):
266
  gr.Markdown("## Input")
267
+ mic_in = gr.Audio(sources=["microphone"], type='filepath', label="Microphone input")
268
+ audio_file_in = gr.Audio(sources=["upload"], type='filepath', label="File upload")
269
  ref_text = gr.Textbox(
270
  label="[Optional] The reference text. Use '|' separators to specify which text will appear together. "
271
  "Leave this field blank to use an ASR model's transcription as the reference text instead."