Porjaz commited on
Commit
4da32ac
1 Parent(s): e305a79

Update custom_interface.py

Browse files
Files changed (1) hide show
  1. custom_interface.py +6 -6
custom_interface.py CHANGED
@@ -22,12 +22,12 @@ class ASR(Pretrained):
22
  predictions = self.hparams.test_search(encoded_outputs, self.wav_lens)[0]
23
  predicted_words = [self.hparams.tokenizer.decode_ids(prediction).split(" ") for prediction in predictions]
24
 
25
- prediction = []
26
- for sent in predicted_words:
27
- sent = self.filter_repetitions(sent, 3)
28
- sent = " ".join(sent)
29
- prediction.append(sent)
30
- predicted_words = prediction[0]
31
  return predicted_words
32
 
33
  def filter_repetitions(self, seq, max_repetition_length):
 
22
  predictions = self.hparams.test_search(encoded_outputs, self.wav_lens)[0]
23
  predicted_words = [self.hparams.tokenizer.decode_ids(prediction).split(" ") for prediction in predictions]
24
 
25
+ # prediction = []
26
+ # for sent in predicted_words:
27
+ # sent = self.filter_repetitions(sent, 3)
28
+ # sent = " ".join(sent)
29
+ # prediction.append(sent)
30
+ # predicted_words = prediction[0]
31
  return predicted_words
32
 
33
  def filter_repetitions(self, seq, max_repetition_length):