diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index c4c6ccd..93792dd 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -60,30 +60,30 @@ jobs: tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u20 push: true - - name: Build and push the Fedora 31 image - id: docker_build_fed31 - uses: docker/build-push-action@v2 - with: - context: ./docker - file: "./docker/Dockerfile-Fedora31" - build-args: | - "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}" - allow: network.host - github-token: ${{ github.token }} - tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.fed31 - push: true +# - name: Build and push the Fedora 37 image +# id: docker_build_fed37 +# uses: docker/build-push-action@v2 +# with: +# context: ./docker +# file: "./docker/Dockerfile-Fedora37" +# build-args: | +# "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}" +# allow: network.host +# github-token: ${{ github.token }} +# tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.fed37 +# push: true - - name: Build and push the Debian 10 image - id: docker_build_deb10 + - name: Build and push the Debian 11 image + id: docker_build_deb11 uses: docker/build-push-action@v2 with: context: ./docker - file: "./docker/Dockerfile-Debian10" + file: "./docker/Dockerfile-Debian11" build-args: | "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}" allow: network.host github-token: ${{ github.token }} - tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.deb10 + tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.deb11 push: true - name: Build and push the ArchLinux image diff --git a/Makefile b/Makefile index ff2eedf..1d3e7d1 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ endef export BROWSER_PYSCRIPT BROWSER := python -c "$$BROWSER_PYSCRIPT" -.PHONY: install uninstall build-gzip build-rpm test test-all pydoc coverage manual dist release clean clean-dist clean-doc clean-manual clean-build clean-pyc clean-test clean-rpm +.PHONY: install uninstall build-gzip build-rpm test test-all docker-build pydoc coverage manual dist release clean clean-dist clean-doc clean-manual clean-build clean-pyc clean-test clean-rpm install: if [ ! -e ".$(PYTHON)" ]; then ~/.pyenv/versions/$(PYTHON)/bin/python3 -m venv .$(PYTHON); fi @@ -180,6 +180,13 @@ app: clean-wheels STRETCH_OFF=True .$(PYTHON)/bin/python setup.py bdist_wheel -d ./wheels; \ .$(PYTHON)/bin/pex subaligner==$(SUBALIGNER_VERSION) --repo=./wheels --platform $(PLATFORM) --no-pypi --no-build --python-shebang="/usr/bin/env python3" -e subaligner -o subaligner-$(PLATFORM).app; \ +docker-build: + docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-Ubuntu20 . + docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-ArchLinux . + docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-CentOS7 . + docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-Debian11 . + docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-Fedora37 . + docker-images: SUBALIGNER_VERSION=$(SUBALIGNER_VERSION) docker-compose -f ./docker/docker-compose.yml build diff --git a/docker/Dockerfile-Debian10 b/docker/Dockerfile-Debian11 similarity index 94% rename from docker/Dockerfile-Debian10 rename to docker/Dockerfile-Debian11 index d3fe362..1d91f42 100644 --- a/docker/Dockerfile-Debian10 +++ b/docker/Dockerfile-Debian11 @@ -1,5 +1,5 @@ # Subaligner Debian docker image -FROM debian:stable-20211011-slim +FROM debian:stable-20230202-slim ARG RELEASE_VERSION diff --git a/docker/Dockerfile-Fedora31 b/docker/Dockerfile-Fedora37 similarity index 89% rename from docker/Dockerfile-Fedora31 rename to docker/Dockerfile-Fedora37 index 3e2323f..e4fb24e 100644 --- a/docker/Dockerfile-Fedora31 +++ b/docker/Dockerfile-Fedora37 @@ -1,5 +1,5 @@ # Subaligner Fedora Docker Image -From fedora:31 +From fedora:37 ARG RELEASE_VERSION @@ -15,6 +15,8 @@ RUN ["/bin/bash", "-c", "dnf install -y dnf-utils &&\ dnf install -y espeak-ng &&\ ln -s /usr/lib64/libespeak-ng.so.1 /usr/lib64/libespeak.so &&\ dnf install -y libsndfile-devel &&\ + dnf install -y blas lapack blas-devel lapack-devel &&\ + dnf install -y gcc-c++ &&\ dnf install -y python3 &&\ dnf install -y gcc &&\ dnf install -y python3-wheel &&\ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 424665b..82f0474 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -28,11 +28,11 @@ services: subaligner-debian10: build: context: ./ - dockerfile: Dockerfile-Debian10 - image: baxtree/subaligner:${SUBALIGNER_VERSION}.deb10 + dockerfile: Dockerfile-Debian11 + image: baxtree/subaligner:${SUBALIGNER_VERSION}.deb11 subaligner-fedora31: build: context: ./ - dockerfile: Dockerfile-Fedora31 - image: baxtree/subaligner:${SUBALIGNER_VERSION}.fed31 + dockerfile: Dockerfile-Fedora37 + image: baxtree/subaligner:${SUBALIGNER_VERSION}.fed37 diff --git a/subaligner/_version.py b/subaligner/_version.py index eba52d9..c4206c9 100644 --- a/subaligner/_version.py +++ b/subaligner/_version.py @@ -1,2 +1,2 @@ """The semver for the current release.""" -__version__ = "0.3.2" +__version__ = "0.3.3" diff --git a/subaligner/transcriber.py b/subaligner/transcriber.py index 3122ff4..0a0481a 100644 --- a/subaligner/transcriber.py +++ b/subaligner/transcriber.py @@ -55,7 +55,7 @@ def transcribe(self, video_file_path: str, language_code: str) -> Tuple[Subtitle try: audio = whisper.load_audio(audio_file_path) self.__LOGGER.debug("Start transcribing the audio...") - result = self.__model.transcribe(audio, task="transcribe", language=LANGUAGES[lang], logprob_threshold=-1.2, no_speech_threshold=0.16) + result = self.__model.transcribe(audio, task="transcribe", language=LANGUAGES[lang]) self.__LOGGER.info("Finished transcribing the audio") srt_str = "" for i, segment in enumerate(result["segments"], start=1):