Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,12 @@ device = 0 if torch.cuda.is_available() else "cpu"
|
|
17 |
pipe = pipeline(
|
18 |
task="automatic-speech-recognition",
|
19 |
model=MODEL_NAME,
|
20 |
-
chunk_length_s=
|
21 |
device=device,
|
22 |
)
|
23 |
|
24 |
|
|
|
25 |
def transcribe(inputs):
|
26 |
if inputs is None:
|
27 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
|
|
17 |
pipe = pipeline(
|
18 |
task="automatic-speech-recognition",
|
19 |
model=MODEL_NAME,
|
20 |
+
chunk_length_s=15,
|
21 |
device=device,
|
22 |
)
|
23 |
|
24 |
|
25 |
+
|
26 |
def transcribe(inputs):
|
27 |
if inputs is None:
|
28 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|