Spaces:
Build error
Build error
batch_size updated to 8
Browse files
app.py
CHANGED
|
@@ -39,8 +39,7 @@ def asr_transcriber(audio_file):
|
|
| 39 |
"automatic-speech-recognition",
|
| 40 |
model=model_id,
|
| 41 |
torch_dtype=torch_dtype,
|
| 42 |
-
device=device_id
|
| 43 |
-
device_map="auto"
|
| 44 |
)
|
| 45 |
|
| 46 |
if device_id == "mps":
|
|
@@ -54,7 +53,7 @@ def asr_transcriber(audio_file):
|
|
| 54 |
json_output = pipe(
|
| 55 |
audio_file_wav,
|
| 56 |
chunk_length_s=30,
|
| 57 |
-
batch_size=
|
| 58 |
generate_kwargs={"task": task, "language": language},
|
| 59 |
return_timestamps=ts
|
| 60 |
)
|
|
|
|
| 39 |
"automatic-speech-recognition",
|
| 40 |
model=model_id,
|
| 41 |
torch_dtype=torch_dtype,
|
| 42 |
+
device=device_id
|
|
|
|
| 43 |
)
|
| 44 |
|
| 45 |
if device_id == "mps":
|
|
|
|
| 53 |
json_output = pipe(
|
| 54 |
audio_file_wav,
|
| 55 |
chunk_length_s=30,
|
| 56 |
+
batch_size=8,
|
| 57 |
generate_kwargs={"task": task, "language": language},
|
| 58 |
return_timestamps=ts
|
| 59 |
)
|