Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add WHISPER_INITIAL_PROMPT and WHISPER_LOG_LEVEL environment va… #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mg-dev25
Copy link

linuxserver.io



Description:

This PR adds two new environment variables to the container:

  1. WHISPER_INITIAL_PROMPT: Allows setting an initial prompt text to improve transcription accuracy
  2. WHISPER_LOG_LEVEL: When set to "debug", enables more verbose logging

The implementation modifies the s6-overlay run script to conditionally pass these options to the Wyoming Faster Whisper server. Documentation has been updated in readme-vars.yml to include these new parameters.

Benefits of this PR and context:

This PR addresses two feature requests:

These features enhance the usability of the container without compromising security or stability. The initial prompt option is particularly valuable for improving transcription accuracy in domain-specific contexts.

How Has This Been Tested?

The changes were tested with multiple scenarios:

  1. Basic operation (no new variables set)
  2. Debug logging enabled (WHISPER_LOG_LEVEL=debug)
  3. Initial prompt with spaces (WHISPER_INITIAL_PROMPT="This is a test prompt to improve transcription")
  4. Both features enabled simultaneously

All scenarios functioned correctly, with the command-line arguments properly passed to the Wyoming Faster Whisper server. Special care was taken to ensure proper quoting of the initial prompt to handle spaces and special characters.

Testing was performed on an x86_64 system with Docker version 27.4.1.

Source / References:

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-da3e2e3c-dev-6abb10ee37585c49a6537057e181e03479506d30-pr-39/index.html
https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-da3e2e3c-dev-6abb10ee37585c49a6537057e181e03479506d30-pr-39/shellcheck-result.xml

Tag Passed
amd64-v2.4.0-pkg-da3e2e3c-dev-6abb10ee37585c49a6537057e181e03479506d30-pr-39
arm64v8-v2.4.0-pkg-da3e2e3c-dev-6abb10ee37585c49a6537057e181e03479506d30-pr-39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[FEAT] Initial prompt [FEAT] Add log level
2 participants