Nithin Rao Koluguri
commited on
Commit
·
0e3aa4b
1
Parent(s):
9d5c27d
add support for longform
Browse filesSigned-off-by: Nithin Rao Koluguri <nithinraok>
app.py
CHANGED
|
@@ -146,9 +146,9 @@ def get_transcripts_and_raw_times(audio_path, session_dir):
|
|
| 146 |
gr.Info(f"Transcribing {info_path_name} on {device}...", duration=2)
|
| 147 |
|
| 148 |
# Check duration and apply specific settings for long audio
|
| 149 |
-
if duration_sec >
|
| 150 |
try:
|
| 151 |
-
gr.Info("Audio longer than
|
| 152 |
print("Applying long audio settings: Local Attention and Chunking.")
|
| 153 |
model.change_attention_model("rel_pos_local_attn", [256,256])
|
| 154 |
model.change_subsampling_conv_chunking_factor(1) # 1 = auto select
|
|
|
|
| 146 |
gr.Info(f"Transcribing {info_path_name} on {device}...", duration=2)
|
| 147 |
|
| 148 |
# Check duration and apply specific settings for long audio
|
| 149 |
+
if duration_sec > 480 : # 8 minutes
|
| 150 |
try:
|
| 151 |
+
gr.Info("Audio longer than 8 minutes. Applying optimized settings for long transcription.", duration=3)
|
| 152 |
print("Applying long audio settings: Local Attention and Chunking.")
|
| 153 |
model.change_attention_model("rel_pos_local_attn", [256,256])
|
| 154 |
model.change_subsampling_conv_chunking_factor(1) # 1 = auto select
|