@@ -2389,92 +2389,92 @@ struct whisper_full_params whisper_full_default_params(enum whisper_sampling_str
23892389 case WHISPER_SAMPLING_GREEDY:
23902390 {
23912391 result = {
2392- /* .strategy =*/ WHISPER_SAMPLING_GREEDY,
2392+ /* .strategy =*/ WHISPER_SAMPLING_GREEDY,
23932393
2394- /* .n_threads =*/ std::min (4 , (int32_t ) std::thread::hardware_concurrency ()),
2395- /* .n_max_text_ctx =*/ 16384 ,
2396- /* .offset_ms =*/ 0 ,
2397- /* .duration_ms =*/ 0 ,
2394+ /* .n_threads =*/ std::min (4 , (int32_t ) std::thread::hardware_concurrency ()),
2395+ /* .n_max_text_ctx =*/ 16384 ,
2396+ /* .offset_ms =*/ 0 ,
2397+ /* .duration_ms =*/ 0 ,
23982398
2399- /* .translate =*/ false ,
2400- /* .no_context =*/ false ,
2401- /* .single_segment =*/ false ,
2402- /* .print_special_tokens =*/ false ,
2403- /* .print_progress =*/ true ,
2404- /* .print_realtime =*/ false ,
2405- /* .print_timestamps =*/ true ,
2399+ /* .translate =*/ false ,
2400+ /* .no_context =*/ false ,
2401+ /* .single_segment =*/ false ,
2402+ /* .print_special =*/ false ,
2403+ /* .print_progress =*/ true ,
2404+ /* .print_realtime =*/ false ,
2405+ /* .print_timestamps =*/ true ,
24062406
2407- /* .token_timestamps =*/ false ,
2408- /* .thold_pt =*/ 0 .01f ,
2409- /* .thold_ptsum =*/ 0 .01f ,
2410- /* .max_len =*/ 0 ,
2411- /* .max_tokens =*/ 0 ,
2407+ /* .token_timestamps =*/ false ,
2408+ /* .thold_pt =*/ 0 .01f ,
2409+ /* .thold_ptsum =*/ 0 .01f ,
2410+ /* .max_len =*/ 0 ,
2411+ /* .max_tokens =*/ 0 ,
24122412
2413- /* .speed_up =*/ false ,
2414- /* .audio_ctx =*/ 0 ,
2413+ /* .speed_up =*/ false ,
2414+ /* .audio_ctx =*/ 0 ,
24152415
2416- /* .prompt_tokens =*/ nullptr ,
2417- /* .prompt_n_tokens =*/ 0 ,
2416+ /* .prompt_tokens =*/ nullptr ,
2417+ /* .prompt_n_tokens =*/ 0 ,
24182418
2419- /* .language =*/ " en" ,
2419+ /* .language =*/ " en" ,
24202420
2421- /* .greedy =*/ {
2421+ /* .greedy =*/ {
24222422 /* .n_past =*/ 0 ,
24232423 },
24242424
2425- /* .beam_search =*/ {
2425+ /* .beam_search =*/ {
24262426 /* .n_past =*/ -1 ,
24272427 /* .beam_width =*/ -1 ,
24282428 /* .n_best =*/ -1 ,
24292429 },
24302430
2431- /* .new_segment_callback =*/ nullptr ,
2431+ /* .new_segment_callback =*/ nullptr ,
24322432 /* .new_segment_callback_user_data =*/ nullptr ,
24332433 };
24342434 } break ;
24352435 case WHISPER_SAMPLING_BEAM_SEARCH:
24362436 {
24372437 result = {
2438- /* .strategy =*/ WHISPER_SAMPLING_BEAM_SEARCH,
2438+ /* .strategy =*/ WHISPER_SAMPLING_BEAM_SEARCH,
24392439
2440- /* .n_threads =*/ std::min (4 , (int32_t ) std::thread::hardware_concurrency ()),
2441- /* .n_max_text_ctx =*/ 16384 ,
2442- /* .offset_ms =*/ 0 ,
2443- /* .duration_ms =*/ 0 ,
2440+ /* .n_threads =*/ std::min (4 , (int32_t ) std::thread::hardware_concurrency ()),
2441+ /* .n_max_text_ctx =*/ 16384 ,
2442+ /* .offset_ms =*/ 0 ,
2443+ /* .duration_ms =*/ 0 ,
24442444
2445- /* .translate =*/ false ,
2446- /* .no_context =*/ false ,
2447- /* .single_segment =*/ false ,
2448- /* .print_special_tokens =*/ false ,
2449- /* .print_progress =*/ true ,
2450- /* .print_realtime =*/ false ,
2451- /* .print_timestamps =*/ true ,
2445+ /* .translate =*/ false ,
2446+ /* .no_context =*/ false ,
2447+ /* .single_segment =*/ false ,
2448+ /* .print_special =*/ false ,
2449+ /* .print_progress =*/ true ,
2450+ /* .print_realtime =*/ false ,
2451+ /* .print_timestamps =*/ true ,
24522452
2453- /* .token_timestamps =*/ false ,
2454- /* .thold_pt =*/ 0 .01f ,
2455- /* .thold_ptsum =*/ 0 .01f ,
2456- /* .max_len =*/ 0 ,
2457- /* .max_tokens =*/ 0 ,
2453+ /* .token_timestamps =*/ false ,
2454+ /* .thold_pt =*/ 0 .01f ,
2455+ /* .thold_ptsum =*/ 0 .01f ,
2456+ /* .max_len =*/ 0 ,
2457+ /* .max_tokens =*/ 0 ,
24582458
2459- /* .speed_up =*/ false ,
2460- /* .audio_ctx =*/ 0 ,
2459+ /* .speed_up =*/ false ,
2460+ /* .audio_ctx =*/ 0 ,
24612461
2462- /* .prompt_tokens =*/ nullptr ,
2463- /* .prompt_n_tokens =*/ 0 ,
2462+ /* .prompt_tokens =*/ nullptr ,
2463+ /* .prompt_n_tokens =*/ 0 ,
24642464
2465- /* .language =*/ " en" ,
2465+ /* .language =*/ " en" ,
24662466
2467- /* .greedy =*/ {
2467+ /* .greedy =*/ {
24682468 /* .n_past =*/ -1 ,
24692469 },
24702470
2471- /* .beam_search =*/ {
2471+ /* .beam_search =*/ {
24722472 /* .n_past =*/ 0 ,
24732473 /* .beam_width =*/ 10 ,
24742474 /* .n_best =*/ 5 ,
24752475 },
24762476
2477- /* .new_segment_callback =*/ nullptr ,
2477+ /* .new_segment_callback =*/ nullptr ,
24782478 /* .new_segment_callback_user_data =*/ nullptr ,
24792479 };
24802480 } break ;
@@ -2762,7 +2762,7 @@ int whisper_full(
27622762 // ctx->vocab.id_to_token[tokens_cur[i].id].c_str(), tokens_cur[i].p,
27632763 // ctx->vocab.id_to_token[tokens_cur[i].tid].c_str(), tokens_cur[i].pt);
27642764
2765- if (params.print_special_tokens == false && tokens_cur[i].id >= whisper_token_eot (ctx)) {
2765+ if (params.print_special == false && tokens_cur[i].id >= whisper_token_eot (ctx)) {
27662766 } else {
27672767 text += whisper_token_to_str (ctx, tokens_cur[i].id );
27682768 }
0 commit comments