Spaces:
Running
on
Zero
Running
on
Zero
liuyang
commited on
Commit
·
37d6160
1
Parent(s):
c01ddba
sdpa
Browse files
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": "
|
39 |
-
return_timestamps=
|
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=
|
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,
|