feat: add WHISPER_INITIAL_PROMPT and WHISPER_LOG_LEVEL environment va… #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR adds two new environment variables to the container:
WHISPER_INITIAL_PROMPT
: Allows setting an initial prompt text to improve transcription accuracyWHISPER_LOG_LEVEL
: When set to "debug", enables more verbose loggingThe 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:
WHISPER_LOG_LEVEL=debug
)WHISPER_INITIAL_PROMPT="This is a test prompt to improve transcription"
)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: