Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Jul 10, 2024
1 parent a25b1f1 commit 3c5a650
Show file tree
Hide file tree
Showing 27 changed files with 92 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class SherpaOnnxViewModel: ObservableObject {
}

private func initOfflineRecognizer() {
// let modelConfig = getNonStreamingZhParaformer20230419()
// let modelConfig = getNonStreamingZhParaformer20230914()
let modelConfig = getNonStreamingWhisperTinyEn()

// let modelConfig = getNonStreamingEnZipformer20230504()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SubtitleViewModel: ObservableObject {
self.modelConfig = getNonStreamingWhisperTinyEn()
} else if modelType == "paraformer" {
// for Chinese
self.modelConfig = getNonStreamingZhParaformer20230419()
self.modelConfig = getNonStreamingZhParaformer20230914()
} else {
print("Please specify a supported modelType \(modelType)")
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
public class InverseTextNormalizationNonStreamingParaformer {
public static void main(String[] args) {
// please refer to
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-04-19-chinese-english
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-09-14-chinese-english
// to download model files
String model = "./sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt";
String model = "./sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt";

// https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/itn-zh-number.wav
String waveFilename = "./itn-zh-number.wav";
Expand Down
8 changes: 4 additions & 4 deletions java-api-examples/NonStreamingDecodeFileParaformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
public class NonStreamingDecodeFileParaformer {
public static void main(String[] args) {
// please refer to
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-04-19-chinese-english
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-09-14-chinese-english
// to download model files
String model = "./sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt";
String model = "./sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt";

String waveFilename = "./sherpa-onnx-paraformer-zh-2023-04-19/test_wavs/3-sichuan.wav";
String waveFilename = "./sherpa-onnx-paraformer-zh-2023-09-14/test_wavs/3-sichuan.wav";

WaveReader reader = new WaveReader(waveFilename);

Expand Down
6 changes: 3 additions & 3 deletions java-api-examples/VadFromMicWithNonStreamingParaformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public static Vad createVad() {

public static OfflineRecognizer createOfflineRecognizer() {
// please refer to
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-04-19-chinese-english
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-09-14-chinese-english
// to download model files
String model = "./sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt";
String model = "./sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt";

// https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/itn_zh_number.fst
String ruleFsts = "./itn_zh_number.fst";
Expand Down
6 changes: 3 additions & 3 deletions java-api-examples/VadNonStreamingParaformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public static Vad createVad() {

public static OfflineRecognizer createOfflineRecognizer() {
// please refer to
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-04-19-chinese-english
// https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-09-14-chinese-english
// to download model files
String model = "./sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt";
String model = "./sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx";
String tokens = "./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt";

OfflineParaformerModelConfig paraformer =
OfflineParaformerModelConfig.builder().setModel(model).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ if [ ! -f ../sherpa-onnx/java-api/build/sherpa-onnx.jar ]; then
popd
fi

if [ ! -f ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
if [ ! -f ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2

tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
fi

if [ ! -f ./itn-zh-number.wav ]; then
Expand Down
8 changes: 4 additions & 4 deletions java-api-examples/run-non-streaming-decode-file-paraformer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ if [ ! -f ../sherpa-onnx/java-api/build/sherpa-onnx.jar ]; then
popd
fi

if [ ! -f ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
if [ ! -f ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2

tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
fi

java \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ if [ ! -f ./silero_vad.onnx ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx
fi

if [ ! -f ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
if [ ! -f ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2

tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
fi

if [ ! -f ./itn_zh_number.fst ]; then
Expand Down
8 changes: 4 additions & 4 deletions java-api-examples/run-vad-non-streaming-paraformer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ if [ ! -f ./lei-jun-test.wav ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/lei-jun-test.wav
fi

if [ ! -f ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
if [ ! -f ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2

tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
fi

java \
Expand Down
16 changes: 8 additions & 8 deletions kotlin-api-examples/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ function testOfflineAsr() {
rm sherpa-onnx-nemo-ctc-en-citrinet-512.tar.bz2
fi

if [ ! -f ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
if [ ! -f ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
fi

if [ ! -f ./sherpa-onnx-zipformer-multi-zh-hans-2023-9-2/tokens.txt ]; then
Expand All @@ -205,10 +205,10 @@ function testOfflineAsr() {
}

function testInverseTextNormalizationOfflineAsr() {
if [ ! -f ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
if [ ! -f ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
fi

if [ ! -f ./itn-zh-number.wav ]; then
Expand Down
2 changes: 1 addition & 1 deletion kotlin-api-examples/test_offline_asr.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fun test(type: Int) {
val recognizer = createOfflineRecognizer(type)

val waveFilename = when (type) {
0 -> "./sherpa-onnx-paraformer-zh-2023-04-19/test_wavs/0.wav"
0 -> "./sherpa-onnx-paraformer-zh-2023-09-14/test_wavs/0.wav"
2 -> "./sherpa-onnx-whisper-tiny.en/test_wavs/0.wav"
5 -> "./sherpa-onnx-zipformer-multi-zh-hans-2023-9-2/test_wavs/1.wav"
6 -> "./sherpa-onnx-nemo-ctc-en-citrinet-512/test_wavs/8k.wav"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ void CNonStreamingSpeechRecognitionDlg::ShowInitRecognizerHelpMessage() {
msg +=
"wget "
"https://huggingface.co/csukuangfj/"
"sherpa-onnx-paraformer-zh-2023-04-19/resolve/main/model.onnx\r\n";
"sherpa-onnx-paraformer-zh-2023-09-14/resolve/main/model.onnx\r\n";
msg +=
"wget "
"https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-04-19/"
"https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-09-14/"
"resolve/main/tokens.txt\r\n\r\n";
msg += "\r\n Now rename them\r\n";
msg += "mv model.onnx paraformer.onnx\r\n\r\n";
Expand Down
12 changes: 6 additions & 6 deletions nodejs-addon-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ node ./test_audio_tagging_zipformer.js
### Audio tagging with CED

```bash
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/audio-tagging-models/sherpa-onnx-ced-mini-audio-tagging-2024-04-19.tar.bz2
tar xvf sherpa-onnx-ced-mini-audio-tagging-2024-04-19.tar.bz2
rm sherpa-onnx-ced-mini-audio-tagging-2024-04-19.tar.bz2
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/audio-tagging-models/sherpa-onnx-ced-mini-audio-tagging-2024-09-14.tar.bz2
tar xvf sherpa-onnx-ced-mini-audio-tagging-2024-09-14.tar.bz2
rm sherpa-onnx-ced-mini-audio-tagging-2024-09-14.tar.bz2

node ./test_audio_tagging_ced.js
```
Expand Down Expand Up @@ -241,9 +241,9 @@ node ./test_vad_asr_non_streaming_nemo_ctc_microphone.js
### Non-streaming speech recognition with Paraformer

```bash
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2

node ./test_asr_non_streaming_paraformer.js

Expand Down
6 changes: 3 additions & 3 deletions nodejs-addon-examples/test_asr_non_streaming_paraformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ const config = {
},
'modelConfig': {
'paraformer': {
'model': './sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx',
'model': './sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx',
},
'tokens': './sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt',
'tokens': './sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt',
'numThreads': 2,
'provider': 'cpu',
'debug': 1,
}
};

const waveFilename =
'./sherpa-onnx-paraformer-zh-2023-04-19/test_wavs/5-henan.wav';
'./sherpa-onnx-paraformer-zh-2023-09-14/test_wavs/5-henan.wav';

const recognizer = new sherpa_onnx.OfflineRecognizer(config);
console.log('Started')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const config = {
},
'modelConfig': {
'paraformer': {
'model': './sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx',
'model': './sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx',
},
'tokens': './sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt',
'tokens': './sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt',
'numThreads': 2,
'provider': 'cpu',
'debug': 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function createRecognizer() {
},
'modelConfig': {
'paraformer': {
'model': './sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx',
'model': './sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx',
},
'tokens': './sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt',
'tokens': './sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt',
'numThreads': 2,
'provider': 'cpu',
'debug': 1,
Expand Down
6 changes: 3 additions & 3 deletions nodejs-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ node ./test-offline-nemo-ctc.js

[./test-offline-paraformer.js](./test-offline-paraformer.js) demonstrates
how to decode a file with a non-streaming Paraformer model. In the code we use
[sherpa-onnx-paraformer-zh-2023-04-19](https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-04-19-chinese).
[sherpa-onnx-paraformer-zh-2023-09-14](https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-09-14-chinese).

You can use the following command to run it:

```bash
wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
node ./test-offline-paraformer.js
```

Expand Down
4 changes: 2 additions & 2 deletions nodejs-examples/test-offline-paraformer-itn.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function createOfflineRecognizer() {
joiner: '',
},
paraformer: {
model: './sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx',
model: './sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx',
},
nemoCtc: {
model: '',
Expand All @@ -34,7 +34,7 @@ function createOfflineRecognizer() {
tdnn: {
model: '',
},
tokens: './sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt',
tokens: './sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt',
numThreads: 1,
debug: 0,
provider: 'cpu',
Expand Down
6 changes: 3 additions & 3 deletions nodejs-examples/test-offline-paraformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function createOfflineRecognizer() {
joiner: '',
},
paraformer: {
model: './sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx',
model: './sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx',
},
nemoCtc: {
model: '',
Expand All @@ -34,7 +34,7 @@ function createOfflineRecognizer() {
tdnn: {
model: '',
},
tokens: './sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt',
tokens: './sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt',
numThreads: 1,
debug: 0,
provider: 'cpu',
Expand Down Expand Up @@ -63,7 +63,7 @@ function createOfflineRecognizer() {
const recognizer = createOfflineRecognizer();
const stream = recognizer.createStream();

const waveFilename = './sherpa-onnx-paraformer-zh-2023-04-19/test_wavs/0.wav';
const waveFilename = './sherpa-onnx-paraformer-zh-2023-09-14/test_wavs/0.wav';

const reader = new wav.Reader();
const readable = new Readable().wrap(reader);
Expand Down
10 changes: 5 additions & 5 deletions python-api-examples/inverse-text-normalization-offline-asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
(1) Download the test model
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
(2) Download rule fst
Expand All @@ -36,8 +36,8 @@


def create_recognizer():
model = "./sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx"
tokens = "./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt"
model = "./sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx"
tokens = "./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt"
rule_fsts = "./itn_zh_number.fst"

if (
Expand Down
10 changes: 5 additions & 5 deletions python-api-examples/non_streaming_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
(2) Use a non-streaming paraformer
cd /path/to/sherpa-onnx
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-04-19.tar.bz2
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
python3 ./python-api-examples/non_streaming_server.py \
--paraformer ./sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx \
--tokens ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt
--paraformer ./sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx \
--tokens ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt
(3) Use a non-streaming CTC model from NeMo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
--first-joiner ./sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23/joiner-epoch-99-avg-1.onnx \
--first-tokens ./sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23/tokens.txt \
\
--second-paraformer ./sherpa-onnx-paraformer-zh-2023-04-19/model.int8.onnx \
--second-tokens ./sherpa-onnx-paraformer-zh-2023-04-19/tokens.txt
--second-paraformer ./sherpa-onnx-paraformer-zh-2023-09-14/model.int8.onnx \
--second-tokens ./sherpa-onnx-paraformer-zh-2023-09-14/tokens.txt
(2) English: Streaming zipformer (1st pass) + Non-streaming whisper (2nd pass)
Expand Down
4 changes: 2 additions & 2 deletions scripts/apk/generate-asr-2pass-apk-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_2nd_models():
""",
),
Model(
model_name="sherpa-onnx-paraformer-zh-2023-04-19",
model_name="sherpa-onnx-paraformer-zh-2023-09-14",
idx=0,
lang="zh",
short_name="paraformer",
Expand Down Expand Up @@ -270,7 +270,7 @@ def get_models():
combinations = [
(
"sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23",
"sherpa-onnx-paraformer-zh-2023-04-19",
"sherpa-onnx-paraformer-zh-2023-09-14",
),
(
"sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23",
Expand Down
Loading

0 comments on commit 3c5a650

Please sign in to comment.