diff --git a/whisper/main.py b/whisper/main.py index 121f34c..6325397 100644 --- a/whisper/main.py +++ b/whisper/main.py @@ -61,6 +61,7 @@ async def asr( output: str = Query("txt"), language: Optional[str] = Query(None), initial_prompt: Optional[str] = Form(None), + hotwords: Optional[str] = Form(None), ): suffix = os.path.splitext(audio_file.filename or "")[1] or ".bin" tmp = tempfile.NamedTemporaryFile(suffix=suffix, delete=False) @@ -85,6 +86,7 @@ async def asr( log_prob_threshold=-1.0, compression_ratio_threshold=2.4, initial_prompt=initial_prompt, + hotwords=hotwords, ) segments = list(segments_gen) infer_secs = time.monotonic() - t0