Skip to content

Add online punctuation and casing prediction model for English language#1224

Merged
csukuangfj merged 6 commits intok2-fsa:masterfrom
frankyoujian:punct_truecasing
Aug 6, 2024
Merged

Add online punctuation and casing prediction model for English language#1224
csukuangfj merged 6 commits intok2-fsa:masterfrom
frankyoujian:punct_truecasing

Conversation

@frankyoujian
Copy link
Copy Markdown
Contributor

For anyone who wants to add punctuation and casing to the raw text output of online ASR.

The quantized model is only 7MB, which is suitable for online ASR on edge devices.

Copy link
Copy Markdown
Collaborator

@csukuangfj csukuangfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Left some minor comments. Otherwise, it looks great to me.

Comment thread sherpa-onnx/csrc/online-cnn-bilstm-model.cc Outdated
Comment thread sherpa-onnx/csrc/online-punctuation-cnn-bilstm-impl.h Outdated
Comment thread sherpa-onnx/csrc/online-punctuation-cnn-bilstm-impl.h Outdated
Comment thread sherpa-onnx/csrc/online-punctuation-model-config.cc Outdated
Comment thread sherpa-onnx/csrc/online-punctuation-cnn-bilstm-impl.h Outdated
Comment thread sherpa-onnx/csrc/online-punctuation-cnn-bilstm-impl.h Outdated
Comment thread sherpa-onnx/csrc/online-punctuation-cnn-bilstm-impl.h Outdated
Comment thread sherpa-onnx/csrc/sherpa-onnx-online-punctuation.cc
Comment thread sherpa-onnx/csrc/sherpa-onnx-online-punctuation.cc Outdated
Comment thread sherpa-onnx/csrc/sherpa-onnx-online-punctuation.cc
@frankyoujian
Copy link
Copy Markdown
Contributor Author

frankyoujian commented Aug 6, 2024

@csukuangfj Have updated fix according to your comments.

@csukuangfj
Copy link
Copy Markdown
Collaborator

Could you fix the build error for android? Please see
https://github.com/k2-fsa/sherpa-onnx/actions/runs/10263762961/job/28396308494?pr=1224#step:4:2535

I think you have missed to include a header file.

@frankyoujian
Copy link
Copy Markdown
Contributor Author

Update a fix, hoping it can fix Android build.

@csukuangfj
Copy link
Copy Markdown
Collaborator

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants