Update preprocessing_router.py
Browse files- preprocessing_router.py +1 -11
preprocessing_router.py
CHANGED
|
@@ -838,19 +838,8 @@ def process_video_job(job_id: str):
|
|
| 838 |
|
| 839 |
print(f"[{job_id}] Procesando audio con ASR space...")
|
| 840 |
try:
|
| 841 |
-
# Extract audio
|
| 842 |
-
audio = asr_client.extract_audio_from_video(video_path)
|
| 843 |
-
|
| 844 |
-
# Diarize
|
| 845 |
-
diar_result = asr_client.diarize_audio(audio)
|
| 846 |
-
print("=======")
|
| 847 |
-
print(diar_result)
|
| 848 |
-
print("=======")
|
| 849 |
# Extract audio and diarize
|
| 850 |
diar_result = asr_client.extract_audio_and_diarize(video_path)
|
| 851 |
-
print("=======")
|
| 852 |
-
print(diar_result)
|
| 853 |
-
print("=======")
|
| 854 |
clips = diar_result.get("clips", [])
|
| 855 |
segments = diar_result.get("segments", [])
|
| 856 |
|
|
@@ -901,6 +890,7 @@ def process_video_job(job_id: str):
|
|
| 901 |
print(f"[{job_id}] \u2713 {len(audio_segments)} segmentos de audio procesados")
|
| 902 |
|
| 903 |
# Cluster voice embeddings
|
|
|
|
| 904 |
if voice_embeddings:
|
| 905 |
print(f"[{job_id}] Clustering jer\u00e1rquico de voz...")
|
| 906 |
print(f"[{job_id}] - voice_embeddings: {len(voice_embeddings)} embeddings")
|
|
|
|
| 838 |
|
| 839 |
print(f"[{job_id}] Procesando audio con ASR space...")
|
| 840 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 841 |
# Extract audio and diarize
|
| 842 |
diar_result = asr_client.extract_audio_and_diarize(video_path)
|
|
|
|
|
|
|
|
|
|
| 843 |
clips = diar_result.get("clips", [])
|
| 844 |
segments = diar_result.get("segments", [])
|
| 845 |
|
|
|
|
| 890 |
print(f"[{job_id}] \u2713 {len(audio_segments)} segmentos de audio procesados")
|
| 891 |
|
| 892 |
# Cluster voice embeddings
|
| 893 |
+
print(voice_embeddings)
|
| 894 |
if voice_embeddings:
|
| 895 |
print(f"[{job_id}] Clustering jer\u00e1rquico de voz...")
|
| 896 |
print(f"[{job_id}] - voice_embeddings: {len(voice_embeddings)} embeddings")
|