Spaces:
Running
on
Zero
Running
on
Zero
khang119966
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -241,7 +241,7 @@ function forceLightTheme() {
|
|
241 |
"""
|
242 |
from transformers import pipeline
|
243 |
|
244 |
-
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo")
|
245 |
|
246 |
def transcribe_speech(filepath):
|
247 |
output = pipe(
|
@@ -252,7 +252,6 @@ def transcribe_speech(filepath):
|
|
252 |
},
|
253 |
chunk_length_s=30,
|
254 |
batch_size=1,
|
255 |
-
device=0,
|
256 |
)
|
257 |
return output["text"]
|
258 |
|
|
|
241 |
"""
|
242 |
from transformers import pipeline
|
243 |
|
244 |
+
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo", torch_dtype=torch.float16, device="cuda:0")
|
245 |
|
246 |
def transcribe_speech(filepath):
|
247 |
output = pipe(
|
|
|
252 |
},
|
253 |
chunk_length_s=30,
|
254 |
batch_size=1,
|
|
|
255 |
)
|
256 |
return output["text"]
|
257 |
|