From 7a8558273b0d8fb8f09b12d98c4411a5fb51fb7e Mon Sep 17 00:00:00 2001 From: Tia i X570-ACE Date: Fri, 29 Nov 2024 17:50:21 +0800 Subject: [PATCH 1/4] Ka kaldi asr. --- asr-kaldi/Dockerfile | 6 ++++++ deploy/.env.template | 1 + deploy/deploy.yaml | 5 +++++ docker-compose.yml | 11 +++++++++++ 4 files changed, 23 insertions(+) create mode 100644 asr-kaldi/Dockerfile diff --git a/asr-kaldi/Dockerfile b/asr-kaldi/Dockerfile new file mode 100644 index 0000000..40958ac --- /dev/null +++ b/asr-kaldi/Dockerfile @@ -0,0 +1,6 @@ +FROM registry.hf.space/ithuan-formosan-asr-kaldi:latest + +RUN pip install gradio==4.44.1 + +EXPOSE 7860 +CMD ["python", "app.py"] diff --git a/deploy/.env.template b/deploy/.env.template index 123ddc3..b1bc1d4 100644 --- a/deploy/.env.template +++ b/deploy/.env.template @@ -1,5 +1,6 @@ # 線頂機專案網域名。若按算tī開發機試,就設定做`localhost`。 ASR_VIRTUAL_HOST={{ ASR_VIRTUAL_HOST }} +ASR_KALDI_VIRTUAL_HOST={{ ASR_KALDI_VIRTUAL_HOST }} TTS_VIRTUAL_HOST={{ TTS_VIRTUAL_HOST }} # Sentry監控事件 diff --git a/deploy/deploy.yaml b/deploy/deploy.yaml index fadf5c4..5029ebf 100644 --- a/deploy/deploy.yaml +++ b/deploy/deploy.yaml @@ -26,6 +26,11 @@ path: "{{ tsuanan_path }}/model_cache_asr" state: directory mode: '1777' + - name: 設定辨識model_cache檔案簿仔 + ansible.builtin.file: + path: "{{ tsuanan_path }}/model_cache_asr_kaldi" + state: directory + mode: '1777' - name: 設定合成model_cache檔案簿仔 ansible.builtin.file: path: "{{ tsuanan_path }}/model_cache_tts" diff --git a/docker-compose.yml b/docker-compose.yml index 988399e..da094a7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,17 @@ services: - LETSENCRYPT_HOST=${ASR_VIRTUAL_HOST:-sapolita.ithuan.tw} - LETSENCRYPT_EMAIL=ithuan@ithuan.tw restart: always + asr-kaldi: + build: ./asr-kaldi/ + volumes: + - "./model_cache_asr_kaldi:/home/user/.cache:rw" + networks: + - nginx-bridge + environment: + - VIRTUAL_HOST=${ASR_KALDI_VIRTUAL_HOST:-sapolita-kaldi.ithuan.tw} + - LETSENCRYPT_HOST=${ASR_KALDI_VIRTUAL_HOST:-sapolita-kaldi.ithuan.tw} + - LETSENCRYPT_EMAIL=ithuan@ithuan.tw + restart: always tts: build: ./tts/ volumes: From 85c13442b44e6c979f01ee8570db5f4f40a1041f Mon Sep 17 00:00:00 2001 From: Tia i X570-ACE Date: Fri, 29 Nov 2024 17:50:46 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AECD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1392535..c1e335b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: branches: only: - main - - Ka-hapsing + - Ka-kaldi jobs: include: - name: Check YAML format From da89070f595aec344b5be8425b87d3ee4c3c1bdf Mon Sep 17 00:00:00 2001 From: Tia i X570-ACE Date: Fri, 29 Nov 2024 17:53:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AECD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c1e335b..01100b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ jobs: - tox -e shellcheck - stage: deploy name: deploy - if: (type = push or type = cron) and (branch = main or branch = Ka-hapsing) + if: (type = push or type = cron) and (branch = main or branch = Ka-kaldi) install: - pip install ansible before_script: From 86f08616c3587282d8229f318654c74303b13696 Mon Sep 17 00:00:00 2001 From: Tia i X570-ACE Date: Fri, 29 Nov 2024 17:59:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AECD=E8=AE=8A=E6=95=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 01100b2..c9c4b72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,7 @@ jobs: --extra-vars "DEPLOY_HOST_USER=${DEPLOY_HOST_USER}" --extra-vars "TRAVIS_TSUKI_SSH_KEY_PATH=${TRAVIS_TSUKI_SSH_KEY_PATH}" --extra-vars "ASR_VIRTUAL_HOST=${ASR_VIRTUAL_HOST}" + --extra-vars "ASR_KALDI_VIRTUAL_HOST=${ASR_KALDI_VIRTUAL_HOST}" --extra-vars "TTS_VIRTUAL_HOST=${TTS_VIRTUAL_HOST}" --extra-vars "SENTRY_DSN=${SENTRY_DSN}" '