Update preprocessing_router.py
Browse files- preprocessing_router.py +1 -0
preprocessing_router.py
CHANGED
|
@@ -896,6 +896,7 @@ def process_video_job(job_id: str):
|
|
| 896 |
print(f"[{job_id}] - voice_embeddings: {len(voice_embeddings)} embeddings")
|
| 897 |
print(f"[{job_id}] - par\u00e1metros: voice_max_groups={voice_max_groups}, voice_min_cluster_size={voice_min_cluster_size}")
|
| 898 |
Xv = np.array(voice_embeddings)
|
|
|
|
| 899 |
print(f"[{job_id}] - shape Xv: {Xv.shape}")
|
| 900 |
voice_labels = hierarchical_cluster_with_min_size(
|
| 901 |
Xv, voice_max_groups, voice_min_cluster_size, voice_sensitivity
|
|
|
|
| 896 |
print(f"[{job_id}] - voice_embeddings: {len(voice_embeddings)} embeddings")
|
| 897 |
print(f"[{job_id}] - par\u00e1metros: voice_max_groups={voice_max_groups}, voice_min_cluster_size={voice_min_cluster_size}")
|
| 898 |
Xv = np.array(voice_embeddings)
|
| 899 |
+
Xv = Xv / np.linalg.norm(Xv, axis=1, keepdims=True)
|
| 900 |
print(f"[{job_id}] - shape Xv: {Xv.shape}")
|
| 901 |
voice_labels = hierarchical_cluster_with_min_size(
|
| 902 |
Xv, voice_max_groups, voice_min_cluster_size, voice_sensitivity
|