Commit Graph

90 Commits

Author SHA1 Message Date
Fangjun Kuang
35526e26e1 Support paraformer on Android (#264) 2023-08-14 12:26:15 +08:00
Fangjun Kuang
6038e2aa62 Support streaming paraformer (#263) 2023-08-14 10:32:14 +08:00
Fangjun Kuang
a4bff28e21 Support TDNN models from the yesno recipe from icefall (#262) 2023-08-12 19:50:22 +08:00
frankyoujian
9dcad7e963 Reinitialize context state after Reset stream when using contexts (#257) 2023-08-10 14:19:40 +08:00
Fangjun Kuang
865fd1e017 Support pkg-config (#253) 2023-08-10 11:22:36 +08:00
Fangjun Kuang
79c2ce5dd4 Refactor online recognizer (#250)
* Refactor online recognizer.

Make it easier to support other streaming models.

Note that it is a breaking change for the Python API.
`sherpa_onnx.OnlineRecognizer()` used before should be
replaced by `sherpa_onnx.OnlineRecognizer.from_transducer()`.
2023-08-09 20:27:31 +08:00
Fangjun Kuang
6061318e3f fix building on linux with GPU (#249) 2023-08-09 20:21:28 +08:00
Fangjun Kuang
92bfee0424 Flush stderr on write (#248) 2023-08-09 15:33:01 +08:00
Fangjun Kuang
aa48b76d4b Fix initial tokens to decoding (#246) 2023-08-09 12:33:47 +08:00
Fangjun Kuang
45b9d4ab37 Support whisper models (#238) 2023-08-07 12:34:18 +08:00
Fangjun Kuang
c5756734a9 Use parse options to parse arguments from sherpa-onnx-microphone (#237) 2023-08-05 18:05:18 +08:00
Jingzhao Ou
daffdab52a Updated hypothesis key generation to be the same as sherpa (#226) 2023-07-28 14:19:49 +08:00
Fangjun Kuang
6125d9e063 Refactor onnxruntime.cmake (#220) 2023-07-18 15:44:54 +08:00
Wilson Wongso
5a6b55c5a7 Reduce model initialization time for online speech recognition (#215)
* Reduce model initialization time for online speech recognition

* Fixed Styling

---------

Co-authored-by: w11wo <wilsowong961@gmail.com>
2023-07-14 21:20:10 +08:00
Fangjun Kuang
f3206c49dc Reduce model initialization time for offline speech recognition (#213) 2023-07-14 18:07:27 +08:00
Fangjun Kuang
bebc1f1398 Use static libraries for MFC examples (#210) 2023-07-13 14:52:43 +08:00
Wei Kang
513dfaa552 Support contextual-biasing for streaming model (#184)
* Support contextual-biasing for streaming model

* The whole pipeline runs normally

* Fix comments
2023-06-30 16:46:24 +08:00
danfu
1c3dac9001 support streaming zipformer2 (#185)
Co-authored-by: danfu <danfu@tencent.com>
2023-06-26 11:09:43 +08:00
Fangjun Kuang
d82251cba6 Support the latest offline zipformer model (#180) 2023-06-19 14:09:24 +08:00
Wei Kang
8562711252 Implement context biasing with a Aho Corasick automata (#145)
* Implement context graph

* Modify the interface to support context biasing

* Support context biasing in modified beam search; add python wrapper

* Support context biasing in python api example

* Minor fixes

* Fix context graph

* Minor fixes

* Fix tests

* Fix style

* Fix style

* Fix comments

* Minor fixes

* Add missing header

* Replace std::shared_ptr with std::unique_ptr for effciency

* Build graph in constructor

* Fix comments

* Minor fixes

* Fix docs
2023-06-16 14:26:36 +08:00
keanu
1a1b9fd236 RNNLM model support lm_num_thread and lm_provider setting (#173)
* rnnlm model inference supports num_threads setting

* rnnlm params decouple num_thread and provider with Transducer.

* fix python csrc bug which offline-lm-config.cc and online-lm-config.cc arguments problem

* lm_num_threads and lm_provider set default values

---------

Co-authored-by: cuidongcai1035 <cuidongcai1035@wezhuiyi.com>
2023-06-12 15:51:27 +08:00
keanu
9c017c2ccb rnnlm model inference supports num_threads setting (#169)
Co-authored-by: cuidongcai1035 <cuidongcai1035@wezhuiyi.com>
2023-06-07 09:32:27 +08:00
Jingzhao Ou
fdd49d0538 add batch processing to sherpa-onnx (#166) 2023-06-04 14:13:55 +08:00
Jingzhao Ou
0ed501b8f1 Added provider option to sherpa-onnx and decode-file-c-api (#162) 2023-06-03 04:57:48 +08:00
Fangjun Kuang
d7114da441 Minor fixes (#161) 2023-05-23 15:57:33 +08:00
Fangjun Kuang
44821ae2fb Use fixed decimal point for offline timestamp (#158) 2023-05-22 16:52:38 +08:00
PF Luo
655c619bf3 Fix lm fusion (#157)
* share GetHypsRowSplits interface and fix getting Topk not taking logprob

* fix lm score of lm fusion and make padding len same with 'icefall/egs/librispeech/ASR/pruned_transducer_stateless7_streaming/decode.py'
2023-05-15 10:48:45 +08:00
Yuekai Zhang
b8fbf8e5ce Add onnxruntime gpu for cmake (#153)
* add onnxruntime gpu for cmake

* fix clang

* fix typo

* cpplint
2023-05-12 22:30:47 +08:00
Fangjun Kuang
cea718e3d8 Support CoreML for macOS (#151) 2023-05-12 15:57:44 +08:00
Jingzhao Ou
0992063de8 Stack and streaming conformer support (#141)
* added csrc/stack.cc

* stack: added checks

* added copyright info

* passed cpp style checks

* formatted code

* added some support for streaming conformer model support (not verified)

* code lint

* made more progress with streaming conformer support (not working yet)

* passed style check

* changes as suggested by @csukuangfj

* added some debug info

* fixed style check

* Use Cat to replace Stack

* remove debug statements

---------

Co-authored-by: Jingzhao Ou (jou2019) <jou2019@cisco.com>
Co-authored-by: Fangjun Kuang <csukuangfj@gmail.com>
2023-05-11 14:30:39 +08:00
PF Luo
824b0809a4 add shallow fusion (#147) 2023-05-10 22:30:57 +08:00
cooldoomsday
0bc571f6ee Return timestamp info and tokens in offline ASR
Co-authored-by: zhangbaofeng@npnets.com <41259@Zbf>
2023-05-06 10:20:46 +08:00
PF Luo
8c6a6768d5 Add lm rescore to online-modified-beam-search (#133) 2023-05-05 21:23:54 +08:00
PF Luo
aa7108729b share GetHypsRowSplits interface and fix getting Topk not taking logprob (#131) 2023-04-26 11:41:04 +08:00
Fangjun Kuang
86017f9833 Add RNN LM rescore for offline ASR with modified_beam_search (#125) 2023-04-23 17:15:18 +08:00
Fangjun Kuang
ad05f52666 Add timestamps for streaming ASR. (#123) 2023-04-19 16:02:37 +08:00
彭震东
d781fcdeef Use log probs for paraformer (#120)
* Use log probs for paraformer

* Fix
2023-04-09 23:28:10 +08:00
Fangjun Kuang
80060c276d Begin to support CTC models (#119)
Please see https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/nemo/index.html for a list of pre-trained CTC models from NeMo.
2023-04-07 23:11:34 +08:00
Fangjun Kuang
283e41c557 Fix displaying English words for paraformer models. (#114) 2023-04-04 16:44:37 +08:00
Fangjun Kuang
726680c5e0 Install binaries via pip install (#112)
When pepole use pip install sherpa-onnx, they also get the following binaries:

(py38) fangjuns-MacBook-Pro:bin fangjun$ ls -lh  sherpa-onnx*
-rwxr-xr-x  1 fangjun  staff    36K Apr  4 13:48 sherpa-onnx
-rwxr-xr-x  1 fangjun  staff    52K Apr  4 13:48 sherpa-onnx-microphone
-rwxr-xr-x  1 fangjun  staff    54K Apr  4 13:48 sherpa-onnx-microphone-offline
-rwxr-xr-x  1 fangjun  staff    37K Apr  4 13:48 sherpa-onnx-offline
-rwxr-xr-x  1 fangjun  staff   634K Apr  4 13:48 sherpa-onnx-offline-websocket-server
-rwxr-xr-x  1 fangjun  staff   710K Apr  4 13:48 sherpa-onnx-online-websocket-client
-rwxr-xr-x  1 fangjun  staff   651K Apr  4 13:48 sherpa-onnx-online-websocket-server
(py38) fangjuns-MacBook-Pro:bin fangjun$ pwd
/Users/fangjun/py38/bin
2023-04-04 15:45:59 +08:00
Fangjun Kuang
5d3c8edbc9 add python tests (#111) 2023-04-02 23:05:30 +08:00
manyeyes
3f7e0c23ac adding a python api for offline decode (#110) 2023-04-02 13:17:43 +08:00
Fangjun Kuang
f9f9f20d37 Test int8 models (#107)
* Test int8 models

* Fix displaying help messages

* small fixes

* Fix jni test
2023-03-31 22:34:10 +08:00
Fangjun Kuang
b535d6db59 Fix building on Linux (#105)
* Fix building on Linux

* Fix style issues
2023-03-30 19:56:59 +08:00
Fangjun Kuang
b911915a32 Add microphone support for offline recognizer (#104) 2023-03-30 19:43:05 +08:00
Fangjun Kuang
6707ec4124 add offline websocket server/client (#98) 2023-03-29 21:48:45 +08:00
Jason's Lab
5e5620ea23 add zipformer model_type (#97)
Co-authored-by: lichao <www.563042811@qq.com>
2023-03-29 20:36:39 +08:00
Fangjun Kuang
423d89e9a5 Support paraformer. (#95) 2023-03-28 17:59:54 +08:00
Fangjun Kuang
dffb0fd43c Refactor offline recognizer. (#94)
* Refactor offline recognizer.

The purpose is to make it easier to support different types of models.
2023-03-27 14:59:40 +08:00
Fangjun Kuang
5572246253 Add non-streaming ASR (#92) 2023-03-26 08:53:42 +08:00