duongthienz commited on
Commit
1b6e62f
·
verified ·
1 Parent(s): a615683

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -109,7 +109,10 @@ def processFile(filePath):
109
  del waveformEnhanced
110
  print("Audio Equalized")
111
  print("Detecting speakers")
112
- annotations = pipeline({"waveform": waveform_gain_adjusted, "sample_rate": sampleRate})
 
 
 
113
  print("Speakers Detected")
114
  totalTimeInSeconds = int(waveform_gain_adjusted.shape[-1]/sampleRate)
115
  print("Time in seconds calculated")
 
109
  del waveformEnhanced
110
  print("Audio Equalized")
111
  print("Detecting speakers")
112
+ diarization_output = pipeline({"waveform": waveform_gain_adjusted, "sample_rate": sampleRate})
113
+ annotations = Annotation()
114
+ for turn, _, speaker in diarization_output.itertracks(yield_label=True):
115
+ annotations[turn] = speaker
116
  print("Speakers Detected")
117
  totalTimeInSeconds = int(waveform_gain_adjusted.shape[-1]/sampleRate)
118
  print("Time in seconds calculated")