Skip to content

Commit a08235b

Browse files
authored
Merge pull request #60 from linuxserver/main-autolang
2 parents beff160 + c66fe63 commit a08235b

3 files changed

Lines changed: 18 additions & 12 deletions

File tree

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ services:
9595
- PUID=1000
9696
- PGID=1000
9797
- TZ=Etc/UTC
98-
- WHISPER_MODEL=tiny-int8
98+
- DEBUG= #optional
9999
- LOCAL_ONLY= #optional
100100
- WHISPER_BEAM=1 #optional
101-
- WHISPER_LANG=en #optional
101+
- WHISPER_LANG=auto #optional
102+
- WHISPER_MODEL=auto #optional
102103
volumes:
103104
- /path/to/faster-whisper/data:/config
104105
ports:
@@ -114,10 +115,11 @@ docker run -d \
114115
-e PUID=1000 \
115116
-e PGID=1000 \
116117
-e TZ=Etc/UTC \
117-
-e WHISPER_MODEL=tiny-int8 \
118+
-e DEBUG= `#optional` \
118119
-e LOCAL_ONLY= `#optional` \
119120
-e WHISPER_BEAM=1 `#optional` \
120-
-e WHISPER_LANG=en `#optional` \
121+
-e WHISPER_LANG=auto `#optional` \
122+
-e WHISPER_MODEL=auto `#optional` \
121123
-p 10300:10300 \
122124
-v /path/to/faster-whisper/data:/config \
123125
--restart unless-stopped \
@@ -134,10 +136,11 @@ Containers are configured using parameters passed at runtime (such as those abov
134136
| `-e PUID=1000` | for UserID - see below for explanation |
135137
| `-e PGID=1000` | for GroupID - see below for explanation |
136138
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
137-
| `-e WHISPER_MODEL=tiny-int8` | Whisper model that will be used for transcription. From [here](https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/utils.py#L12-L31), all with `-int8` compressed variants |
139+
| `-e DEBUG=` | If set to `true`, or any other value, the container will output debug logs. |
138140
| `-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. |
139141
| `-e WHISPER_BEAM=1` | Number of candidates to consider simultaneously during transcription. |
140-
| `-e WHISPER_LANG=en` | Language that you will speak to the add-on. |
142+
| `-e WHISPER_LANG=auto` | Two character code for the language that you will speak to the add-on. |
143+
| `-e WHISPER_MODEL=auto` | Whisper model that will be used for transcription. From [here](https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/utils.py#L11-L31). |
141144
| `-v /config` | Local path for Whisper config files. |
142145
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
143146

@@ -303,6 +306,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
303306

304307
## Versions
305308

309+
* **26.01.26:** - Default to `auto` for model and language if not set.
306310
* **20.08.25:** - Add gpu-legacy branch for pre-Turing cards.
307311
* **10.08.25:** - Add support for local-only mode.
308312
* **30.12.24:** - Add arm64 support for non-GPU builds.

readme-vars.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ development_versions_items:
2020
# container parameters
2121
common_param_env_vars_enabled: true
2222
param_container_name: "{{ project_name }}"
23-
param_usage_include_env: true
24-
param_env_vars:
25-
- {env_var: "WHISPER_MODEL", env_value: "tiny-int8", desc: "Whisper model that will be used for transcription. From [here](https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/utils.py#L12-L31), all with `-int8` compressed variants"}
23+
param_usage_include_env: false
2624
param_usage_include_vols: true
2725
param_volumes:
2826
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for Whisper config files."}
@@ -32,9 +30,11 @@ param_ports:
3230
# optional container parameters
3331
opt_param_usage_include_env: true
3432
opt_param_env_vars:
33+
- {env_var: "DEBUG", env_value: "", desc: "If set to `true`, or any other value, the container will output debug logs."}
3534
- {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."}
3635
- {env_var: "WHISPER_BEAM", env_value: "1", desc: "Number of candidates to consider simultaneously during transcription."}
37-
- {env_var: "WHISPER_LANG", env_value: "en", desc: "Language that you will speak to the add-on."}
36+
- {env_var: "WHISPER_LANG", env_value: "auto", desc: "Two character code for the language that you will speak to the add-on."}
37+
- {env_var: "WHISPER_MODEL", env_value: "auto", desc: "Whisper model that will be used for transcription. From [here](https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/utils.py#L11-L31)."}
3838
readonly_supported: true
3939
# application setup block
4040
app_setup_block_enabled: true
@@ -87,6 +87,7 @@ init_diagram: |
8787
"faster-whisper:latest" <- Base Images
8888
# changelog
8989
changelogs:
90+
- {date: "26.01.26:", desc: "Default to `auto` for model and language if not set."}
9091
- {date: "20.08.25:", desc: "Add gpu-legacy branch for pre-Turing cards."}
9192
- {date: "10.08.25:", desc: "Add support for local-only mode."}
9293
- {date: "30.12.24:", desc: "Add arm64 support for non-GPU builds."}

root/etc/s6-overlay/s6-rc.d/svc-whisper/run

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ exec \
55
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 10300" \
66
s6-setuidgid abc python3 -m wyoming_faster_whisper \
77
--uri 'tcp://0.0.0.0:10300' \
8-
--model "${WHISPER_MODEL}" \
8+
--model "${WHISPER_MODEL:-auto}" \
99
--beam-size "${WHISPER_BEAM:-1}" \
10-
--language "${WHISPER_LANG:-en}" \
10+
--language "${WHISPER_LANG:-auto}" \
1111
--data-dir /config \
1212
--download-dir /config \
13+
${DEBUG:+--debug} \
1314
${LOCAL_ONLY:+--local-files-only}

0 commit comments

Comments
 (0)