|
|
@ -2314,6 +2314,12 @@ int whisper_full(
|
|
|
|
struct whisper_full_params params,
|
|
|
|
struct whisper_full_params params,
|
|
|
|
const float * samples,
|
|
|
|
const float * samples,
|
|
|
|
int n_samples) {
|
|
|
|
int n_samples) {
|
|
|
|
|
|
|
|
// clear old results
|
|
|
|
|
|
|
|
auto & result_all = ctx->result_all;
|
|
|
|
|
|
|
|
auto & result_cur = ctx->result_cur;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result_all.clear();
|
|
|
|
|
|
|
|
|
|
|
|
// compute log mel spectrogram
|
|
|
|
// compute log mel spectrogram
|
|
|
|
if (whisper_pcm_to_mel(ctx, samples, n_samples, params.n_threads) != 0) {
|
|
|
|
if (whisper_pcm_to_mel(ctx, samples, n_samples, params.n_threads) != 0) {
|
|
|
|
fprintf(stderr, "%s: failed to compute log mel spectrogram\n", __func__);
|
|
|
|
fprintf(stderr, "%s: failed to compute log mel spectrogram\n", __func__);
|
|
|
@ -2344,11 +2350,6 @@ int whisper_full(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
auto & result_all = ctx->result_all;
|
|
|
|
|
|
|
|
auto & result_cur = ctx->result_cur;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result_all.clear();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int progress_prev = 0;
|
|
|
|
int progress_prev = 0;
|
|
|
|
int progress_step = 5;
|
|
|
|
int progress_step = 5;
|
|
|
|
|
|
|
|
|
|
|
|