fedirz / faster-whisper-server

https://hub.docker.com/r/fedirz/faster-whisper-server
MIT License
198 stars 23 forks source link

Expose the "Hotwords" option in the transcriptions endpoint #28

Closed ahmedadelhassan closed 5 days ago

ahmedadelhassan commented 6 days ago

A very useful feature recently added to faster-whisper is the ability to pass "hotwords" to influence the model predictions. It works similar to the initial_prompt option, but without the constraint of applying only to the first window. It would be great to add this option.

The option can be easily passed to the OpenAI client using the extra_body parameter as the following:


response = client.audio.transcriptions.create(
  ...,
  extra_body={"hotwords": "boost this sentence"},
  ...
)