Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,10 +57,10 @@ def stream_transcribe(stream, new_chunk):
|
|
| 57 |
|
| 58 |
end_time = time.time()
|
| 59 |
latency = end_time - start_time
|
| 60 |
-
return stream,
|
| 61 |
except Exception as e:
|
| 62 |
print(f"Error during Transcription: {e}")
|
| 63 |
-
return
|
| 64 |
|
| 65 |
@spaces.GPU
|
| 66 |
def transcribe(inputs, previous_transcription):
|
|
|
|
| 57 |
|
| 58 |
end_time = time.time()
|
| 59 |
latency = end_time - start_time
|
| 60 |
+
return stream, pipe({"sampling_rate": sr, "raw": stream})["text"], f"{latency:.2f}"
|
| 61 |
except Exception as e:
|
| 62 |
print(f"Error during Transcription: {e}")
|
| 63 |
+
return stream, e, "Error"
|
| 64 |
|
| 65 |
@spaces.GPU
|
| 66 |
def transcribe(inputs, previous_transcription):
|