File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,13 @@ Napi::Value whisper(const Napi::CallbackInfo& info) {
367367  int32_t  audio_ctx = whisper_params.Get (" audio_ctx" As <Napi::Number>();
368368  bool  comma_in_time = whisper_params.Get (" comma_in_time" As <Napi::Boolean>();
369369  int32_t  max_len = whisper_params.Get (" max_len" As <Napi::Number>();
370+   
371+   //  support prompt
372+   std::string prompt = " " 
373+   if  (whisper_params.Has (" prompt" Get (" prompt" IsString ()) {
374+     prompt = whisper_params.Get (" prompt" As <Napi::String>();
375+   }
376+   
370377  //  Add support for print_progress
371378  bool  print_progress = false ;
372379  if  (whisper_params.Has (" print_progress" 
@@ -401,6 +408,7 @@ Napi::Value whisper(const Napi::CallbackInfo& info) {
401408  params.comma_in_time  = comma_in_time;
402409  params.max_len  = max_len;
403410  params.print_progress  = print_progress;
411+   params.prompt  = prompt;
404412
405413  Napi::Function callback = info[1 ].As <Napi::Function>();
406414  //  Create a new Worker class with progress callback support
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments