Porjaz commited on
Commit
0f39aff
·
verified ·
1 Parent(s): 72ec8fd

Update custom_interface.py

Browse files
Files changed (1) hide show
  1. custom_interface.py +3 -4
custom_interface.py CHANGED
@@ -21,14 +21,13 @@ class ASR(Pretrained):
21
  # Output layer for seq2seq log-probabilities
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
- print(predicted_words)
25
  prediction = []
26
  for sent in predicted_words:
27
  sent = self.filter_repetitions(sent, 3)
28
- sent = " ".join(sent)
29
  prediction.append(sent)
30
- print(prediction)
31
- predicted_words = prediction
32
  return predicted_words
33
 
34
  def filter_repetitions(self, seq, max_repetition_length):
 
21
  # Output layer for seq2seq log-probabilities
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
  prediction = []
25
  for sent in predicted_words:
26
  sent = self.filter_repetitions(sent, 3)
27
+ # sent = " ".join(sent)
28
  prediction.append(sent)
29
+ print([prediction])
30
+ predicted_words = [prediction]
31
  return predicted_words
32
 
33
  def filter_repetitions(self, seq, max_repetition_length):