liuyang commited on
Commit
37d6160
·
1 Parent(s): c01ddba
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,8 +35,8 @@ pipe = pipeline(
35
  model="openai/whisper-large-v3-turbo",
36
  torch_dtype=torch.float16,
37
  device="cuda",
38
- model_kwargs={"attn_implementation": "flash_attention_2"},
39
- return_timestamps="word",
40
  )
41
 
42
  class WhisperTranscriber:
@@ -115,7 +115,7 @@ class WhisperTranscriber:
115
  # Transcribe with timestamps
116
  result = self.pipe(
117
  audio_path,
118
- return_timestamps="word",
119
  generate_kwargs=generate_kwargs,
120
  chunk_length_s=30,
121
  batch_size=128,
 
35
  model="openai/whisper-large-v3-turbo",
36
  torch_dtype=torch.float16,
37
  device="cuda",
38
+ model_kwargs={"attn_implementation": "sdpa"},#flash_attention_2
39
+ return_timestamps=True,
40
  )
41
 
42
  class WhisperTranscriber:
 
115
  # Transcribe with timestamps
116
  result = self.pipe(
117
  audio_path,
118
+ return_timestamps=True,
119
  generate_kwargs=generate_kwargs,
120
  chunk_length_s=30,
121
  batch_size=128,