Dominik Macháček commited on
Commit
bfbe83d
·
2 Parent(s): aa51e39 234ac8f

Samples should be an integer, not seconds

Browse files

- Merge pull request #49 from skripnik/patch-1
- tested performance -- ESIC dev2, 27 docs, on En, De, Cs ASR, Nvidia A40, min chunk 1s, VAD => it has lower WER and latency with "segment" buffer trimming with various thresholds

Files changed (1) hide show
  1. whisper_online.py +1 -1
whisper_online.py CHANGED
@@ -355,7 +355,7 @@ class OnlineASRProcessor:
355
  """
356
  self.transcript_buffer.pop_commited(time)
357
  cut_seconds = time - self.buffer_time_offset
358
- self.audio_buffer = self.audio_buffer[int(cut_seconds)*self.SAMPLING_RATE:]
359
  self.buffer_time_offset = time
360
  self.last_chunked_at = time
361
 
 
355
  """
356
  self.transcript_buffer.pop_commited(time)
357
  cut_seconds = time - self.buffer_time_offset
358
+ self.audio_buffer = self.audio_buffer[int(cut_seconds*self.SAMPLING_RATE):]
359
  self.buffer_time_offset = time
360
  self.last_chunked_at = time
361