mtmd: fix whisper audio tail truncation by exposing padded buffer to FFT (#22770)
This commit is contained in:
@@ -403,6 +403,11 @@ static bool log_mel_spectrogram(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::reverse_copy(samples + 1, samples + 1 + stage_2_pad, samples_padded.begin());
|
std::reverse_copy(samples + 1, samples + 1 + stage_2_pad, samples_padded.begin());
|
||||||
|
|
||||||
|
// expose the padded buffer to downstream FFT and to out.n_len computation
|
||||||
|
// mirrors the no_padding and center_padding branches above
|
||||||
|
samples = samples_padded.data();
|
||||||
|
n_samples = samples_padded.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// preemphasis
|
// preemphasis
|
||||||
|
|||||||
Reference in New Issue
Block a user