Skip to content

feat(vad): support passing vad_filter - #548

Open
HolgerHuo wants to merge 2 commits into
collabora:mainfrom
HolgerHuo:main
Open

HolgerHuo wants to merge 2 commits into
collabora:mainfrom
HolgerHuo:main

Conversation

@HolgerHuo

Copy link
Copy Markdown

No description provided.

@boxerab boxerab left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, exposing vad on the rest endpoint is useful. two things change behaviour for existing callers though:

  • condition_on_previous_text now defaults to False. WhisperModel.transcribe defaults it to True and the endpoint never overrode it, so every request that doesn't send the field would decode differently.
  • the vad defaults (0.6 / 500 / 800 / 200) don't match faster-whisper's VadOptions (0.5 / 0 / 2000 / 400) or the websocket path ({"threshold": 0.5}).

could you default the new fields to None and only pass the ones the client set? then the defaults stay in faster-whisper.

smaller:

  • the same kwargs are built twice, one dict passed to both paths would fix that and also lets the streaming path pick up hotwords, which it drops today.
  • vad_filter is passed to _stream_transcription by position, please pass it by name like the rest.
  • please add a line to the readme next to the hotwords rest field, and a test that the form fields reach transcriber.transcribe and that a request without them keeps the current arguments.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants