Build generating subtitles APPs for more models (#1265)
This commit is contained in:
3
.github/workflows/lazarus.yaml
vendored
3
.github/workflows/lazarus.yaml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- lazarus
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/lazarus.yaml'
|
- '.github/workflows/lazarus.yaml'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
@@ -12,6 +13,7 @@ on:
|
|||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
- 'sherpa-onnx/c-api/*'
|
- 'sherpa-onnx/c-api/*'
|
||||||
- 'sherpa-onnx/pascal-api/*'
|
- 'sherpa-onnx/pascal-api/*'
|
||||||
|
- 'scripts/lazarus/*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
@@ -23,6 +25,7 @@ on:
|
|||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
- 'sherpa-onnx/c-api/*'
|
- 'sherpa-onnx/c-api/*'
|
||||||
- 'sherpa-onnx/pascal-api/*'
|
- 'sherpa-onnx/pascal-api/*'
|
||||||
|
- 'scripts/lazarus/*'
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -25,17 +25,17 @@
|
|||||||
|
|
||||||
### Supported programming languages
|
### Supported programming languages
|
||||||
|
|
||||||
| 1. C++ | 2. C | 3. Python | 4. C# | 5. Java |
|
| 1. C++ | 2. C | 3. Python | 4. JavaScript |
|
||||||
|--------|-------|-----------|-------|---------|
|
|--------|-------|-----------|---------------|
|
||||||
| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
| ✔️ | ✔️ | ✔️ | ✔️ |
|
||||||
|
|
||||||
| 6. JavaScript | 7. Kotlin | 8. Swift | 9. Go | 10. Dart |
|
|5. Java | 6. C# | 7. Kotlin | 8. Swift |
|
||||||
|---------------|-----------|----------|-------|----------|
|
|--------|-------|-----------|----------|
|
||||||
| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
| ✔️ | ✔️ | ✔️ | ✔️ |
|
||||||
|
|
||||||
| 11. Rust | 12. Pascal |
|
| 9. Go | 10. Dart | 11. Rust | 12. Pascal |
|
||||||
|----------|------------|
|
|-------|----------|----------|------------|
|
||||||
| ✔️ | ✔️ |
|
| ✔️ | ✔️ | ✔️ | ✔️ |
|
||||||
|
|
||||||
For Rust support, please see https://github.com/thewh1teagle/sherpa-rs
|
For Rust support, please see https://github.com/thewh1teagle/sherpa-rs
|
||||||
|
|
||||||
@@ -73,8 +73,8 @@ with the following APIs
|
|||||||
|
|
||||||
- C++, C, Python, Go, ``C#``
|
- C++, C, Python, Go, ``C#``
|
||||||
- Java, Kotlin, JavaScript
|
- Java, Kotlin, JavaScript
|
||||||
- Swift
|
- Swift, Rust
|
||||||
- Dart
|
- Dart, Object Pascal
|
||||||
|
|
||||||
### Links for pre-built Android APKs
|
### Links for pre-built Android APKs
|
||||||
|
|
||||||
@@ -111,6 +111,15 @@ with the following APIs
|
|||||||
|
|
||||||
> Note: You need to build from source for iOS.
|
> Note: You need to build from source for iOS.
|
||||||
|
|
||||||
|
### Links for pre-built Lazarus APPs
|
||||||
|
|
||||||
|
#### Generating subtitles
|
||||||
|
|
||||||
|
| Description | URL | 中国用户 |
|
||||||
|
|--------------------------------|---------------------------------------------------------------------|---------------------------------------------------------------------|
|
||||||
|
| Generate subtitles (生成字幕) | [Address](https://k2-fsa.github.io/sherpa/onnx/lazarus/download-generated-subtitles.html)| [点此](https://k2-fsa.github.io/sherpa/onnx/lazarus/download-generated-subtitles-cn.html)|
|
||||||
|
|
||||||
|
|
||||||
### Links for pre-trained models
|
### Links for pre-trained models
|
||||||
|
|
||||||
| Description | URL |
|
| Description | URL |
|
||||||
|
|||||||
8
lazarus-examples/README.md
Normal file
8
lazarus-examples/README.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Introduction
|
||||||
|
|
||||||
|
This directory contains examples about using
|
||||||
|
https://www.lazarus-ide.org/
|
||||||
|
with Object Pascal API to develop speech related applications.
|
||||||
|
|
||||||
|
**Documentation for this directory**:
|
||||||
|
https://k2-fsa.github.io/sherpa/onnx/lazarus/index.html
|
||||||
9
lazarus-examples/generate_subtitles/README.md
Normal file
9
lazarus-examples/generate_subtitles/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Introduction
|
||||||
|
|
||||||
|
Please refer to
|
||||||
|
https://k2-fsa.github.io/sherpa/onnx/lazarus/generate-subtitles.html
|
||||||
|
for how to build the project in this directory.
|
||||||
|
|
||||||
|
You can find pre-built APPs from this directory at
|
||||||
|
https://k2-fsa.github.io/sherpa/onnx/lazarus/pre-built-app.html
|
||||||
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
This directory contains examples for how to use the [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal)
|
This directory contains examples for how to use the [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal)
|
||||||
APIs of [sherpa-onnx](https://github.com/k2-fsa/sherpa-onnx).
|
APIs of [sherpa-onnx](https://github.com/k2-fsa/sherpa-onnx).
|
||||||
|
|
||||||
|
**Documentation for this directory**:
|
||||||
|
https://k2-fsa.github.io/sherpa/onnx/pascal-api/index.html
|
||||||
|
|
||||||
|Directory| Description|
|
|Directory| Description|
|
||||||
|---------|------------|
|
|---------|------------|
|
||||||
|[read-wav](./read-wav)|It shows how to read a wave file.|
|
|[read-wav](./read-wav)|It shows how to read a wave file.|
|
||||||
|
|||||||
@@ -342,7 +342,6 @@ def get_vits_models() -> List[TtsModel]:
|
|||||||
or "sherpa-onnx-vits-zh-ll" == m.model_dir
|
or "sherpa-onnx-vits-zh-ll" == m.model_dir
|
||||||
or "melo-tts" in m.model_dir
|
or "melo-tts" in m.model_dir
|
||||||
):
|
):
|
||||||
s = s[:-1]
|
|
||||||
m.dict_dir = m.model_dir + "/dict"
|
m.dict_dir = m.model_dir + "/dict"
|
||||||
else:
|
else:
|
||||||
m.rule_fars = f"{m.model_dir}/rule.far"
|
m.rule_fars = f"{m.model_dir}/rule.far"
|
||||||
|
|||||||
@@ -123,6 +123,62 @@ def get_models():
|
|||||||
|
|
||||||
ls -lh
|
ls -lh
|
||||||
|
|
||||||
|
popd
|
||||||
|
""",
|
||||||
|
),
|
||||||
|
Model(
|
||||||
|
model_name="sherpa-onnx-zipformer-ja-reazonspeech-2024-08-01",
|
||||||
|
lang="ja",
|
||||||
|
short_name="zipformer_reazonspeech_2024_08_01",
|
||||||
|
cmd="""
|
||||||
|
pushd $model_name
|
||||||
|
mv encoder-epoch-99-avg-1.int8.onnx transducer-encoder.onnx
|
||||||
|
mv decoder-epoch-99-avg-1.onnx transducer-decoder.onnx
|
||||||
|
mv joiner-epoch-99-avg-1.int8.onnx transducer-joiner.onnx
|
||||||
|
|
||||||
|
rm -fv encoder-epoch-99-avg-1.onnx
|
||||||
|
rm -fv decoder-epoch-99-avg-1.int8.onnx
|
||||||
|
rm -fv joiner-epoch-99-avg-1.onnx
|
||||||
|
|
||||||
|
popd
|
||||||
|
""",
|
||||||
|
),
|
||||||
|
Model(
|
||||||
|
model_name="sherpa-onnx-zipformer-thai-2024-06-20",
|
||||||
|
lang="th",
|
||||||
|
short_name="zipformer_gigaspeech2",
|
||||||
|
cmd="""
|
||||||
|
pushd $model_name
|
||||||
|
|
||||||
|
rm -rfv test_wavs
|
||||||
|
rm -fv README.md
|
||||||
|
rm -fv bpe.model
|
||||||
|
|
||||||
|
mv encoder-epoch-12-avg-5.int8.onnx transducer-encoder.onnx
|
||||||
|
mv decoder-epoch-12-avg-5.onnx transducer-decoder.onnx
|
||||||
|
mv joiner-epoch-12-avg-5.int8.onnx transducer-joiner.onnx
|
||||||
|
|
||||||
|
rm -fv encoder-epoch-12-avg-5.onnx
|
||||||
|
rm -fv decoder-epoch-12-avg-5.int8.onnx
|
||||||
|
rm -fv joiner-epoch-12-avg-5.onnx
|
||||||
|
|
||||||
|
ls -lh
|
||||||
|
|
||||||
|
popd
|
||||||
|
""",
|
||||||
|
),
|
||||||
|
Model(
|
||||||
|
model_name="sherpa-onnx-telespeech-ctc-int8-zh-2024-06-04",
|
||||||
|
lang="zh",
|
||||||
|
short_name="telespeech_ctc",
|
||||||
|
cmd="""
|
||||||
|
pushd $model_name
|
||||||
|
|
||||||
|
mv model.int8.onnx telespeech.onnx
|
||||||
|
rm -fv model.onnx
|
||||||
|
|
||||||
|
ls -lh
|
||||||
|
|
||||||
popd
|
popd
|
||||||
""",
|
""",
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user