Skip to content

Send the event glossary to OpenAI transcription as a prompt #1168

Open

Description

@ArnavBallinCode

Problem

OpenAI's transcription models accept a text prompt that biases spelling of names and jargon. portal/transcription/providers/openai.py doesn't send one, either in the HTTP path (whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe, data = {"model": ..., "language": ...}) or in the Realtime session config. So the event glossary has no effect on OpenAI captions.

What's needed

  • Use the shared source-terms helper from Use the event glossary in local Whisper transcription (hotwords / initial_prompt) #1164.
  • HTTP path: add prompt to the form data, e.g. a short sentence containing the terms ("Glossary: MediaMTX, Eventyay, Jitsi."). Keep it within the model's prompt limit and trim by priority.
  • Realtime path: set the transcription prompt field in the session config, if the selected model supports it (check the current API docs and say so in the PR).
  • No terms = exactly today's request.

Acceptance criteria

  • Unit tests: the prompt is present and trimmed for long glossaries, and absent when there are no terms.
  • Turning off floor_ai_vocabulary_enabled disables it.

Testing note

Request building can be unit-tested with a mocked HTTP client. The maintainer will do a live check with a key before merging.

Activity

  1. SanketKokate712 commented on Nov 9, 2026

    @SanketKokate712
    Member

    working.

  2. hazelmayank commented on Nov 9, 2026

    @hazelmayank
    Member

    I'm implementing #1164 (the shared glossary helper and local Whisper), and this issue builds on that helper, so I'd like to work on it as a follow-up once #1164 is up. If someone has already started here, please say so and we can coordinate, or I'll take another one. @ArnavBallinCode is that okay?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendenhancementpython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions