Spaces:
Runtime error
Runtime error
liuyang
commited on
Commit
·
5b655f4
1
Parent(s):
3c30a0a
Add error handling in embedding calculation within WhisperTranscriber. Log exceptions and diarization segments for better debugging.
Browse files
app.py
CHANGED
|
@@ -450,7 +450,9 @@ class WhisperTranscriber:
|
|
| 450 |
# fallback to first embedding
|
| 451 |
speaker_embeddings[spk] = embs[0].cpu().tolist()
|
| 452 |
print(speaker_embeddings[spk])
|
| 453 |
-
except Exception:
|
|
|
|
|
|
|
| 454 |
pass
|
| 455 |
|
| 456 |
diarization_time = time.time() - start_time
|
|
|
|
| 450 |
# fallback to first embedding
|
| 451 |
speaker_embeddings[spk] = embs[0].cpu().tolist()
|
| 452 |
print(speaker_embeddings[spk])
|
| 453 |
+
except Exception as e:
|
| 454 |
+
print(f"Error during embedding calculation: {e}")
|
| 455 |
+
print(f"Diarization segments: {diarize_segments}")
|
| 456 |
pass
|
| 457 |
|
| 458 |
diarization_time = time.time() - start_time
|