Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,10 +12,10 @@ def transcribe(stream, new_chunk):
|
|
| 12 |
y = y.astype(np.float32)
|
| 13 |
y /= np.max(np.abs(y))
|
| 14 |
|
| 15 |
-
if stream is not None:
|
| 16 |
-
|
| 17 |
-
else:
|
| 18 |
-
|
| 19 |
return stream, transcriber({"sampling_rate": sr, "raw": stream})["text"]
|
| 20 |
|
| 21 |
|
|
|
|
| 12 |
y = y.astype(np.float32)
|
| 13 |
y /= np.max(np.abs(y))
|
| 14 |
|
| 15 |
+
# if stream is not None:
|
| 16 |
+
# stream = np.concatenate([stream, y])
|
| 17 |
+
# else:
|
| 18 |
+
stream = y
|
| 19 |
return stream, transcriber({"sampling_rate": sr, "raw": stream})["text"]
|
| 20 |
|
| 21 |
|