Skip to content

Accept a prompt query parameter on the live transcription route - #618

Open
scriptease wants to merge 1 commit into
0xShug0:mainfrom
scriptease:feature/live-transcription-prompt
Open

scriptease wants to merge 1 commit into
0xShug0:mainfrom
scriptease:feature/live-transcription-prompt

Conversation

@scriptease

Copy link
Copy Markdown

The multipart transcription route takes a prompt field for recognition context, but the live PCM route had no way to pass hotwords. This reads a URL-encoded prompt from the query string and forwards it as text_input alongside the language, matching the CLI's --text behaviour. The language parameter is now URL-decoded as well so multi-word values survive.

Changes:

  • app/server/runtime.cpp: read and decode prompt and language query params on the live route, pass prompt as text_input
  • app/server/README.md: document the prompt query parameter
  • docs/community_models/r2t2.md: note hotword support via prompt for R2T2 live transcription

Tested against a local Confucius4-R2T2 server on Apple Silicon (Metal) with domain vocabulary passed via ?prompt=; terms were recognized that were previously misheard without it.

🤖 Generated with Claude Code

The multipart transcription route takes a prompt field for recognition
context, but the live PCM route had no way to pass hotwords. Read a
URL-encoded prompt from the query and forward it as text_input alongside
the language, matching the CLI's --text behaviour. Also URL-decode the
language parameter so multi-word values survive.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant