Spaces:
Runtime error
Runtime error
liuyang
commited on
Commit
·
0724301
1
Parent(s):
1461032
Comment out debug print statements in WhisperTranscriber to clean up output during transcription and embedding calculations.
Browse files
app.py
CHANGED
|
@@ -364,7 +364,7 @@ class WhisperTranscriber:
|
|
| 364 |
|
| 365 |
transcription_time = time.time() - start_time
|
| 366 |
print(f"Full audio transcribed in {transcription_time:.2f} seconds using batch size {batch_size}")
|
| 367 |
-
print(results)
|
| 368 |
return results, detected_language
|
| 369 |
|
| 370 |
# Removed audio cutting; transcription is done once on the full (preprocessed) audio
|
|
@@ -418,7 +418,7 @@ class WhisperTranscriber:
|
|
| 418 |
# Convert to list format
|
| 419 |
diarize_segments = []
|
| 420 |
diarization_list = list(diarization.itertracks(yield_label=True))
|
| 421 |
-
print(diarization_list)
|
| 422 |
for turn, _, speaker in diarization_list:
|
| 423 |
diarize_segments.append({
|
| 424 |
"start": float(turn.start) + float(base_offset_s),
|
|
@@ -475,7 +475,7 @@ class WhisperTranscriber:
|
|
| 475 |
except Exception:
|
| 476 |
# fallback to first embedding
|
| 477 |
speaker_embeddings[spk] = embs[0].cpu().tolist()
|
| 478 |
-
print(speaker_embeddings[spk])
|
| 479 |
except Exception as e:
|
| 480 |
print(f"Error during embedding calculation: {e}")
|
| 481 |
print(f"Diarization segments: {diarize_segments}")
|
|
|
|
| 364 |
|
| 365 |
transcription_time = time.time() - start_time
|
| 366 |
print(f"Full audio transcribed in {transcription_time:.2f} seconds using batch size {batch_size}")
|
| 367 |
+
#print(results)
|
| 368 |
return results, detected_language
|
| 369 |
|
| 370 |
# Removed audio cutting; transcription is done once on the full (preprocessed) audio
|
|
|
|
| 418 |
# Convert to list format
|
| 419 |
diarize_segments = []
|
| 420 |
diarization_list = list(diarization.itertracks(yield_label=True))
|
| 421 |
+
#print(diarization_list)
|
| 422 |
for turn, _, speaker in diarization_list:
|
| 423 |
diarize_segments.append({
|
| 424 |
"start": float(turn.start) + float(base_offset_s),
|
|
|
|
| 475 |
except Exception:
|
| 476 |
# fallback to first embedding
|
| 477 |
speaker_embeddings[spk] = embs[0].cpu().tolist()
|
| 478 |
+
#print(speaker_embeddings[spk])
|
| 479 |
except Exception as e:
|
| 480 |
print(f"Error during embedding calculation: {e}")
|
| 481 |
print(f"Diarization segments: {diarize_segments}")
|