Skip to content

Commit

Permalink
Samples should be an integer, not seconds
Browse files Browse the repository at this point in the history
- Merge pull request ufal#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
  • Loading branch information
Gldkslfmsd authored Jan 3, 2024
2 parents ac78ddf + 013d313 commit 17d6cc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion whisper_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def chunk_at(self, time):
"""
self.transcript_buffer.pop_commited(time)
cut_seconds = time - self.buffer_time_offset
self.audio_buffer = self.audio_buffer[int(cut_seconds)*self.SAMPLING_RATE:]
self.audio_buffer = self.audio_buffer[int(cut_seconds*self.SAMPLING_RATE):]
self.buffer_time_offset = time
self.last_chunked_at = time

Expand Down

0 comments on commit 17d6cc6

Please sign in to comment.