Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ka kaldi #7

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_install:
branches:
only:
- main
- Ka-hapsing
- Ka-kaldi
jobs:
include:
- name: Check YAML format
Expand All @@ -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:
Expand All @@ -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}"
'
6 changes: 6 additions & 0 deletions asr-kaldi/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions deploy/.env.template
Original file line number Diff line number Diff line change
@@ -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監控事件
Expand Down
5 changes: 5 additions & 0 deletions deploy/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ services:
- LETSENCRYPT_HOST=${ASR_VIRTUAL_HOST:-sapolita.ithuan.tw}
- [email protected]
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}
- [email protected]
restart: always
tts:
build: ./tts/
volumes:
Expand Down