diff --git a/README.md b/README.md index 923580f..a430a89 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ services: - TZ=Etc/UTC - WHISPER_MODEL=tiny-int8 - LOCAL_ONLY= #optional + - USE_TRANSFORMERS= #optional - WHISPER_BEAM=1 #optional - WHISPER_LANG=en #optional volumes: @@ -115,6 +116,7 @@ docker run -d \ -e TZ=Etc/UTC \ -e WHISPER_MODEL=tiny-int8 \ -e LOCAL_ONLY= `#optional` \ + -e USE_TRANSFORMERS= `#optional` \ -e WHISPER_BEAM=1 `#optional` \ -e WHISPER_LANG=en `#optional` \ -p 10300:10300 \ @@ -133,8 +135,9 @@ Containers are configured using parameters passed at runtime (such as those abov | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | -| `-e WHISPER_MODEL=tiny-int8` | Whisper model that will be used for transcription. From `tiny`, `base`, `small` and `medium`, all with `-int8` compressed variants | +| `-e WHISPER_MODEL=tiny-int8` | Whisper model that will be used for transcription. From [here](https://github.com/home-assistant/addons/blob/master/whisper/config.yaml#L25), smaller models also have `-int8` compressed variants | | `-e LOCAL_ONLY=` | If set to `true`, or any other value, the container will not attempt to download models from HuggingFace and will only use locally-provided models. | +| `-e USE_TRANSFORMERS=` | If set to `true`, or any other value, the container will interpret `WHISPER_MODEL` as a HuggingFace transformers model id. | | `-e WHISPER_BEAM=1` | Number of candidates to consider simultaneously during transcription. | | `-e WHISPER_LANG=en` | Language that you will speak to the add-on. | | `-v /config` | Local path for Whisper config files. | @@ -302,6 +305,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **07.09.25:** - Add support for transformers models. * **20.08.25:** - Add gpu-legacy branch for pre-Turing cards. * **10.08.25:** - Add support for local-only mode. * **05.12.24:** - Build from Github releases rather than Pypi. diff --git a/readme-vars.yml b/readme-vars.yml index 3ffcc15..a5d2cec 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -20,7 +20,7 @@ common_param_env_vars_enabled: true param_container_name: "{{ project_name }}" param_usage_include_env: true param_env_vars: - - {env_var: "WHISPER_MODEL", env_value: "tiny-int8", desc: "Whisper model that will be used for transcription. From `tiny`, `base`, `small` and `medium`, all with `-int8` compressed variants", env_options: ["tiny-int8", "tiny", "base-int8", "base", "small-int8", "small", "medium-int8"]} + - {env_var: "WHISPER_MODEL", env_value: "tiny-int8", desc: "Whisper model that will be used for transcription. From [here](https://github.com/home-assistant/addons/blob/master/whisper/config.yaml#L25), smaller models also have `-int8` compressed variants"} param_usage_include_vols: true param_volumes: - {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for Whisper config files."} @@ -31,6 +31,7 @@ param_ports: opt_param_usage_include_env: true opt_param_env_vars: - {env_var: "LOCAL_ONLY", env_value: "", desc: "If set to `true`, or any other value, the container will not attempt to download models from HuggingFace and will only use locally-provided models."} + - {env_var: "USE_TRANSFORMERS", env_value: "", desc: "If set to `true`, or any other value, the container will interpret `WHISPER_MODEL` as a HuggingFace transformers model id."} - {env_var: "WHISPER_BEAM", env_value: "1", desc: "Number of candidates to consider simultaneously during transcription."} - {env_var: "WHISPER_LANG", env_value: "en", desc: "Language that you will speak to the add-on."} readonly_supported: true @@ -85,6 +86,7 @@ init_diagram: | "faster-whisper:gpu" <- Base Images # changelog changelogs: + - {date: "07.09.25:", desc: "Add support for transformers models."} - {date: "20.08.25:", desc: "Add gpu-legacy branch for pre-Turing cards."} - {date: "10.08.25:", desc: "Add support for local-only mode."} - {date: "05.12.24:", desc: "Build from Github releases rather than Pypi."} diff --git a/root/etc/s6-overlay/s6-rc.d/svc-whisper/run b/root/etc/s6-overlay/s6-rc.d/svc-whisper/run index 458a192..743974f 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-whisper/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-whisper/run @@ -13,4 +13,5 @@ exec \ --language "${WHISPER_LANG:-en}" \ --data-dir /config \ --download-dir /config \ - ${LOCAL_ONLY:+--local-files-only} + ${LOCAL_ONLY:+--local-files-only} \ + ${USE_TRANSFORMERS:+--use-transformers}