Skip to content

Commit

Permalink
Release pre-built APKs (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Aug 18, 2023
1 parent 5c5b335 commit e955f9c
Show file tree
Hide file tree
Showing 6 changed files with 398 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .github/workflows/apk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: apk

on:
push:
branches:
- apk
tags:
- '*'

workflow_dispatch:

concurrency:
group: apk-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
apk:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Display NDK HOME
shell: bash
run: |
echo "ANDROID_NDK_LATEST_HOME: ${ANDROID_NDK_LATEST_HOME}"
ls -lh ${ANDROID_NDK_LATEST_HOME}
- name: build APK
shell: bash
run: |
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME
./build-apk.sh
- name: Display APK
shell: bash
run: |
ls -lh ./apks/
- uses: actions/upload-artifact@v2
with:
path: ./apks/*.apk

- name: Release APK
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
file: apks/*.apk
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(sherpa-onnx)

set(SHERPA_ONNX_VERSION "1.7.9")
set(SHERPA_ONNX_VERSION "1.7.10")

# Disable warning about
#
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ by following the code)
5 - csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
6 - sherpa-onnx-streaming-zipformer-en-2023-06-26
https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26
7 - shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14 (French)
https://huggingface.co/shaojieli/sherpa-onnx-streaming-zipformer-fr-2023-04-14
8 - csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 (Bilingual, Chinese + English)
https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
encoder int8, decoder/joiner float32
*/
fun getModelConfig(type: Int): OnlineModelConfig? {
when (type) {
Expand All @@ -158,6 +168,7 @@ fun getModelConfig(type: Int): OnlineModelConfig? {
modelType = "zipformer",
)
}

1 -> {
val modelDir = "sherpa-onnx-lstm-zh-2023-02-20"
return OnlineModelConfig(
Expand Down Expand Up @@ -221,6 +232,45 @@ fun getModelConfig(type: Int): OnlineModelConfig? {
modelType = "paraformer",
)
}

6 -> {
val modelDir = "sherpa-onnx-streaming-zipformer-en-2023-06-26"
return OnlineModelConfig(
transducer = OnlineTransducerModelConfig(
encoder = "$modelDir/encoder-epoch-99-avg-1-chunk-16-left-128.int8.onnx",
decoder = "$modelDir/decoder-epoch-99-avg-1-chunk-16-left-128.onnx",
joiner = "$modelDir/joiner-epoch-99-avg-1-chunk-16-left-128.onnx",
),
tokens = "$modelDir/tokens.txt",
modelType = "zipformer2",
)
}

7 -> {
val modelDir = "sherpa-onnx-streaming-zipformer-fr-2023-04-14"
return OnlineModelConfig(
transducer = OnlineTransducerModelConfig(
encoder = "$modelDir/encoder-epoch-29-avg-9-with-averaged-model.int8.onnx",
decoder = "$modelDir/decoder-epoch-29-avg-9-with-averaged-model.onnx",
joiner = "$modelDir/joiner-epoch-29-avg-9-with-averaged-model.onnx",
),
tokens = "$modelDir/tokens.txt",
modelType = "zipformer",
)
}

8 -> {
val modelDir = "sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20"
return OnlineModelConfig(
transducer = OnlineTransducerModelConfig(
encoder = "$modelDir/encoder-epoch-99-avg-1.int8.onnx",
decoder = "$modelDir/decoder-epoch-99-avg-1.onnx",
joiner = "$modelDir/joiner-epoch-99-avg-1.onnx",
),
tokens = "$modelDir/tokens.txt",
modelType = "zipformer",
)
}
}
return null;
}
Expand Down
Empty file.
Loading

0 comments on commit e955f9c

Please sign in to comment.