docker-faster-whisper icon indicating copy to clipboard operation
docker-faster-whisper copied to clipboard

feat: add WHISPER_INITIAL_PROMPT and WHISPER_LOG_LEVEL environment va…

Open mg-dev25 opened this issue 9 months ago • 4 comments

linuxserver.io


  • [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:

  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:

  • 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:

  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:

  • Issue #37: Add log level
  • Issue #38: Initial prompt
  • Wyoming Faster Whisper documentation: https://github.com/rhasspy/wyoming-faster-whisper

mg-dev25 avatar Feb 27 '25 22:02 mg-dev25

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

LinuxServer-CI avatar Feb 27 '25 22:02 LinuxServer-CI

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

LinuxServer-CI avatar Mar 15 '25 18:03 LinuxServer-CI

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

LinuxServer-CI avatar Apr 11 '25 17:04 LinuxServer-CI

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

LinuxServer-CI avatar May 08 '25 17:05 LinuxServer-CI

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

LinuxServer-CI avatar Jun 04 '25 17:06 LinuxServer-CI

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

LinuxServer-CI avatar Jul 01 '25 17:07 LinuxServer-CI

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

LinuxServer-CI avatar Jul 28 '25 17:07 LinuxServer-CI