Fangjun Kuang
Committed by GitHub

Fix CI (#2016)

@@ -160,6 +160,9 @@ jobs: @@ -160,6 +160,9 @@ jobs:
160 export GIT_LFS_SKIP_SMUDGE=1 160 export GIT_LFS_SKIP_SMUDGE=1
161 export GIT_CLONE_PROTECTION_ACTIVE=false 161 export GIT_CLONE_PROTECTION_ACTIVE=false
162 162
  163 + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
  164 + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
  165 +
163 git clone https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-apk huggingface 166 git clone https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
164 cd huggingface 167 cd huggingface
165 git fetch 168 git fetch
@@ -167,7 +170,10 @@ jobs: @@ -167,7 +170,10 @@ jobs:
167 git merge -m "merge remote" --ff origin main 170 git merge -m "merge remote" --ff origin main
168 171
169 mkdir -p audio-tagging 172 mkdir -p audio-tagging
170 - cp -v ../apks/*.apk ./audio-tagging/ 173 + d=audio-tagging/$SHERPA_ONNX_VERSION
  174 + mkdir -p $d
  175 + cp -v ../apks/*.apk ./$d
  176 +
171 git status 177 git status
172 git lfs track "*.apk" 178 git lfs track "*.apk"
173 git add . 179 git add .
@@ -110,13 +110,6 @@ jobs: @@ -110,13 +110,6 @@ jobs:
110 gcc -o offline-tts-c-api $(pkg-config --cflags sherpa-onnx) ./offline-tts-c-api.c $(pkg-config --libs sherpa-onnx) 110 gcc -o offline-tts-c-api $(pkg-config --cflags sherpa-onnx) ./offline-tts-c-api.c $(pkg-config --libs sherpa-onnx)
111 ./offline-tts-c-api --help 111 ./offline-tts-c-api --help
112 112
113 - - name: Test offline TTS C API  
114 - shell: bash  
115 - run: |  
116 - export PATH=$PWD/c-api-examples:$PATH  
117 - export EXE=offline-tts-c-api  
118 - .github/scripts/test-offline-tts.sh  
119 -  
120 - name: Test online transducer (C API) 113 - name: Test online transducer (C API)
121 shell: bash 114 shell: bash
122 run: | 115 run: |
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 #define SHERPA_ONNX_CSRC_OFFLINE_SPEECH_DENOISER_GTCRN_IMPL_H_ 6 #define SHERPA_ONNX_CSRC_OFFLINE_SPEECH_DENOISER_GTCRN_IMPL_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
  9 +#include <cmath>
9 #include <memory> 10 #include <memory>
10 #include <utility> 11 #include <utility>
11 #include <vector> 12 #include <vector>
@@ -54,7 +54,7 @@ class OfflineSpeechDenoiserGtcrnModel::Impl { @@ -54,7 +54,7 @@ class OfflineSpeechDenoiserGtcrnModel::Impl {
54 return meta_; 54 return meta_;
55 } 55 }
56 56
57 - States GetInitStates() const { 57 + States GetInitStates() {
58 Ort::Value conv_cache = Ort::Value::CreateTensor<float>( 58 Ort::Value conv_cache = Ort::Value::CreateTensor<float>(
59 allocator_, meta_.conv_cache_shape.data(), 59 allocator_, meta_.conv_cache_shape.data(),
60 meta_.conv_cache_shape.size()); 60 meta_.conv_cache_shape.size());