From c526c3e9bf4374f58962e2b80d272e78e2a44ded Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Mon, 6 Dec 2021 21:00:55 +0100 Subject: [PATCH 1/5] [ci] Rehost prod model in own repo and clean-up code --- .github/workflows/build-and-test.yml | 89 ++++++---------------- ci_scripts/all-utils.sh | 5 +- ci_scripts/all-vars.sh | 2 - ci_scripts/asserts.sh | 84 ++++++-------------- ci_scripts/cpp_tflite-tests-prod.sh | 4 +- ci_scripts/cpp_tflite-tests.sh | 3 +- ci_scripts/cppwin_tflite-tests.sh | 3 +- ci_scripts/electronjs_tflite-tests-prod.sh | 5 +- ci_scripts/electronjs_tflite-tests.sh | 4 +- ci_scripts/node_tflite-tests-prod.sh | 5 +- ci_scripts/node_tflite-tests.sh | 4 +- ci_scripts/python_tflite-tests-prod.sh | 5 +- ci_scripts/python_tflite-tests.sh | 4 +- 13 files changed, 56 insertions(+), 161 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 36b8f8049..f14f5935f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -11,6 +11,7 @@ env: CI_TASK_DIR: ${{ github.workspace }} CI_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts EXPECTED_TENSORFLOW_VERSION: "TensorFlow: v2.3.0-14-g4bdd3955115" + STT_PROD_MODEL: https://github.com/coqui-ai/STT/releases/download/v0.10.0-alpha.7/output_graph.tflite # macOS specific MACOSX_DEPLOYMENT_TARGET: "10.10" @@ -541,9 +542,7 @@ jobs: bitrate: ["8k", "16k"] env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -581,9 +580,7 @@ jobs: bitrate: ["8k", "16k"] env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -627,9 +624,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -680,9 +675,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -1491,9 +1484,7 @@ jobs: bitrate: ["8k", "16k"] env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -1511,7 +1502,7 @@ jobs: path: ${{ env.CI_TMP_DIR }} if: matrix.models == 'test' - run: | - ls -hal ${{ env.CI_TMP_DIR }}/ + ls -halR ${{ env.CI_TMP_DIR }}/ if: matrix.models == 'test' - uses: ./.github/actions/run-tests with: @@ -1530,9 +1521,7 @@ jobs: bitrate: ["8k", "16k"] env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -1574,9 +1563,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -1624,9 +1611,7 @@ jobs: bitrate: ["16k"] env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -1979,7 +1964,7 @@ jobs: if: ${{ github.event_name == 'pull_request' }} env: CI_TMP_DIR: tmp/ - STT_TEST_MODEL: tmp/output_graph.pb + STT_TEST_MODEL: tmp/output_graph.tflite steps: - uses: msys2/setup-msys2@v2 with: @@ -2032,9 +2017,7 @@ jobs: bitrate: ["8k", "16k"] env: CI_TMP_DIR: tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: tmp/output_graph.pb + STT_TEST_MODEL: tmp/output_graph.tflite steps: - uses: msys2/setup-msys2@v2 with: @@ -2086,9 +2069,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: tmp/output_graph.pb + STT_TEST_MODEL: tmp/output_graph.tflite steps: - uses: msys2/setup-msys2@v2 with: @@ -2149,9 +2130,7 @@ jobs: bitrate: ["16k"] env: CI_TMP_DIR: tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: tmp/output_graph.pb + STT_TEST_MODEL: tmp/output_graph.tflite steps: - uses: msys2/setup-msys2@v2 with: @@ -2259,9 +2238,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -2312,9 +2289,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -2367,9 +2342,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -2418,9 +2391,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite steps: - uses: actions/checkout@v2 with: @@ -2474,9 +2445,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: tmp/output_graph.pb + STT_TEST_MODEL: tmp/output_graph.tflite steps: - uses: msys2/setup-msys2@v2 with: @@ -2538,9 +2507,7 @@ jobs: fail-fast: false env: CI_TMP_DIR: tmp/ - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: tmp/output_graph.pb + STT_TEST_MODEL: tmp/output_graph.tflite steps: - uses: msys2/setup-msys2@v2 with: @@ -3084,9 +3051,7 @@ jobs: env: CI_TMP_DIR: ${{ github.workspace }}/tmp DEBIAN_FRONTEND: "noninteractive" - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }} steps: - name: "Install QEMU" @@ -3145,9 +3110,7 @@ jobs: env: CI_TMP_DIR: ${{ github.workspace }}/tmp DEBIAN_FRONTEND: "noninteractive" - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }} PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple https://lissyx.github.io/deepspeech-python-wheels/" steps: @@ -3208,9 +3171,7 @@ jobs: env: CI_TMP_DIR: ${{ github.workspace }}/tmp DEBIAN_FRONTEND: "noninteractive" - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }} steps: - name: "Install QEMU" @@ -3271,9 +3232,7 @@ jobs: env: CI_TMP_DIR: ${{ github.workspace }}/tmp DEBIAN_FRONTEND: "noninteractive" - STT_PROD_MODEL: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pb - STT_PROD_MODEL_MMAP: https://github.com/reuben/STT/releases/download/v0.7.0-alpha.3/output_graph.pbmm - STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.pb + STT_TEST_MODEL: ${{ github.workspace }}/tmp/output_graph.tflite SYSTEM_RASPBIAN: ${{ github.workspace }}/chroot-${{ matrix.arch }} DISPLAY: ":99.0" steps: diff --git a/ci_scripts/all-utils.sh b/ci_scripts/all-utils.sh index 7860d978a..5a3ff1417 100755 --- a/ci_scripts/all-utils.sh +++ b/ci_scripts/all-utils.sh @@ -25,9 +25,6 @@ download_model_prod() { local _model_source_file=$(basename "${model_source}") ${WGET} "${model_source}" -O - | gunzip --force > "${CI_TMP_DIR}/${_model_source_file}" - - local _model_source_mmap_file=$(basename "${model_source_mmap}") - ${WGET} "${model_source_mmap}" -O - | gunzip --force > "${CI_TMP_DIR}/${_model_source_mmap_file}" } download_data() @@ -43,7 +40,7 @@ download_material() { download_data - ls -hal ${CI_TMP_DIR}/${model_name} ${CI_TMP_DIR}/${model_name_mmap} ${CI_TMP_DIR}/LDC93S1*.wav + ls -hal ${CI_TMP_DIR}/${model_name} ${CI_TMP_DIR}/LDC93S1*.wav } maybe_install_xldd() diff --git a/ci_scripts/all-vars.sh b/ci_scripts/all-vars.sh index 8657b9dcf..9ecd42020 100755 --- a/ci_scripts/all-vars.sh +++ b/ci_scripts/all-vars.sh @@ -80,7 +80,5 @@ fi model_source="${STT_TEST_MODEL}" model_name="$(basename "${model_source}")" -model_name_mmap="$(basename -s ".pb" "${model_source}").pbmm" -model_source_mmap="$(dirname "${model_source}")/${model_name_mmap}" ldc93s1_sample_filename='' diff --git a/ci_scripts/asserts.sh b/ci_scripts/asserts.sh index 3eba3d2d0..1d208c586 100755 --- a/ci_scripts/asserts.sh +++ b/ci_scripts/asserts.sh @@ -367,12 +367,7 @@ run_netframework_inference_tests() assert_working_ldc93s1 "${phrase_pbmodel_nolm}" "$?" set +e - phrase_pbmodel_nolm=$(STTConsole.exe --model ${CI_TMP_DIR}/${model_name_mmap} --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) - set -e - assert_working_ldc93s1 "${phrase_pbmodel_nolm}" "$?" - - set +e - phrase_pbmodel_withlm=$(STTConsole.exe --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm=$(STTConsole.exe --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) set -e assert_working_ldc93s1_lm "${phrase_pbmodel_withlm}" "$?" } @@ -390,12 +385,7 @@ run_electronjs_inference_tests() assert_working_ldc93s1 "${phrase_pbmodel_nolm}" "$?" set +e - phrase_pbmodel_nolm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) - set -e - assert_working_ldc93s1 "${phrase_pbmodel_nolm}" "$?" - - set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) set -e assert_working_ldc93s1_lm "${phrase_pbmodel_withlm}" "$?" } @@ -420,13 +410,7 @@ run_basic_inference_tests() assert_correct_ldc93s1 "${phrase_pbmodel_nolm}" "$status" set +e - phrase_pbmodel_nolm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) - status=$? - set -e - assert_correct_ldc93s1 "${phrase_pbmodel_nolm}" "$status" - - set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_correct_ldc93s1_lm "${phrase_pbmodel_withlm}" "$status" @@ -437,13 +421,13 @@ run_all_inference_tests() run_basic_inference_tests set +e - phrase_pbmodel_nolm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_nolm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name} --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_correct_ldc93s1 "${phrase_pbmodel_nolm_stereo_44k}" "$status" set +e - phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_correct_ldc93s1_lm "${phrase_pbmodel_withlm_stereo_44k}" "$status" @@ -451,12 +435,12 @@ run_all_inference_tests() # Run down-sampling warning test only when we actually perform downsampling if [ "${ldc93s1_sample_filename}" != "LDC93S1_pcms16le_1_8000.wav" ]; then set +e - phrase_pbmodel_nolm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) + phrase_pbmodel_nolm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name} --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) set -e assert_correct_warning_upsampling "${phrase_pbmodel_nolm_mono_8k}" set +e - phrase_pbmodel_withlm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) + phrase_pbmodel_withlm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) set -e assert_correct_warning_upsampling "${phrase_pbmodel_withlm_mono_8k}" fi; @@ -468,7 +452,7 @@ run_prod_concurrent_stream_tests() set +e output=$(python3 ${CI_TMP_DIR}/test_sources/concurrent_streams.py \ - --model ${CI_TMP_DIR}/${model_name_mmap} \ + --model ${CI_TMP_DIR}/${model_name} \ --scorer ${CI_TMP_DIR}/kenlm.scorer \ --audio1 ${CI_TMP_DIR}/LDC93S1_pcms16le_1_16000.wav \ --audio2 ${CI_TMP_DIR}/new-home-in-the-stars-16k.wav 2>${CI_TMP_DIR}/stderr) @@ -493,13 +477,7 @@ run_prod_inference_tests() assert_correct_ldc93s1_prodmodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) - status=$? - set -e - assert_correct_ldc93s1_prodmodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" - - set +e - phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_correct_ldc93s1_prodmodel_stereo_44k "${phrase_pbmodel_withlm_stereo_44k}" "$status" @@ -507,7 +485,7 @@ run_prod_inference_tests() # Run down-sampling warning test only when we actually perform downsampling if [ "${ldc93s1_sample_filename}" != "LDC93S1_pcms16le_1_8000.wav" ]; then set +e - phrase_pbmodel_withlm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) + phrase_pbmodel_withlm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) set -e assert_correct_warning_upsampling "${phrase_pbmodel_withlm_mono_8k}" fi; @@ -526,13 +504,7 @@ run_electronjs_prod_inference_tests() assert_working_ldc93s1_prodmodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) - status=$? - set -e - assert_working_ldc93s1_prodmodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" - - set +e - phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_working_ldc93s1_prodmodel_stereo_44k "${phrase_pbmodel_withlm_stereo_44k}" "$status" @@ -549,13 +521,7 @@ run_prodtflite_inference_tests() assert_correct_ldc93s1_prodtflitemodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) - status=$? - set -e - assert_correct_ldc93s1_prodtflitemodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" - - set +e - phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_correct_ldc93s1_prodtflitemodel_stereo_44k "${phrase_pbmodel_withlm_stereo_44k}" "$status" @@ -563,7 +529,7 @@ run_prodtflite_inference_tests() # Run down-sampling warning test only when we actually perform downsampling if [ "${ldc93s1_sample_filename}" != "LDC93S1_pcms16le_1_8000.wav" ]; then set +e - phrase_pbmodel_withlm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) + phrase_pbmodel_withlm_mono_8k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_1_8000.wav 2>&1 1>/dev/null) set -e assert_correct_warning_upsampling "${phrase_pbmodel_withlm_mono_8k}" fi; @@ -582,13 +548,7 @@ run_electronjs_prodtflite_inference_tests() assert_working_ldc93s1_prodtflitemodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} 2>${CI_TMP_DIR}/stderr) - status=$? - set -e - assert_working_ldc93s1_prodtflitemodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" - - set +e - phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) + phrase_pbmodel_withlm_stereo_44k=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/LDC93S1_pcms16le_2_44100.wav 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_working_ldc93s1_prodtflitemodel_stereo_44k "${phrase_pbmodel_withlm_stereo_44k}" "$status" @@ -613,7 +573,7 @@ run_hotword_tests() { DS_BINARY_FILE=${DS_BINARY_FILE:-"stt"} set +e - hotwords_decode=$(${DS_BINARY_PREFIX}${DS_BINARY_FILE} --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --hot_words "foo:0.0,bar:-0.1" 2>${CI_TMP_DIR}/stderr) + hotwords_decode=$(${DS_BINARY_PREFIX}${DS_BINARY_FILE} --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --hot_words "foo:0.0,bar:-0.1" 2>${CI_TMP_DIR}/stderr) status=$? set -e assert_working_ldc93s1_lm "${hotwords_decode}" "$status" @@ -631,7 +591,7 @@ run_android_hotword_tests() run_cpp_only_inference_tests() { set +e - phrase_pbmodel_withlm_intermediate_decode=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 1280 2>${CI_TMP_DIR}/stderr | tail -n 1) + phrase_pbmodel_withlm_intermediate_decode=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 1280 2>${CI_TMP_DIR}/stderr | tail -n 1) status=$? set -e assert_correct_ldc93s1_lm "${phrase_pbmodel_withlm_intermediate_decode}" "$status" @@ -640,13 +600,13 @@ run_cpp_only_inference_tests() run_js_streaming_inference_tests() { set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 2>${CI_TMP_DIR}/stderr | tail -n 1) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 2>${CI_TMP_DIR}/stderr | tail -n 1) status=$? set -e assert_correct_ldc93s1_lm "${phrase_pbmodel_withlm}" "$status" set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream --extended 2>${CI_TMP_DIR}/stderr | tail -n 1) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream --extended 2>${CI_TMP_DIR}/stderr | tail -n 1) status=$? set -e assert_correct_ldc93s1_lm "${phrase_pbmodel_withlm}" "$status" @@ -656,14 +616,14 @@ run_js_streaming_prod_inference_tests() { local _bitrate=$1 set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 2>${CI_TMP_DIR}/stderr | tail -n 1) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 2>${CI_TMP_DIR}/stderr | tail -n 1) status=$? set -e assert_correct_ldc93s1_prodmodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" local _bitrate=$1 set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream --extended 2>${CI_TMP_DIR}/stderr | tail -n 1) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream --extended 2>${CI_TMP_DIR}/stderr | tail -n 1) status=$? set -e assert_correct_ldc93s1_prodmodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" @@ -673,14 +633,14 @@ run_js_streaming_prodtflite_inference_tests() { local _bitrate=$1 set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 2>${CI_TMP_DIR}/stderr | tail -n 1) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream 2>${CI_TMP_DIR}/stderr | tail -n 1) status=$? set -e assert_correct_ldc93s1_prodtflitemodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" local _bitrate=$1 set +e - phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name_mmap} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream --extended 2>${CI_TMP_DIR}/stderr | tail -n 1) + phrase_pbmodel_withlm=$(stt --model ${CI_TMP_DIR}/${model_name} --scorer ${CI_TMP_DIR}/kenlm.scorer --audio ${CI_TMP_DIR}/${ldc93s1_sample_filename} --stream --extended 2>${CI_TMP_DIR}/stderr | tail -n 1) status=$? set -e assert_correct_ldc93s1_prodtflitemodel "${phrase_pbmodel_withlm}" "$status" "${_bitrate}" diff --git a/ci_scripts/cpp_tflite-tests-prod.sh b/ci_scripts/cpp_tflite-tests-prod.sh index c9a231d34..c03794c5a 100755 --- a/ci_scripts/cpp_tflite-tests-prod.sh +++ b/ci_scripts/cpp_tflite-tests-prod.sh @@ -9,10 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_PROD_MODEL//.pb/.tflite} +model_source=${STT_PROD_MODEL} model_name=$(basename "${model_source}") -model_name_mmap=$(basename "${model_source}") -model_source_mmap=${STT_PROD_MODEL_MMAP//.pbmm/.tflite} export DATA_TMP_DIR=${CI_TMP_DIR} download_model_prod diff --git a/ci_scripts/cpp_tflite-tests.sh b/ci_scripts/cpp_tflite-tests.sh index f5c7ebb42..eabad44a7 100755 --- a/ci_scripts/cpp_tflite-tests.sh +++ b/ci_scripts/cpp_tflite-tests.sh @@ -9,9 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_TEST_MODEL//.pb/.tflite} +model_source=${STT_TEST_MODEL} model_name=$(basename "${model_source}") -model_name_mmap=$(basename "${model_source}") export DATA_TMP_DIR=${CI_TMP_DIR} download_material "${CI_TMP_DIR}/ds" diff --git a/ci_scripts/cppwin_tflite-tests.sh b/ci_scripts/cppwin_tflite-tests.sh index b6df0ead3..2e55a57fb 100755 --- a/ci_scripts/cppwin_tflite-tests.sh +++ b/ci_scripts/cppwin_tflite-tests.sh @@ -9,9 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_TEST_MODEL//.pb/.tflite} +model_source=${STT_TEST_MODEL} model_name=$(basename "${model_source}") -model_name_mmap=$(basename "${model_source}") export DATA_TMP_DIR=${CI_TMP_DIR} download_material "${CI_TMP_DIR}/ds" diff --git a/ci_scripts/electronjs_tflite-tests-prod.sh b/ci_scripts/electronjs_tflite-tests-prod.sh index 6d1a0b55f..a5d931d63 100755 --- a/ci_scripts/electronjs_tflite-tests-prod.sh +++ b/ci_scripts/electronjs_tflite-tests-prod.sh @@ -9,11 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_PROD_MODEL//.pb/.tflite} +model_source=${STT_PROD_MODEL} model_name=$(basename "${model_source}") -model_source_mmap=${STT_PROD_MODEL_MMAP//.pbmm/.tflite} -model_name_mmap=$(basename "${model_source}") - download_model_prod download_data diff --git a/ci_scripts/electronjs_tflite-tests.sh b/ci_scripts/electronjs_tflite-tests.sh index ed5c3376b..90189f389 100755 --- a/ci_scripts/electronjs_tflite-tests.sh +++ b/ci_scripts/electronjs_tflite-tests.sh @@ -9,10 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_TEST_MODEL//.pb/.tflite} +model_source=${STT_TEST_MODEL} model_name=$(basename "${model_source}") -model_name_mmap=$(basename "${model_source}") - download_data node --version diff --git a/ci_scripts/node_tflite-tests-prod.sh b/ci_scripts/node_tflite-tests-prod.sh index c87ffb967..f43bf86b1 100755 --- a/ci_scripts/node_tflite-tests-prod.sh +++ b/ci_scripts/node_tflite-tests-prod.sh @@ -9,11 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_PROD_MODEL//.pb/.tflite} +model_source=${STT_PROD_MODEL} model_name=$(basename "${model_source}") -model_source_mmap=${STT_PROD_MODEL_MMAP//.pbmm/.tflite} -model_name_mmap=$(basename "${model_source}") - download_model_prod download_data diff --git a/ci_scripts/node_tflite-tests.sh b/ci_scripts/node_tflite-tests.sh index 4f78d07c1..4698f993c 100755 --- a/ci_scripts/node_tflite-tests.sh +++ b/ci_scripts/node_tflite-tests.sh @@ -9,10 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_TEST_MODEL//.pb/.tflite} +model_source=${STT_TEST_MODEL} model_name=$(basename "${model_source}") -model_name_mmap=$(basename "${model_source}") - download_data node --version diff --git a/ci_scripts/python_tflite-tests-prod.sh b/ci_scripts/python_tflite-tests-prod.sh index 80cb3f410..d13da4aaa 100755 --- a/ci_scripts/python_tflite-tests-prod.sh +++ b/ci_scripts/python_tflite-tests-prod.sh @@ -9,11 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_PROD_MODEL//.pb/.tflite} +model_source=${STT_PROD_MODEL} model_name=$(basename "${model_source}") -model_name_mmap=$(basename "${model_source}") -model_source_mmap=${STT_PROD_MODEL_MMAP//.pbmm/.tflite} - download_model_prod download_material diff --git a/ci_scripts/python_tflite-tests.sh b/ci_scripts/python_tflite-tests.sh index 31879933a..f61261d3d 100755 --- a/ci_scripts/python_tflite-tests.sh +++ b/ci_scripts/python_tflite-tests.sh @@ -9,10 +9,8 @@ source $(dirname "$0")/asserts.sh bitrate=$1 set_ldc_sample_filename "${bitrate}" -model_source=${STT_TEST_MODEL//.pb/.tflite} +model_source=${STT_TEST_MODEL} model_name=$(basename "${model_source}") -model_name_mmap=$(basename "${model_source}") - download_data export_py_bin_path From b11ae17df9307b51c885970e728a94083b39c300 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Mon, 6 Dec 2021 20:21:42 +0100 Subject: [PATCH 2/5] [notebook tests] Use workflow-built decoder pkg --- .github/workflows/build-and-test.yml | 16 ++++++++++++++-- ci_scripts/notebook-tests.sh | 5 ----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f14f5935f..8a791cfe9 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -716,6 +716,7 @@ jobs: timeout-minutes: 5 python-notebooks-tests: name: "Lin|Python notebook tests" + needs: ["build-ctc-decoder-Linux"] runs-on: ubuntu-20.04 if: ${{ github.event_name == 'pull_request' }} steps: @@ -725,10 +726,21 @@ jobs: - uses: actions/setup-python@v2 with: python-version: 3.7 + - uses: actions/download-artifact@v2 + with: + name: "coqui_stt_ctcdecoder-Linux-3.7.whl" + - run: | + sudo apt-get install -y --no-install-recommends libopusfile0 libopus-dev libopusfile-dev + - run: | + python --version + python -m pip --version + - run: | + python -m pip install --upgrade pip setuptools wheel jupyter + - run: | + python -m pip install coqui_stt_ctcdecoder-*-cp37-cp37m-*_x86_64.whl + DS_NODECODER=y python -m pip install --upgrade . - name: Run python notebooks run: | - sudo apt-get install -y --no-install-recommends libopusfile0 libopus-dev libopusfile-dev - python -m pip install jupyter ./ci_scripts/notebook-tests.sh training-basic-tests: name: "Lin|Basic training tests" diff --git a/ci_scripts/notebook-tests.sh b/ci_scripts/notebook-tests.sh index 3872b14c9..c89788306 100755 --- a/ci_scripts/notebook-tests.sh +++ b/ci_scripts/notebook-tests.sh @@ -4,11 +4,6 @@ set -xe source $(dirname "$0")/all-vars.sh source $(dirname "$0")/all-utils.sh -set -o pipefail -pip install --upgrade pip setuptools wheel | cat -pip install --upgrade . | cat -set +o pipefail - for python_notebook in ./notebooks/*.ipynb; do time jupyter nbconvert --to notebook --execute $python_notebook done From 5d58b6afb94d5b14c2932a6e2cb0e7fa5fb5f646 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Mon, 6 Dec 2021 20:24:33 +0100 Subject: [PATCH 3/5] [notebook tests] Test notebooks with published decoder pkg --- .github/workflows/build-and-test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 8a791cfe9..e9ed9dc19 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1108,6 +1108,26 @@ jobs: name: '' # use filename path: "*.whl" release-tag: ${{ needs.create-release.outputs.release-tag }} + python-notebooks-tests-production: + name: "Lin|Python notebook tests with PyPI package" + needs: [twine-upload-decoder] + runs-on: ubuntu-20.04 + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + - uses: actions/setup-python@v2 + with: + python-version: 3.7 + - run: | + sudo apt-get install -y --no-install-recommends libopusfile0 libopus-dev libopusfile-dev + - run: | + python -m pip install -U pip setuptools wheel jupyter + python -m pip install . + - name: Run python notebooks + run: | + ./ci_scripts/notebook-tests.sh npmjs-publish: name: "Upload STT packages to npmjs.com" runs-on: ubuntu-20.04 From be0c435cc34dcf97773051e5486f9d1a7744e5d5 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Fri, 3 Dec 2021 17:42:30 +0100 Subject: [PATCH 4/5] [release] Update release notes for v1.1.0 --- RELEASE_NOTES.md | 82 +++++++++++------------------------------------- 1 file changed, 18 insertions(+), 64 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2dccf4d24..79e581a7c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,61 +1,32 @@ # General -This is the 1.0.0 release for Coqui STT, the deep learning toolkit for speech-to-text. In accordance with [semantic versioning](https://semver.org/), this version is not completely backwards compatible with previous versions. The compatibility guarantees of our semantic versioning cover the inference APIs: the C API and all the official language bindings: Python, Node.JS/ElectronJS and Android. You can get started today with Coqui STT 1.0.0 by following the steps in our [documentation](https://stt.readthedocs.io/). +This is the 1.1.0 release for Coqui STT, the deep learning toolkit for speech-to-text. In accordance with [semantic versioning](https://semver.org/), this version is not completely backwards compatible with previous versions. The compatibility guarantees of our semantic versioning cover the deployment APIs: the C API and all the official language bindings: Python, Node.JS/ElectronJS and Java/Android. You can get started today with Coqui STT 1.1.0 by following the steps in our [documentation](https://stt.readthedocs.io/). -This release includes pre-trained English models, available in the Coqui Model Zoo: - - - [Coqui English STT v1.0.0-huge-vocab](https://coqui.ai/english/coqui/v1.0.0-huge-vocab) - - [Coqui English STT v1.0.0-yesno](https://coqui.ai/english/coqui/v1.0.0-yesno) - - [Coqui English STT v1.0.0-large-vocab](https://coqui.ai/english/coqui/v1.0.0-large-vocab) - - [Coqui English STT v1.0.0-digits](https://coqui.ai/english/coqui/v1.0.0-digits) - -all under the Apache 2.0 license. - -The acoustic models were trained on American English data with synthetic noise augmentation. The model achieves a 4.5% word error rate on the [LibriSpeech clean test corpus](http://www.openslr.org/12) and 13.6% word error rate on the [LibriSpeech other test corpus](http://www.openslr.org/12) with the largest release language model. - -Note that the model currently performs best in low-noise environments with clear recordings. This does not mean the model cannot be used outside of these conditions, but that accuracy may be lower. Some users may need to further fine tune the model to meet their intended use-case. +Compatible pre-trained models are available in the [Coqui Model Zoo](https://coqui.ai/models). We also include example audio files: -[audio-1.0.0.tar.gz](https://github.com/coqui-ai/STT/releases/download/v1.0.0/audio-1.0.0.tar.gz) +[audio-1.1.0.tar.gz](https://github.com/coqui-ai/STT/releases/download/v1.1.0/audio-1.1.0.tar.gz) -which can be used to test the engine, and checkpoint files for the English model: +which can be used to test the engine, and checkpoint files for the English model (which are identical to the 1.0.0 checkpoint and provided here for convenience purposes): -[coqui-stt-1.0.0-checkpoint.tar.gz](https://github.com/coqui-ai/STT/releases/download/v1.0.0/coqui-stt-1.0.0-checkpoint.tar.gz) +[coqui-stt-1.1.0-checkpoint.tar.gz](https://github.com/coqui-ai/STT/releases/download/v1.1.0/coqui-stt-1.1.0-checkpoint.tar.gz) which are under the Apache 2.0 license and can be used as the basis for further fine-tuning. Finally this release also includes a source code tarball: -[v1.0.0.tar.gz](https://github.com/coqui-ai/STT/archive/v1.0.0.tar.gz) +[v1.1.0.tar.gz](https://github.com/coqui-ai/STT/archive/v1.1.0.tar.gz) Under the [MPL-2.0 license](https://www.mozilla.org/en-US/MPL/2.0/). Note that this tarball is for archival purposes only since GitHub does not include submodules in the automatic tarballs. For usage and development with the source code, clone the repository using Git, following our [documentation](https://stt.readthedocs.io/). - # Notable changes - - Removed support for protocol buffer input in native client and consolidated all packages under a single "STT" name accepting TFLite inputs - - Added programmatic interface to training code and example Jupyter Notebooks, including how to train with Common Voice data - - Added transparent handling of mixed sample rates and stereo audio in training inputs - - Moved CI setup to GitHub Actions, making code contributions easier to test - - Added configuration management via Coqpit, providing a more flexible config interface that's compatible with Coqui TTS - - Handle Opus audio files transparently in training inputs - - Added support for automatic dataset subset splitting - - Added support for automatic alphabet generation and loading - - Started publishing the training code CI for a faster notebook setup - - Refactor training code into self-contained modules and deprecate train.py as universal entry point for training - -# Training Regimen + Hyperparameters for fine-tuning - -The hyperparameters used to train the model are useful for fine tuning. Thus, we document them here along with the training regimen, hardware used (a server with 8 NVIDIA A100 GPUs each with 40GB of VRAM), along with the full training hyperparameters. The full training configuration in JSON format is available [here](https://gist.github.com/reuben/6ced6a8b41e3d0849dafb7cae301e905). - -The datasets used were: - - Common Voice 7.0 (with custom train/dev/test splits) - - Multilingual LibriSpeech (English, Opus) - - LibriSpeech - -The optimal `lm_alpha` and `lm_beta` values with respect to the Common Voice 7.0 (custom Coqui splits) and a large vocabulary language model: - - - lm_alpha: 0.5891777425167632 - - lm_beta: 0.6619145283338659 + - Package missing dependencies with Android AAR packages + - Fix evaluate_tflite.py script to use new Coqpit-based config handling + - Use export beam width by default in evaluation reports + - Integrate lexicon-constrained and lexicon-free Flashlight decoders for CTC and ASG acoustic models in decoder package + - Update supported NodeJS versions to current supported releases: 12, 14, and 16 + - Update supported ElectronJS versions to current supported releases: 12, 13, 14 and 15 + - Improved and packaged VAD transcription module in the training package (coqui_stt_training.transcribe) # Documentation @@ -67,29 +38,12 @@ Documentation is available on [stt.readthedocs.io](https://stt.readthedocs.io/). 3. [Gitter](https://gitter.im/coqui-ai/) - You can also join our Gitter chat. 4. [Issues](https://github.com/coqui-ai/STT/issues) - If you have discussed a problem and identified a bug in 🐸STT, or if you have a feature request, please open an issue in our repo. Please make sure you search for an already existing issue beforehand! -# Contributors to 1.0.0 release - - - Alexandre Lissy - - Anon-Artist - - Anton Yaroshenko - - Catalin Voss - - CatalinVoss - - dag7dev - - Dustin Zubke - - Eren Gölge - - Erik Ziegler - - Francis Tyers - - Ideefixze - - Ilnar Salimzianov - - imrahul3610 - - Jeremiah Rose +# Contributors to 1.1.0 release + + - Josh Meyer - - Kathy Reid - - Kelly Davis - - Kenneth Heafield - - NanoNabla - - Neil Stoker + - Julian Darley + - Leon Kiefer - Reuben Morais - - zaptrem We’d also like to thank all the members of our [Gitter chat room](https://gitter.im/coqui-ai/STT) who have been helping to shape this release! From 8aa2b13e987e2f397b6b6b3ca1ae81c7ebac72d1 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Fri, 3 Dec 2021 17:42:49 +0100 Subject: [PATCH 5/5] [release] Bump version to v1.1.0 --- training/coqui_stt_training/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/training/coqui_stt_training/VERSION b/training/coqui_stt_training/VERSION index 769b5e8d1..9084fa2f7 100644 --- a/training/coqui_stt_training/VERSION +++ b/training/coqui_stt_training/VERSION @@ -1 +1 @@ -1.1.0-alpha.1 +1.1.0