Baybars commited on
Commit
84a0fab
·
verified ·
1 Parent(s): 94b8e1f

variable output returned

Browse files
Files changed (1) hide show
  1. whisper2.py +4 -1
whisper2.py CHANGED
@@ -99,4 +99,7 @@ def generate(audio):
99
  )
100
  output = processor.batch_decode(pred_ids, skip_special_tokens=True)
101
 
102
- return output[0]
 
 
 
 
99
  )
100
  output = processor.batch_decode(pred_ids, skip_special_tokens=True)
101
 
102
+ if length <= 30:
103
+ return output[1:]
104
+ else:
105
+ return output[0]