From 3487c59ca0d63780d8d8db2f710349ed03786b28 Mon Sep 17 00:00:00 2001 From: Paul Guyot Date: Mon, 29 Apr 2024 22:50:31 +0200 Subject: [PATCH] Fix adapt-model.sh script (fix #383) Also bump pre-commit modules so they work with Python 3.12 Signed-off-by: Paul Guyot --- .pre-commit-config.yaml | 6 +++--- asr/Dockerfile | 14 -------------- asr/adapt-model.sh | 5 +---- 3 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 asr/Dockerfile diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba1efa2a..2e02b5b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ repos: - repo: https://github.com/pycqa/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort name: isort (python) - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.4.2 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 4.0.1 + rev: 7.0.0 hooks: - id: flake8 diff --git a/asr/Dockerfile b/asr/Dockerfile deleted file mode 100644 index 1c8a0428..00000000 --- a/asr/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM debian:9 - -# Install kaldi binaries and dependencies -RUN apt-get update \ - && apt-get install -y apt-transport-https wget curl gnupg git libfst-tools libatlas3-base sphinxbase-utils \ - && echo "deb http://goofy.zamia.org/repo-ai/debian/stretch/amd64/ ./" >/etc/apt/sources.list.d/zamia-ai.list \ - && wget -qO - http://goofy.zamia.org/repo-ai/debian/stretch/amd64/bofh.asc | apt-key add - \ - && apt-get update \ - && apt-get install -y --allow-unauthenticated python-kaldiasr python-nltools pulseaudio-utils pulseaudio \ - && apt-get clean -y - -# Checkout and configure zamia speech -RUN git clone https://github.com/pguyot/zamia-speech.git \ - && (echo "[speech]" && echo "kaldi_root = /opt/kaldi") > /root/.speechrc diff --git a/asr/adapt-model.sh b/asr/adapt-model.sh index 9a611d78..37ba7179 100755 --- a/asr/adapt-model.sh +++ b/asr/adapt-model.sh @@ -26,7 +26,4 @@ else fi DATE=`date +%Y%M%d` -if [[ "$(docker images -q zamia-speech:latest 2> /dev/null)" == "" ]]; then - docker build -t zamia-speech . -fi -docker run -it -v ${PWD}:/nabaztag-asr/ zamia-speech bash /nabaztag-asr/adapt-model-i.sh $BASE_MODEL_URL $MODEL_NAME $GRAMMAR $DICTIONARY $OUTPUT_MODEL_NAME +docker run -it -v ${PWD}:/nabaztag-asr/ pguyot/zamia-speech bash /nabaztag-asr/adapt-model-i.sh $BASE_MODEL_URL $MODEL_NAME $GRAMMAR $DICTIONARY $OUTPUT_MODEL_NAME