-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use aar in Android Java demo. (#1616)
- Loading branch information
1 parent
4dc4f1a
commit be87f86
Showing
22 changed files
with
101 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Introduction | ||
|
||
Please run the following commands to download model files before you run this Android demo: | ||
|
||
```bash | ||
# Assume we are inside | ||
# /Users/fangjun/open-source/sherpa-onnx/android/SherpaOnnxJavaDemo | ||
|
||
cd app/src/main/assets/ | ||
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 | ||
|
||
tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 | ||
rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 | ||
|
||
mv sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/encoder-epoch-99-avg-1.int8.onnx ./ | ||
mv sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/decoder-epoch-99-avg-1.onnx ./ | ||
mv sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/joiner-epoch-99-avg-1.int8.onnx ./ | ||
mv sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/tokens.txt ./ | ||
|
||
rm -rf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/* | ||
|
||
mv encoder-epoch-99-avg-1.int8.onnx ./ | ||
mv decoder-epoch-99-avg-1.onnx ./ | ||
mv joiner-epoch-99-avg-1.int8.onnx ./ | ||
mv tokens.txt ./ | ||
``` | ||
|
||
You should have the following directory structure: | ||
``` | ||
(py38) fangjuns-MacBook-Pro:assets fangjun$ pwd | ||
/Users/fangjun/open-source/sherpa-onnx/android/SherpaOnnxJavaDemo/app/src/main/assets | ||
(py38) fangjuns-MacBook-Pro:assets fangjun$ tree . | ||
. | ||
└── sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 | ||
├── decoder-epoch-99-avg-1.onnx | ||
├── encoder-epoch-99-avg-1.int8.onnx | ||
├── joiner-epoch-99-avg-1.int8.onnx | ||
└── tokens.txt | ||
1 directory, 4 files | ||
``` | ||
|
||
Remember to remove unused files to reduce the file size of the final APK. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
84 changes: 0 additions & 84 deletions
84
android/SherpaOnnxJavaDemo/app/src/main/java/com/k2fsa/sherpa/onnx/OnlineRecognizer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
android/SherpaOnnxJavaDemo/sherpa/src/main/AndroidManifest.xml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
android/SherpaOnnxJavaDemo/sherpa/src/main/res/values/strings.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.