ktangri commited on
Commit
02be93f
1 Parent(s): 1dc5584

Fix segmentation call

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,10 +12,10 @@ speaker_segmentation = Pipeline.from_pretrained("pyannote/speaker-segmentation")
12
  rpunct = RestorePuncts()
13
 
14
  def transcribe(filepath):
 
15
  speech, sampling_rate = load(filepath)
16
  if sampling_rate != 16000:
17
  speech = resample(speech, sampling_rate, 16000)
18
- speaker_output = speaker_segmentation(speech)
19
  text = asr(speech, return_timestamps="word")
20
 
21
  full_text = text['text'].lower()
 
12
  rpunct = RestorePuncts()
13
 
14
  def transcribe(filepath):
15
+ speaker_output = speaker_segmentation(filepath)
16
  speech, sampling_rate = load(filepath)
17
  if sampling_rate != 16000:
18
  speech = resample(speech, sampling_rate, 16000)
 
19
  text = asr(speech, return_timestamps="word")
20
 
21
  full_text = text['text'].lower()