File tree 2 files changed +3
-0
lines changed
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) {
330
330
bool no_timestamps = whisper_params.Get (" no_timestamps" ).As <Napi::Boolean >();
331
331
int32_t audio_ctx = whisper_params.Get (" audio_ctx" ).As <Napi::Number>();
332
332
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>();
333
334
334
335
Napi::Value pcmf32Value = whisper_params.Get (" pcmf32" );
335
336
std::vector<float > pcmf32_vec;
@@ -352,6 +353,7 @@ Napi::Value whisper(const Napi::CallbackInfo& info) {
352
353
params.audio_ctx = audio_ctx;
353
354
params.pcmf32 = pcmf32_vec;
354
355
params.comma_in_time = comma_in_time;
356
+ params.max_len = max_len;
355
357
356
358
Napi::Function callback = info[1 ].As <Napi::Function>();
357
359
Worker* worker = new Worker (callback, params);
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const whisperParams = {
18
18
translate : true ,
19
19
no_timestamps : false ,
20
20
audio_ctx : 0 ,
21
+ max_len : 0 ,
21
22
} ;
22
23
23
24
const arguments = process . argv . slice ( 2 ) ;
You can’t perform that action at this time.
0 commit comments