diff --git a/Dockerfile b/Dockerfile index a3b4864..5988007 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,9 @@ RUN python3 -c 'import faster_whisper; model = faster_whisper.WhisperModel("'${W # Preload align model ARG LANG COPY load_align_model.py . -RUN python3 load_align_model.py ${LANG} + +# Aligining language(s) as provided) +RUN for i in ${LANG}; do echo "Aliging lang $i"; python3 load_align_model.py $i; done FROM python:3.10-slim diff --git a/README.md b/README.md index 93e59f7..63422be 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,9 @@ docker run --gpus all -it -v ".:/app" ghcr.io/jim60105/whisperx:large-v3-ja -- - docker run --gpus all -it -v ".:/app" ghcr.io/jim60105/whisperx:no_model -- --model tiny --language en --output_format srt audio.mp3 ``` +In case of multiple language alignments needed, use space separated list of languages"LANG=pl fr en" when building the image. + + The image tags are formatted as `WHISPER_MODEL`-`LANG`, for example, `tiny-en`, `base-de`, or `large-v3-zh`.\ Please be aware that the whisper models `*.en` and `large-v1` have been excluded as I believe they are not frequently used. If you require these models, please refer to the following section to build them on your own. @@ -66,6 +69,9 @@ The [Dockerfile](https://github.com/jim60105/docker-whisperX/blob/master/Dockerf - `WHISPER_MODEL`: The model name. The default is `base`. See [fast-whisper](https://huggingface.co/guillaumekln) for supported models. +In case of multiple language alignments needed, use space separated list of languages `"LANG=pl fr en"` when building the image. Worth adding it when tagging image too, i.e. -t local/whisperx:large-v3-pl-fr-en + + ### Build Command For example, if you want to build the image with `en` language and `large-v3` model: