File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,7 @@ Napi::Value whisper(const Napi::CallbackInfo& info) {
330330 bool no_timestamps = whisper_params.Get (" no_timestamps" ).As <Napi::Boolean>();
331331 int32_t audio_ctx = whisper_params.Get (" audio_ctx" ).As <Napi::Number>();
332332 bool comma_in_time = whisper_params.Get (" comma_in_time" ).As <Napi::Boolean>();
333+ int32_t max_len = whisper_params.Get (" max_len" ).As <Napi::Number>();
333334
334335 Napi::Value pcmf32Value = whisper_params.Get (" pcmf32" );
335336 std::vector<float > pcmf32_vec;
@@ -352,6 +353,7 @@ Napi::Value whisper(const Napi::CallbackInfo& info) {
352353 params.audio_ctx = audio_ctx;
353354 params.pcmf32 = pcmf32_vec;
354355 params.comma_in_time = comma_in_time;
356+ params.max_len = max_len;
355357
356358 Napi::Function callback = info[1 ].As <Napi::Function>();
357359 Worker* worker = new Worker (callback, params);
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const whisperParams = {
1818 translate : true ,
1919 no_timestamps : false ,
2020 audio_ctx : 0 ,
21+ max_len : 0 ,
2122} ;
2223
2324const arguments = process . argv . slice ( 2 ) ;
You can’t perform that action at this time.
0 commit comments