MetroBox commited on
Commit
fb3a431
1 Parent(s): 5bce4d2

debug test

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -49,8 +49,9 @@ def transcribe(audio, model):
49
  if duration > 4 * 60 * 60:
50
  return "La duración del audio es muy larga"
51
 
 
52
  result = model.transcribe(path)
53
- print(result)
54
  segments = result["segments"]
55
 
56
  num_speakers = min(max(round(num_speakers), 1), len(segments))
@@ -96,8 +97,9 @@ def segment_embedding(path, segment, duration):
96
 
97
  def add_speaker_labels(segments, embeddings, num_speakers):
98
  clustering = AgglomerativeClustering(num_speakers).fit(embeddings)
 
 
99
  labels = clustering.labels_
100
- print("estos son los labels" + labels)
101
  for i in range(len(segments)):
102
  segments[i]["speaker"] = 'HABLANTE ' + str(labels[i] + 1)
103
 
 
49
  if duration > 4 * 60 * 60:
50
  return "La duración del audio es muy larga"
51
 
52
+ result = {}
53
  result = model.transcribe(path)
54
+
55
  segments = result["segments"]
56
 
57
  num_speakers = min(max(round(num_speakers), 1), len(segments))
 
97
 
98
  def add_speaker_labels(segments, embeddings, num_speakers):
99
  clustering = AgglomerativeClustering(num_speakers).fit(embeddings)
100
+
101
+ labels={}
102
  labels = clustering.labels_
 
103
  for i in range(len(segments)):
104
  segments[i]["speaker"] = 'HABLANTE ' + str(labels[i] + 1)
105