feat: add WHISPER_INITIAL_PROMPT and WHISPER_LOG_LEVEL environment va…
- [x] I have read the [contributing](https://github.com/linuxserver/docker-faster-whisper/blob/main/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
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 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:
- Closes #37 - Add log level: Makes debugging easier by allowing more verbose logging when needed
- Closes #38 - Initial prompt: Improves transcription accuracy by allowing a user-defined initial context
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:
- Basic operation (no new variables set)
- Debug logging enabled (
WHISPER_LOG_LEVEL=debug) - Initial prompt with spaces (
WHISPER_INITIAL_PROMPT="This is a test prompt to improve transcription") - 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:
- Issue #37: Add log level
- Issue #38: Initial prompt
- Wyoming Faster Whisper documentation: https://github.com/rhasspy/wyoming-faster-whisper
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 | ✅ |
I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-78777bb2-dev-1d0cfae225d4d15438cb3177cbe7e81585fec3d6-pr-39/index.html https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-78777bb2-dev-1d0cfae225d4d15438cb3177cbe7e81585fec3d6-pr-39/shellcheck-result.xml
| Tag | Passed |
|---|---|
| amd64-v2.4.0-pkg-78777bb2-dev-1d0cfae225d4d15438cb3177cbe7e81585fec3d6-pr-39 | ✅ |
| arm64v8-v2.4.0-pkg-78777bb2-dev-1d0cfae225d4d15438cb3177cbe7e81585fec3d6-pr-39 | ✅ |
I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-6ca4aea8-dev-eeb5f8cb8b032e1c41611b9d7c9f6f8784807e44-pr-39/index.html https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-6ca4aea8-dev-eeb5f8cb8b032e1c41611b9d7c9f6f8784807e44-pr-39/shellcheck-result.xml
| Tag | Passed |
|---|---|
| amd64-v2.4.0-pkg-6ca4aea8-dev-eeb5f8cb8b032e1c41611b9d7c9f6f8784807e44-pr-39 | ✅ |
| arm64v8-v2.4.0-pkg-6ca4aea8-dev-eeb5f8cb8b032e1c41611b9d7c9f6f8784807e44-pr-39 | ✅ |
I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-7cd8d1f4-dev-fb1ed827788758221185164cc5690a58ffe0bb23-pr-39/index.html https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-7cd8d1f4-dev-fb1ed827788758221185164cc5690a58ffe0bb23-pr-39/shellcheck-result.xml
| Tag | Passed |
|---|---|
| amd64-v2.4.0-pkg-7cd8d1f4-dev-fb1ed827788758221185164cc5690a58ffe0bb23-pr-39 | ✅ |
| arm64v8-v2.4.0-pkg-7cd8d1f4-dev-fb1ed827788758221185164cc5690a58ffe0bb23-pr-39 | ✅ |
I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-330e6140-dev-6bfbb061807d7bc479796a6a3da5247208ee1283-pr-39/index.html https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.4.0-pkg-330e6140-dev-6bfbb061807d7bc479796a6a3da5247208ee1283-pr-39/shellcheck-result.xml
| Tag | Passed |
|---|---|
| amd64-v2.4.0-pkg-330e6140-dev-6bfbb061807d7bc479796a6a3da5247208ee1283-pr-39 | ✅ |
| arm64v8-v2.4.0-pkg-330e6140-dev-6bfbb061807d7bc479796a6a3da5247208ee1283-pr-39 | ✅ |
I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.5.0-pkg-1afb1a16-dev-dce894c1562ea3e47003e8a3f7679586a8e311a8-pr-39/index.html https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.5.0-pkg-1afb1a16-dev-dce894c1562ea3e47003e8a3f7679586a8e311a8-pr-39/shellcheck-result.xml
| Tag | Passed |
|---|---|
| amd64-v2.5.0-pkg-1afb1a16-dev-dce894c1562ea3e47003e8a3f7679586a8e311a8-pr-39 | ✅ |
| arm64v8-v2.5.0-pkg-1afb1a16-dev-dce894c1562ea3e47003e8a3f7679586a8e311a8-pr-39 | ✅ |
I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.5.0-pkg-0d05c700-dev-1f96bf6209f288ffae828eb408f76d5e6204f6e3-pr-39/index.html https://ci-tests.linuxserver.io/lspipepr/faster-whisper/v2.5.0-pkg-0d05c700-dev-1f96bf6209f288ffae828eb408f76d5e6204f6e3-pr-39/shellcheck-result.xml
| Tag | Passed |
|---|---|
| amd64-v2.5.0-pkg-0d05c700-dev-1f96bf6209f288ffae828eb408f76d5e6204f6e3-pr-39 | ✅ |
| arm64v8-v2.5.0-pkg-0d05c700-dev-1f96bf6209f288ffae828eb408f76d5e6204f6e3-pr-39 | ✅ |
