Committed by
GitHub
Fix publishing har packages for HarmonyOS (#1576)
正在显示
6 个修改的文件
包含
95 行增加
和
5 行删除
| @@ -92,6 +92,12 @@ jobs: | @@ -92,6 +92,12 @@ jobs: | ||
| 92 | x86_64-unknown-linux-ohos-clang++ --version | 92 | x86_64-unknown-linux-ohos-clang++ --version |
| 93 | x86_64-unknown-linux-ohos-clang --version | 93 | x86_64-unknown-linux-ohos-clang --version |
| 94 | 94 | ||
| 95 | + - name: Install tree | ||
| 96 | + shell: bash | ||
| 97 | + run: | | ||
| 98 | + sudo apt-get update -q | ||
| 99 | + sudo apt-get install -y -q tree | ||
| 100 | + | ||
| 95 | - name: Build libraries | 101 | - name: Build libraries |
| 96 | shell: bash | 102 | shell: bash |
| 97 | run: | | 103 | run: | |
| @@ -113,6 +119,9 @@ jobs: | @@ -113,6 +119,9 @@ jobs: | ||
| 113 | 119 | ||
| 114 | pushd harmony-os/SherpaOnnxHar | 120 | pushd harmony-os/SherpaOnnxHar |
| 115 | 121 | ||
| 122 | + cp -fv ../../LICENSE ./sherpa_onnx | ||
| 123 | + cp -fv ../../CHANGELOG.md ./sherpa_onnx | ||
| 124 | + | ||
| 116 | hvigorw --mode module -p product=default -p module=sherpa_onnx@default assembleHar --analyze=normal --parallel --incremental --no-daemon | 125 | hvigorw --mode module -p product=default -p module=sherpa_onnx@default assembleHar --analyze=normal --parallel --incremental --no-daemon |
| 117 | ls -lh ./sherpa_onnx/build/default/outputs/default/sherpa_onnx.har | 126 | ls -lh ./sherpa_onnx/build/default/outputs/default/sherpa_onnx.har |
| 118 | cp -v ./sherpa_onnx/build/default/outputs/default/sherpa_onnx.har ../../ | 127 | cp -v ./sherpa_onnx/build/default/outputs/default/sherpa_onnx.har ../../ |
| @@ -121,6 +130,30 @@ jobs: | @@ -121,6 +130,30 @@ jobs: | ||
| 121 | 130 | ||
| 122 | ls -lh *.har | 131 | ls -lh *.har |
| 123 | 132 | ||
| 133 | + - name: View Har | ||
| 134 | + shell: bash | ||
| 135 | + run: | | ||
| 136 | + file sherpa_onnx.har | ||
| 137 | + tar xvf sherpa_onnx.har | ||
| 138 | + | ||
| 139 | + cd package | ||
| 140 | + ls -lh | ||
| 141 | + | ||
| 142 | + ls -lh libs | ||
| 143 | + echo "---libs/x86_64---" | ||
| 144 | + ls -lh libs/x86_64 | ||
| 145 | + | ||
| 146 | + echo "---libs/arm64-v8a---" | ||
| 147 | + ls -lh libs/arm64-v8a | ||
| 148 | + | ||
| 149 | + echo "---src/main/ets/components---" | ||
| 150 | + ls -lh src/main/ets/components/ | ||
| 151 | + | ||
| 152 | + echo "---src/main/cpp/types/libsherpa_onnx/---" | ||
| 153 | + ls -lh src/main/cpp/types/libsherpa_onnx/ | ||
| 154 | + | ||
| 155 | + tree . | ||
| 156 | + | ||
| 124 | - name: Collect result | 157 | - name: Collect result |
| 125 | shell: bash | 158 | shell: bash |
| 126 | run: | | 159 | run: | |
| @@ -16,3 +16,22 @@ hvigorw --mode module -p product=default -p module=sherpa_onnx@default assembleH | @@ -16,3 +16,22 @@ hvigorw --mode module -p product=default -p module=sherpa_onnx@default assembleH | ||
| 16 | 16 | ||
| 17 | ls -lh ./sherpa_onnx/build/default/outputs/default/sherpa_onnx.har | 17 | ls -lh ./sherpa_onnx/build/default/outputs/default/sherpa_onnx.har |
| 18 | ``` | 18 | ``` |
| 19 | + | ||
| 20 | +Pre-built `har` packages can be found at | ||
| 21 | +<https://huggingface.co/csukuangfj/sherpa-onnx-harmony-os/tree/main/har> | ||
| 22 | + | ||
| 23 | +You can also download it using | ||
| 24 | +``` | ||
| 25 | +wget https://ohpm.openharmony.cn/ohpm/sherpa_onnx/-/sherpa_onnx-1.10.32.har | ||
| 26 | + | ||
| 27 | +# Please replace the version 1.10.32 if needed. | ||
| 28 | +``` | ||
| 29 | + | ||
| 30 | +You can also use | ||
| 31 | +``` | ||
| 32 | +ohpm install sherpa_onnx | ||
| 33 | +``` | ||
| 34 | +to install it. | ||
| 35 | + | ||
| 36 | +See also | ||
| 37 | +<https://ohpm.openharmony.cn/#/cn/detail/sherpa_onnx> |
| 1 | /** | 1 | /** |
| 2 | * Use these variables when you tailor your ArkTS code. They must be of the const type. | 2 | * Use these variables when you tailor your ArkTS code. They must be of the const type. |
| 3 | */ | 3 | */ |
| 4 | -export const HAR_VERSION = '1.0.0'; | ||
| 5 | -export const BUILD_MODE_NAME = 'debug'; | ||
| 6 | -export const DEBUG = true; | 4 | +export const HAR_VERSION = '1.10.32'; |
| 5 | +export const BUILD_MODE_NAME = 'release'; | ||
| 6 | +export const DEBUG = false; | ||
| 7 | export const TARGET_NAME = 'default'; | 7 | export const TARGET_NAME = 'default'; |
| 8 | 8 | ||
| 9 | /** | 9 | /** |
| @@ -10,3 +10,33 @@ It also supports embedded systems, Android, iOS, HarmonyOS, | @@ -10,3 +10,33 @@ It also supports embedded systems, Android, iOS, HarmonyOS, | ||
| 10 | Raspberry Pi, RISC-V, x86_64 servers, websocket server/client, | 10 | Raspberry Pi, RISC-V, x86_64 servers, websocket server/client, |
| 11 | C/C++, Python, Kotlin, C#, Go, NodeJS, Java, Swift, Dart, JavaScript, | 11 | C/C++, Python, Kotlin, C#, Go, NodeJS, Java, Swift, Dart, JavaScript, |
| 12 | Flutter, Object Pascal, Lazarus, Rust, etc. | 12 | Flutter, Object Pascal, Lazarus, Rust, etc. |
| 13 | + | ||
| 14 | + | ||
| 15 | +# Installation | ||
| 16 | + | ||
| 17 | +To use `sherpa-onnx` in your project, please either use | ||
| 18 | + | ||
| 19 | +``` | ||
| 20 | +ohpm install sherpa_onnx | ||
| 21 | +``` | ||
| 22 | +or update your `oh-package.json5` to include the following: | ||
| 23 | + | ||
| 24 | +``` | ||
| 25 | + "dependencies": { | ||
| 26 | + "sherpa_onnx": "1.10.32", | ||
| 27 | + }, | ||
| 28 | +``` | ||
| 29 | + | ||
| 30 | +Note that we recommend always using the latest version. | ||
| 31 | + | ||
| 32 | +# Examples | ||
| 33 | + | ||
| 34 | +| Demo | URL | Description| | ||
| 35 | +|------|-----|------------| | ||
| 36 | +|SherpaOnnxVadAsr|[Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/harmony-os/SherpaOnnxVadAsr)|It shows how to use VAD with a non-streaming ASR model for speech recognition| | ||
| 37 | + | ||
| 38 | +# Documentation | ||
| 39 | + | ||
| 40 | +If you have any issues, please either look at our doc at | ||
| 41 | +<https://k2-fsa.github.io/sherpa/onnx/> or create an issue at | ||
| 42 | +<https://github.com/k2-fsa/sherpa-onnx/issues> |
| 1 | { | 1 | { |
| 2 | "name": "sherpa_onnx", | 2 | "name": "sherpa_onnx", |
| 3 | - "version": "1.0.0", | 3 | + "version": "1.10.32", |
| 4 | "description": "Speech-to-text, text-to-speech, and speaker diarization using Next-gen Kaldi without internet connection", | 4 | "description": "Speech-to-text, text-to-speech, and speaker diarization using Next-gen Kaldi without internet connection", |
| 5 | "main": "Index.ets", | 5 | "main": "Index.ets", |
| 6 | "author": "The next-gen Kaldi team", | 6 | "author": "The next-gen Kaldi team", |
| 7 | "license": "Apache-2.0", | 7 | "license": "Apache-2.0", |
| 8 | "homepage": "https://github.com/k2-fsa/sherpa-onnx", | 8 | "homepage": "https://github.com/k2-fsa/sherpa-onnx", |
| 9 | - "repository": "https://github.com/k2-fsa/sherpa-onnx/tree/master/harmonyos-SherpaOnnxHar", | 9 | + "repository": "https://github.com/k2-fsa/sherpa-onnx/tree/master/harmony-os/SherpaOnnxHar", |
| 10 | "dependencies": { | 10 | "dependencies": { |
| 11 | "libsherpa_onnx.so": "file:./src/main/cpp/types/libsherpa_onnx" | 11 | "libsherpa_onnx.so": "file:./src/main/cpp/types/libsherpa_onnx" |
| 12 | }, | 12 | }, |
| 13 | "keywords": [ | 13 | "keywords": [ |
| 14 | + "语音识别", | ||
| 15 | + "语音合成", | ||
| 16 | + "新一代Kaldi", | ||
| 14 | "tts", | 17 | "tts", |
| 15 | "asr", | 18 | "asr", |
| 16 | "locally", | 19 | "locally", |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | +set -ex | ||
| 4 | + | ||
| 3 | sed -i.bak 's/1\.10\.31/1\.10\.32/g' ./build-ios-shared.sh | 5 | sed -i.bak 's/1\.10\.31/1\.10\.32/g' ./build-ios-shared.sh |
| 4 | find flutter -name *.yaml -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; | 6 | find flutter -name *.yaml -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; |
| 5 | find dart-api-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; | 7 | find dart-api-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; |
| 6 | find flutter-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; | 8 | find flutter-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; |
| 7 | find flutter -name *.podspec -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; | 9 | find flutter -name *.podspec -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; |
| 8 | find nodejs-addon-examples -name package.json -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; | 10 | find nodejs-addon-examples -name package.json -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; |
| 11 | + | ||
| 12 | +find harmony-os -name "README.md" -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; | ||
| 13 | +find harmony-os -name oh-package.json5 -type f -exec sed -i.bak 's/1\.10\.31/1\.10\.32/g' {} \; |
-
请 注册 或 登录 后发表评论