Spaces:
Runtime error
Runtime error
Commit
·
a2e856a
1
Parent(s):
91d2b7f
Update app.py (user changes)
Browse files
app.py
CHANGED
|
@@ -30,7 +30,8 @@ def streaming_recording_fn(stream, new_chunk):
|
|
| 30 |
if stream is not None:
|
| 31 |
if (stream.shape[-1] / TARGET_SAMPLE_RATE) >= AUDIO_SECONDS_THRESHOLD:
|
| 32 |
try:
|
| 33 |
-
prediction =
|
|
|
|
| 34 |
except Exception as e:
|
| 35 |
print(f"process_chunk_from_bytes failed: {e}")
|
| 36 |
prediction = [{"score": 0.0, "label": "error"}]
|
|
|
|
| 30 |
if stream is not None:
|
| 31 |
if (stream.shape[-1] / TARGET_SAMPLE_RATE) >= AUDIO_SECONDS_THRESHOLD:
|
| 32 |
try:
|
| 33 |
+
prediction = "Hola"
|
| 34 |
+
#prediction = process_chunk_from_bytes((stream * 32768).astype(np.int16).tobytes())
|
| 35 |
except Exception as e:
|
| 36 |
print(f"process_chunk_from_bytes failed: {e}")
|
| 37 |
prediction = [{"score": 0.0, "label": "error"}]
|