Closed meowcoder closed 1 year ago
thread 'main' panicked at 'slice index starts at 172409 but ends at 168511', /tmp/whisper-burn/src/transcribe.rs:101:22
https://github.com/Gadersd/whisper-burn/blob/3757c15fd18fe2ec2c398cb6a4697e108442ff3a/src/transcribe.rs#L95
Here waveform.len() could be less than n_samples_per_tensor, which results in iter_len to be extremely large:
waveform.len()
n_samples_per_tensor
iter_len
[src/transcribe.rs:97] n_samples_per_tensor = 238559 [src/transcribe.rs:97] waveform.len() = 168511 [src/transcribe.rs:97] waveform.len() - n_samples_per_tensor = 18446744073709481568
Replacing subtraction with saturating_sub fixes the issue.
saturating_sub
Nice catch! I just pushed your correction.
https://github.com/Gadersd/whisper-burn/blob/3757c15fd18fe2ec2c398cb6a4697e108442ff3a/src/transcribe.rs#L95
Here
waveform.len()
could be less thann_samples_per_tensor
, which results initer_len
to be extremely large:Replacing subtraction with
saturating_sub
fixes the issue.