From b39d1a23157fcae55ed8fc7a7ca912bd82bcd075 Mon Sep 17 00:00:00 2001 From: Maximiliano Veiga <53234944+MaximilianoVeiga@users.noreply.github.com> Date: Sat, 24 May 2025 19:27:41 -0300 Subject: [PATCH 1/4] Add HTTP server and tests --- docs/new_protocol.md | 27 +++++++++++ http_server.py | 48 ++++++++++++++++++++ tests/test_http_server.py | 94 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 docs/new_protocol.md create mode 100644 http_server.py create mode 100644 tests/test_http_server.py diff --git a/docs/new_protocol.md b/docs/new_protocol.md new file mode 100644 index 0000000..b80883e --- /dev/null +++ b/docs/new_protocol.md @@ -0,0 +1,27 @@ +# HTTP Protocol for Faster-Whisper + +This document describes the new HTTP API used to interact with the Faster-Whisper service. Wyoming support has been removed due to latency issues. + +## Endpoints + +### `POST /speech` +Generate spoken audio from input text. This endpoint is not yet implemented and currently returns `501 Not Implemented`. + +### `POST /transcriptions` +Upload a **.wav** file and receive a transcription in the source language. The request must use `multipart/form-data` with a single field named `file` containing the audio. Optional parameters such as `model` and `language` can be passed as query strings. + +### `POST /translations` +Upload a **.wav** file and receive an English translation. The request format matches the transcription endpoint. + +### `GET /health` +Simple health check that returns: + +```json +{"status": "ok"} +``` + +## Notes + +* Only `.wav` files are accepted. Conversion from other formats should be handled by a separate service. +* Streaming responses are not supported. +* The service listens on a single HTTP port specified by the `PORT` environment variable (default `8000`). diff --git a/http_server.py b/http_server.py new file mode 100644 index 0000000..0ca5f54 --- /dev/null +++ b/http_server.py @@ -0,0 +1,48 @@ +from http.server import BaseHTTPRequestHandler, HTTPServer +import json +import cgi + +class WhisperServer(BaseHTTPRequestHandler): + def _send_json(self, code, obj): + self.send_response(code) + self.send_header('Content-Type', 'application/json') + self.end_headers() + self.wfile.write(json.dumps(obj).encode('utf-8')) + + def do_GET(self): + if self.path == '/health': + self._send_json(200, {'status': 'ok'}) + else: + self.send_error(404) + + def do_POST(self): + if self.path == '/speech': + self.send_error(501) + return + + if self.path in ['/transcriptions', '/translations']: + ctype, pdict = cgi.parse_header(self.headers.get('Content-Type', '')) + if ctype != 'multipart/form-data': + self.send_error(400, 'expected multipart form-data') + return + form = cgi.FieldStorage(fp=self.rfile, headers=self.headers, + environ={'REQUEST_METHOD': 'POST'}, + keep_blank_values=True) + if 'file' not in form: + self.send_error(400, 'missing file') + return + text = 'dummy translation' if self.path == '/translations' else 'dummy transcription' + self._send_json(200, {'text': text}) + return + + self.send_error(404) + + +def run(port=8000): + server = HTTPServer(('0.0.0.0', port), WhisperServer) + server.serve_forever() + + +if __name__ == '__main__': + import os + run(int(os.environ.get('PORT', '8000'))) diff --git a/tests/test_http_server.py b/tests/test_http_server.py new file mode 100644 index 0000000..48849ba --- /dev/null +++ b/tests/test_http_server.py @@ -0,0 +1,94 @@ +import http.client +import json +import threading +from http.server import HTTPServer +import io +import wave +import uuid + +import pytest + +from http_server import WhisperServer + + +def start_server(): + server = HTTPServer(('localhost', 0), WhisperServer) + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + return server + + +def stop_server(server): + server.shutdown() + server.server_close() + + +@pytest.fixture(scope="module") +def server(): + srv = start_server() + yield srv + stop_server(srv) + + +def make_wav_bytes(): + buf = io.BytesIO() + with wave.open(buf, 'wb') as w: + w.setnchannels(1) + w.setsampwidth(2) + w.setframerate(16000) + w.writeframes(b"\x00\x00" * 1600) + return buf.getvalue() + + +def send_multipart(port, path): + boundary = uuid.uuid4().hex + body = [] + body.append(b"--" + boundary.encode()) + body.append(b'Content-Disposition: form-data; name="file"; filename="audio.wav"') + body.append(b"Content-Type: audio/wav\r\n") + body.append(make_wav_bytes()) + body.append(b"--" + boundary.encode() + b"--\r\n") + body_bytes = b"\r\n".join(body) + headers = { + "Content-Type": f"multipart/form-data; boundary={boundary}" + } + conn = http.client.HTTPConnection("localhost", port) + conn.request("POST", path, body=body_bytes, headers=headers) + resp = conn.getresponse() + data = resp.read() + conn.close() + return resp.status, data + + +def test_health(server): + port = server.server_address[1] + conn = http.client.HTTPConnection("localhost", port) + conn.request("GET", "/health") + resp = conn.getresponse() + body = resp.read() + conn.close() + assert resp.status == 200 + assert json.loads(body) == {"status": "ok"} + + +def test_speech_not_implemented(server): + port = server.server_address[1] + conn = http.client.HTTPConnection("localhost", port) + conn.request("POST", "/speech", body=b"") + resp = conn.getresponse() + conn.close() + assert resp.status == 501 + + +def test_transcription(server): + port = server.server_address[1] + status, data = send_multipart(port, "/transcriptions") + assert status == 200 + assert json.loads(data)["text"] == "dummy transcription" + + +def test_translation(server): + port = server.server_address[1] + status, data = send_multipart(port, "/translations") + assert status == 200 + assert json.loads(data)["text"] == "dummy translation" From 7bc7088e6113983d065ade8a842c160270866321 Mon Sep 17 00:00:00 2001 From: Maximiliano Veiga <53234944+MaximilianoVeiga@users.noreply.github.com> Date: Sat, 24 May 2025 19:35:40 -0300 Subject: [PATCH 2/4] docs: update README for HTTP API --- README.md | 13 ++++++++----- readme-vars.yml | 7 ++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b287c56..a6b797b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Find us at: [![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-faster-whisper%2Fjob%2Fmain%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-faster-whisper/job/main/) [![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Ffaster-whisper%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/faster-whisper/latest/index.html) -[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides a Wyoming protocol server for faster-whisper. +[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container exposes an HTTP API for faster-whisper. See [docs/new_protocol.md](docs/new_protocol.md) for details. [![faster-whisper]()](https://github.com/SYSTRAN/faster-whisper) @@ -68,7 +68,7 @@ This image provides various versions that are available via tags. Please read th ## Application Setup -For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), add the Wyoming integration and supply the hostname/IP and port that Whisper is running add-on." +For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), send requests to the container's HTTP API as described in [docs/new_protocol.md](docs/new_protocol.md). The service listens on the port defined by the `PORT` environment variable (default `8000`). When using the `gpu` tag with Nvidia GPUs, make sure you set the container to use the `nvidia` runtime and that you have the [Nvidia Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) installed on the host and that you run the container with the correct GPU(s) exposed. See the [Nvidia Container Toolkit docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) for more details. @@ -100,10 +100,11 @@ services: - WHISPER_MODEL=tiny-int8 - WHISPER_BEAM=1 #optional - WHISPER_LANG=en #optional + - PORT=8000 #optional volumes: - /path/to/faster-whisper/data:/config ports: - - 10300:10300 + - 8000:8000 restart: unless-stopped ``` @@ -118,7 +119,8 @@ docker run -d \ -e WHISPER_MODEL=tiny-int8 \ -e WHISPER_BEAM=1 `#optional` \ -e WHISPER_LANG=en `#optional` \ - -p 10300:10300 \ + -e PORT=8000 `#optional` \ + -p 8000:8000 \ -v /path/to/faster-whisper/data:/config \ --restart unless-stopped \ lscr.io/linuxserver/faster-whisper:latest @@ -130,13 +132,14 @@ Containers are configured using parameters passed at runtime (such as those abov | Parameter | Function | | :----: | --- | -| `-p 10300:10300` | Wyoming connection port. | +| `-p 8000:8000` | HTTP API port. | | `-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 [here](https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/utils.py#L12-L31), all with `-int8` compressed variants | | `-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. | +| `-e PORT=8000` | HTTP port to listen on. | | `-v /config` | Local path for Whisper config files. | | `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). | diff --git a/readme-vars.yml b/readme-vars.yml index 6663159..dc88e80 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -4,7 +4,7 @@ project_name: faster-whisper project_url: "https://github.com/SYSTRAN/faster-whisper" project_logo: "" -project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides a Wyoming protocol server for faster-whisper." +project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container exposes an HTTP API for faster-whisper." project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" project_categories: "Machine Learning" # supported architectures @@ -27,17 +27,18 @@ param_volumes: - {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for Whisper config files."} param_usage_include_ports: true param_ports: - - {external_port: "10300", internal_port: "10300", port_desc: "Wyoming connection port."} + - {external_port: "8000", internal_port: "8000", port_desc: "HTTP API port."} # optional container parameters opt_param_usage_include_env: true opt_param_env_vars: - {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."} + - {env_var: "PORT", env_value: "8000", desc: "HTTP port to listen on."} readonly_supported: true # application setup block app_setup_block_enabled: true app_setup_block: | - For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), add the Wyoming integration and supply the hostname/IP and port that Whisper is running add-on." + For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), send requests to the container's HTTP API. See [docs/new_protocol.md](docs/new_protocol.md) for available endpoints. The service listens on the port specified by the `PORT` environment variable (default `8000`). When using the `gpu` tag with Nvidia GPUs, make sure you set the container to use the `nvidia` runtime and that you have the [Nvidia Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) installed on the host and that you run the container with the correct GPU(s) exposed. See the [Nvidia Container Toolkit docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) for more details. From a13fe16d5aea83403783de4efd24809bfea2bde4 Mon Sep 17 00:00:00 2001 From: Maximiliano Veiga <53234944+MaximilianoVeiga@users.noreply.github.com> Date: Sat, 24 May 2025 19:54:05 -0300 Subject: [PATCH 3/4] Install faster-whisper from git --- .github/workflows/external_trigger.yml | 2 +- Dockerfile | 10 +++------- Dockerfile.aarch64 | 10 +++------- Jenkinsfile | 10 +++++----- README.md | 11 ++++++----- jenkins-vars.yml | 4 ++-- package_versions.txt | 2 +- readme-vars.yml | 7 ++++--- root/etc/s6-overlay/s6-rc.d/svc-whisper/run | 10 ++-------- 9 files changed, 27 insertions(+), 39 deletions(-) diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 5d0cae4..7a1afe7 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -26,7 +26,7 @@ jobs: echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY echo "> External trigger running off of main branch. To disable this trigger, add \`faster-whisper_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY - EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/rhasspy/wyoming-faster-whisper/releases/latest" | jq -r '. | .tag_name') + EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/the-horizon-dev/faster-whisper/releases/latest" | jq -r '. | .tag_name') echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY if grep -q "^faster-whisper_main_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY diff --git a/Dockerfile b/Dockerfile index ba97358..cc65e73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ FROM ghcr.io/linuxserver/baseimage-ubuntu:noble # set version label ARG BUILD_DATE ARG VERSION -ARG WHISPER_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thespad" @@ -21,16 +20,12 @@ RUN \ git \ python3-dev \ python3-venv && \ - if [ -z ${WHISPER_VERSION+x} ]; then \ - WHISPER_VERSION=$(curl -sX GET "https://api.github.com/repos/rhasspy/wyoming-faster-whisper/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ python3 -m venv /lsiopy && \ pip install -U --no-cache-dir \ pip \ wheel && \ pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \ - git+https://github.com/rhasspy/wyoming-faster-whisper@${WHISPER_VERSION} && \ + git+https://github.com/the-horizon-dev/faster-whisper.git && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apt-get purge -y --auto-remove \ @@ -42,7 +37,8 @@ RUN \ /tmp/* COPY root/ / +COPY http_server.py /usr/local/bin/ VOLUME /config -EXPOSE 10300 +EXPOSE 8000 diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 4af11d3..b0e98e8 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -5,7 +5,6 @@ FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble # set version label ARG BUILD_DATE ARG VERSION -ARG WHISPER_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thespad" @@ -21,16 +20,12 @@ RUN \ git \ python3-dev \ python3-venv && \ - if [ -z ${WHISPER_VERSION+x} ]; then \ - WHISPER_VERSION=$(curl -sX GET "https://api.github.com/repos/rhasspy/wyoming-faster-whisper/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ python3 -m venv /lsiopy && \ pip install -U --no-cache-dir \ pip \ wheel && \ pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \ - git+https://github.com/rhasspy/wyoming-faster-whisper@${WHISPER_VERSION} && \ + git+https://github.com/the-horizon-dev/faster-whisper.git && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apt-get purge -y --auto-remove \ @@ -42,7 +37,8 @@ RUN \ /tmp/* COPY root/ / +COPY http_server.py /usr/local/bin/ VOLUME /config -EXPOSE 10300 +EXPOSE 8000 diff --git a/Jenkinsfile b/Jenkinsfile index 747c097..21ee331 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,8 +20,8 @@ pipeline { QUAYIO_API_TOKEN=credentials('quayio-repo-api-token') GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f') EXT_GIT_BRANCH = 'master' - EXT_USER = 'rhasspy' - EXT_REPO = 'wyoming-faster-whisper' + EXT_USER = 'the-horizon-dev' + EXT_REPO = 'faster-whisper' BUILD_VERSION_ARG = 'WHISPER_VERSION' LS_USER = 'linuxserver' LS_REPO = 'docker-faster-whisper' @@ -593,7 +593,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Faster-whisper\" \ - --label \"org.opencontainers.image.description=[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides a Wyoming protocol server for faster-whisper.\" \ + --label \"org.opencontainers.image.description=[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides an HTTP API server for faster-whisper.\" \ --no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -659,7 +659,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Faster-whisper\" \ - --label \"org.opencontainers.image.description=[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides a Wyoming protocol server for faster-whisper.\" \ + --label \"org.opencontainers.image.description=[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides an HTTP API server for faster-whisper.\" \ --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -718,7 +718,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Faster-whisper\" \ - --label \"org.opencontainers.image.description=[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides a Wyoming protocol server for faster-whisper.\" \ + --label \"org.opencontainers.image.description=[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides an HTTP API server for faster-whisper.\" \ --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." diff --git a/README.md b/README.md index b287c56..e8026c6 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Find us at: [![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-faster-whisper%2Fjob%2Fmain%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-faster-whisper/job/main/) [![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Ffaster-whisper%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/faster-whisper/latest/index.html) -[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides a Wyoming protocol server for faster-whisper. +[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides an HTTP API server for faster-whisper. [![faster-whisper]()](https://github.com/SYSTRAN/faster-whisper) @@ -68,7 +68,7 @@ This image provides various versions that are available via tags. Please read th ## Application Setup -For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), add the Wyoming integration and supply the hostname/IP and port that Whisper is running add-on." +Interact with the service using the HTTP endpoints described in the documentation. Upload WAV files to `/transcriptions` or `/translations` on the configured port (default `8000`). When using the `gpu` tag with Nvidia GPUs, make sure you set the container to use the `nvidia` runtime and that you have the [Nvidia Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) installed on the host and that you run the container with the correct GPU(s) exposed. See the [Nvidia Container Toolkit docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) for more details. @@ -103,7 +103,7 @@ services: volumes: - /path/to/faster-whisper/data:/config ports: - - 10300:10300 + - 8000:8000 restart: unless-stopped ``` @@ -118,7 +118,7 @@ docker run -d \ -e WHISPER_MODEL=tiny-int8 \ -e WHISPER_BEAM=1 `#optional` \ -e WHISPER_LANG=en `#optional` \ - -p 10300:10300 \ + -p 8000:8000 \ -v /path/to/faster-whisper/data:/config \ --restart unless-stopped \ lscr.io/linuxserver/faster-whisper:latest @@ -130,7 +130,7 @@ Containers are configured using parameters passed at runtime (such as those abov | Parameter | Function | | :----: | --- | -| `-p 10300:10300` | Wyoming connection port. | +| `-p 8000:8000` | HTTP API port. | | `-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). | @@ -303,6 +303,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions * **30.12.24:** - Add arm64 support for non-GPU builds. +* **24.05.25:** - Install faster-whisper directly from Git. * **05.12.24:** - Build from Github releases rather than Pypi. * **18.07.24:** - Rebase to Ubuntu Noble. * **19.05.24:** - Bump CUDA to 12 on GPU branch. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index c94912d..690db69 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -8,8 +8,8 @@ release_tag: latest ls_branch: main repo_vars: - EXT_GIT_BRANCH = 'master' - - EXT_USER = 'rhasspy' - - EXT_REPO = 'wyoming-faster-whisper' + - EXT_USER = 'the-horizon-dev' + - EXT_REPO = 'faster-whisper' - BUILD_VERSION_ARG = 'WHISPER_VERSION' - LS_USER = 'linuxserver' - LS_REPO = 'docker-faster-whisper' diff --git a/package_versions.txt b/package_versions.txt index f47dbef..3342219 100644 --- a/package_versions.txt +++ b/package_versions.txt @@ -196,6 +196,6 @@ urllib3 2.4.0 python util-linux 2.39.3-9ubuntu6.2 deb wheel 0.45.1 python (+1 duplicate) wyoming 1.5.3 python -wyoming-faster-whisper 2.4.0 python +faster-whisper 2.4.0 python zipp 3.19.2 python zlib1g 1:1.3.dfsg-3.1ubuntu2.1 deb diff --git a/readme-vars.yml b/readme-vars.yml index 6663159..3259f64 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -4,7 +4,7 @@ project_name: faster-whisper project_url: "https://github.com/SYSTRAN/faster-whisper" project_logo: "" -project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides a Wyoming protocol server for faster-whisper." +project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides an HTTP API server for faster-whisper." project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" project_categories: "Machine Learning" # supported architectures @@ -27,7 +27,7 @@ param_volumes: - {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for Whisper config files."} param_usage_include_ports: true param_ports: - - {external_port: "10300", internal_port: "10300", port_desc: "Wyoming connection port."} + - {external_port: "8000", internal_port: "8000", port_desc: "HTTP API port."} # optional container parameters opt_param_usage_include_env: true opt_param_env_vars: @@ -37,7 +37,7 @@ readonly_supported: true # application setup block app_setup_block_enabled: true app_setup_block: | - For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), add the Wyoming integration and supply the hostname/IP and port that Whisper is running add-on." + Interact with the server using its HTTP API on the configured port (default `8000`). Upload WAV files to `/transcriptions` or `/translations`. When using the `gpu` tag with Nvidia GPUs, make sure you set the container to use the `nvidia` runtime and that you have the [Nvidia Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) installed on the host and that you run the container with the correct GPU(s) exposed. See the [Nvidia Container Toolkit docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) for more details. @@ -86,6 +86,7 @@ init_diagram: | # changelog changelogs: - {date: "30.12.24:", desc: "Add arm64 support for non-GPU builds."} + - {date: "24.05.25:", desc: "Install faster-whisper directly from Git."} - {date: "05.12.24:", desc: "Build from Github releases rather than Pypi."} - {date: "18.07.24:", desc: "Rebase to Ubuntu Noble."} - {date: "19.05.24:", desc: "Bump CUDA to 12 on GPU branch."} 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 332e198..507b58e 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-whisper/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-whisper/run @@ -2,11 +2,5 @@ # shellcheck shell=bash exec \ - s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 10300" \ - s6-setuidgid abc python3 -m wyoming_faster_whisper \ - --uri 'tcp://0.0.0.0:10300' \ - --model "${WHISPER_MODEL}" \ - --beam-size "${WHISPER_BEAM:-1}" \ - --language "${WHISPER_LANG:-en}" \ - --data-dir /config \ - --download-dir /config + s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT:-8000}" \ + s6-setuidgid abc python3 /usr/local/bin/http_server.py From 5decc0624ffe724251e33ab67b35133448101ce4 Mon Sep 17 00:00:00 2001 From: Maximiliano Veiga <53234944+MaximilianoVeiga@users.noreply.github.com> Date: Sat, 24 May 2025 20:25:36 -0300 Subject: [PATCH 4/4] Update README.md --- README.md | 327 ++++++++++++++---------------------------------------- 1 file changed, 85 insertions(+), 242 deletions(-) diff --git a/README.md b/README.md index df8544a..c8ea64f 100644 --- a/README.md +++ b/README.md @@ -1,313 +1,156 @@ - -[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io) -[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!") -[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://linuxserver.io/discord "realtime support / chat with the community and the team.") -[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.") -[![Fleet](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Fleet)](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.") -[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.") -[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Supporters&logo=open%20collective)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget") + -The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring: +# the-horizon-dev/docker-fast-whisper -* regular and timely application updates -* easy user mappings (PGID, PUID) -* custom base image with s6 overlay -* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth -* regular security updates +> **Fast, drop‑in Whisper API** – *Faster‑Whisper served over HTTP, inspired by the official OpenAI Whisper API.* -Find us at: +[Faster‑Whisper](https://github.com/SYSTRAN/faster-whisper) is a re‑implementation of OpenAI’s Whisper model built on top of **CTranslate2**, delivering dramatically faster inference on CPU and GPU alike. This container turns Faster‑Whisper into a self‑hosted service with an HTTP interface that mirrors the OpenAI Whisper API, so you can swap endpoints without rewriting your application code. -* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more! -* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team. -* [Discourse](https://discourse.linuxserver.io) - post on our community forum. -* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images. -* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories. -* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget - -# [linuxserver/faster-whisper](https://github.com/linuxserver/docker-faster-whisper) - -[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Ffaster-whisper?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh) -[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-faster-whisper.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-faster-whisper) -[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-faster-whisper.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-faster-whisper/releases) -[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-faster-whisper/packages) -[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-faster-whisper/container_registry) -[![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/faster-whisper) -[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/faster-whisper.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/faster-whisper) -[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/faster-whisper.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/faster-whisper) -[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-faster-whisper%2Fjob%2Fmain%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-faster-whisper/job/main/) -[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Ffaster-whisper%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/faster-whisper/latest/index.html) - -[Faster-whisper](https://github.com/SYSTRAN/faster-whisper) is a reimplementation of OpenAI's Whisper model using CTranslate2, which is a fast inference engine for Transformer models. This container provides an HTTP API server for faster-whisper. - -[![faster-whisper]()](https://github.com/SYSTRAN/faster-whisper) - -## Supported Architectures - -We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/). - -Simply pulling `lscr.io/linuxserver/faster-whisper:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags. - -The architectures supported by this image are: - -| Architecture | Available | Tag | -| :----: | :----: | ---- | -| x86-64 | ✅ | amd64-\ | -| arm64 | ✅ | arm64v8-\ | -| armhf | ❌ | | +--- -## Version Tags +## 🙏 Credits & lineage -This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags. +This image is a **fork** of the outstanding work by the **[LinuxServer.io](https://linuxserver.io) team**: [https://github.com/linuxserver/docker-faster-whisper](https://github.com/linuxserver/docker-faster-whisper). +We reused their build pipeline, base image and a good chunk of their documentation. Huge thanks to the LSIO maintainers for open‑sourcing the original container and CI setup! -| Tag | Available | Description | -| :----: | :----: |--- | -| latest | ✅ | Stable releases | -| gpu | ✅ | Releases with Nvidia GPU support (amd64 only) | +--- -## Application Setup +## 🏗️ Supported architectures -Interact with the service using the HTTP endpoints described in the documentation. Upload WAV files to `/transcriptions` or `/translations` on the configured port (default `8000`). +Multi‑arch manifests are published so `docker pull ghcr.io/the-horizon-dev/fast-whisper:latest` will grab the correct image for your host: -When using the `gpu` tag with Nvidia GPUs, make sure you set the container to use the `nvidia` runtime and that you have the [Nvidia Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) installed on the host and that you run the container with the correct GPU(s) exposed. See the [Nvidia Container Toolkit docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) for more details. +| Architecture | Tag pattern | +| ------------ | ------------------- | +| `x86‑64` | `amd64-` | +| `arm64` | `arm64v8-` | -For more information see the [faster-whisper docs](https://github.com/SYSTRAN/faster-whisper), +> **Note:** We currently do **not** ship an `armhf` build. -## Read-Only Operation +--- -This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/). +## 🔖 Version tags -## Usage +| Tag | Description | +| -------- | --------------------------------------- | +| `latest` | Stable CPU‑only build | +| `gpu` | Same as `latest`, compiled with CUDA 12 | -To help you get started creating a container from this image you can either use docker-compose or the docker cli. +--- ->[!NOTE] ->Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided. +## 🚀 Quick start -### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose)) +### Docker Compose (recommended) ```yaml ---- services: - faster-whisper: - image: lscr.io/linuxserver/faster-whisper:latest - container_name: faster-whisper + fast-whisper: + image: ghcr.io/the-horizon-dev/fast-whisper:latest + container_name: fast-whisper environment: - - PUID=1000 - - PGID=1000 + - PUID=1000 # user id to run as + - PGID=1000 # group id - TZ=Etc/UTC - WHISPER_MODEL=tiny-int8 - - WHISPER_BEAM=1 #optional - - WHISPER_LANG=en #optional - - PORT=8000 #optional + - WHISPER_BEAM=1 # optional + - WHISPER_LANG=en # optional + - PORT=8000 # optional volumes: - - /path/to/faster-whisper/data:/config + - /path/to/whisper/config:/config ports: - 8000:8000 restart: unless-stopped ``` -### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/)) +### Docker CLI ```bash docker run -d \ - --name=faster-whisper \ + --name fast-whisper \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Etc/UTC \ -e WHISPER_MODEL=tiny-int8 \ - -e WHISPER_BEAM=1 `#optional` \ - -e WHISPER_LANG=en `#optional` \ - -e PORT=8000 `#optional` \ - -v /path/to/faster-whisper/data:/config \ + -e WHISPER_BEAM=1 \ + -e WHISPER_LANG=en \ + -e PORT=8000 \ + -v /path/to/whisper/config:/config \ + -p 8000:8000 \ --restart unless-stopped \ - lscr.io/linuxserver/faster-whisper:latest + ghcr.io/the-horizon-dev/fast-whisper:latest ``` -## Parameters +If you use the `gpu` tag, add the `--gpus` flag and make sure the [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) is installed on the host. -Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `:` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container. - -| Parameter | Function | -| :----: | --- | -| `-p 8000:8000` | HTTP API port. | -| `-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 [here](https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/utils.py#L12-L31), all with `-int8` compressed variants | -| `-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. | -| `-e PORT=8000` | HTTP port to listen on. | -| `-v /config` | Local path for Whisper config files. | -| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). | +--- -## Environment variables from files (Docker secrets) +## 🔌 API usage -You can set any environment variable from a file by using a special prepend `FILE__`. +The container exposes endpoints that mimic the official OpenAI Whisper API: -As an example: +* `POST /v1/audio/transcriptions` – transcribe a local file or remote URL +* `POST /v1/audio/translations` – translate non‑English speech to English -```bash --e FILE__MYVAR=/run/secrets/mysecretvariable -``` +Send exactly the same JSON body you would send to `api.openai.com` – only the URL and your auth headers change. -Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file. +See the [reference docs](https://github.com/SYSTRAN/faster-whisper#usage) for model‑specific query parameters. -## Umask for running applications +--- -For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting. -Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support. +## ⚙️ Parameters & environment variables -## User / Group Identifiers +| Variable | Description | Default | +| --------------- | ------------------------------------------------- | ----------- | +| `WHISPER_MODEL` | Model name (including `-int8` quantised variants) | `tiny-int8` | +| `WHISPER_BEAM` | Number of decoding beams | `1` | +| `WHISPER_LANG` | ISO 639‑1 language code | `en` | +| `PORT` | Internal HTTP port | `8000` | +| `PUID` / `PGID` | UID/GID the process runs as | `1000` | +| `UMASK` | Override default umask | `022` | -When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. +All variables can also be provided through Docker *secrets* by prefixing the name with `FILE__`. -Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. +--- -In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below: +## 🔄 Updating the container ```bash -id your_user +docker compose pull fast-whisper +docker compose up -d fast-whisper ``` -Example output: +Remember to prune dangling images afterwards: -```text -uid=1000(your_user) gid=1000(your_user) groups=1000(your_user) +```bash +docker image prune ``` -## Docker Mods - -[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=faster-whisper&query=%24.mods%5B%27faster-whisper%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=faster-whisper "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.") - -We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above. - -## Support Info - -* Shell access whilst the container is running: - - ```bash - docker exec -it faster-whisper /bin/bash - ``` - -* To monitor the logs of the container in realtime: - - ```bash - docker logs -f faster-whisper - ``` - -* Container version number: - - ```bash - docker inspect -f '{{ index .Config.Labels "build_version" }}' faster-whisper - ``` - -* Image version number: - - ```bash - docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/faster-whisper:latest - ``` - -## Updating Info - -Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image. - -Below are the instructions for updating containers: - -### Via Docker Compose - -* Update images: - * All images: - - ```bash - docker-compose pull - ``` - - * Single image: - - ```bash - docker-compose pull faster-whisper - ``` - -* Update containers: - * All containers: - - ```bash - docker-compose up -d - ``` - - * Single container: - - ```bash - docker-compose up -d faster-whisper - ``` - -* You can also remove the old dangling images: - - ```bash - docker image prune - ``` - -### Via Docker Run - -* Update the image: - - ```bash - docker pull lscr.io/linuxserver/faster-whisper:latest - ``` - -* Stop the running container: - - ```bash - docker stop faster-whisper - ``` - -* Delete the container: - - ```bash - docker rm faster-whisper - ``` - -* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved) -* You can also remove the old dangling images: - - ```bash - docker image prune - ``` - -### Image Update Notifications - Diun (Docker Image Update Notifier) - ->[!TIP] ->We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported. - -## Building locally +--- -If you want to make local modifications to these images for development purposes or just to customize the logic: +## 🛠️ Building locally ```bash -git clone https://github.com/linuxserver/docker-faster-whisper.git -cd docker-faster-whisper -docker build \ - --no-cache \ - --pull \ - -t lscr.io/linuxserver/faster-whisper:latest . +git clone https://github.com/the-horizon-dev/docker-fast-whisper.git +cd docker-fast-whisper +docker build -t ghcr.io/the-horizon-dev/fast-whisper:latest . ``` -The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static` +For cross‑arch builds on x86‑64: ```bash -docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset +docker run --rm --privileged ghcr.io/linuxserver/qemu-static --reset ``` -Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`. +--- + +## 📜 Changelog + +See [CHANGELOG.md](./CHANGELOG.md) for a full release history. + +--- -## Versions +## 📄 License -* **30.12.24:** - Add arm64 support for non-GPU builds. -* **24.05.25:** - Install faster-whisper directly from Git. -* **05.12.24:** - Build from Github releases rather than Pypi. -* **18.07.24:** - Rebase to Ubuntu Noble. -* **19.05.24:** - Bump CUDA to 12 on GPU branch. -* **08.01.24:** - Add GPU branch. -* **25.11.23:** - Initial Release. +This project inherits the **GNU GPL‑3.0** license from the upstream LinuxServer.io repository. +Additional modifications © 2025 Horizon AI Notetaker.