jacky3102 commited on
Commit
241bdfc
·
verified ·
1 Parent(s): 8b77676

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -119,7 +119,9 @@ async def generate_subtitle(
119
  print(f"[Transcribe] 格式: {output_format} | 语言: {language or '自动检测'} | max_chars: {max_chars or '不拆分'}", flush=True)
120
 
121
  try:
122
- transcribe_options = {"word_timestamps": True, "verbose": True}
 
 
123
  if language:
124
  transcribe_options["language"] = language
125
 
 
119
  print(f"[Transcribe] 格式: {output_format} | 语言: {language or '自动检测'} | max_chars: {max_chars or '不拆分'}", flush=True)
120
 
121
  try:
122
+ transcribe_options = {"verbose": True}
123
+ if max_chars > 0:
124
+ transcribe_options["word_timestamps"] = True
125
  if language:
126
  transcribe_options["language"] = language
127