k2-fsa / sherpa-onnx

Speech-to-text, text-to-speech, speaker recognition, and VAD using next-gen Kaldi with onnxruntime without Internet connection. Support embedded systems, Android, iOS, Raspberry Pi, RISC-V, x86_64 servers, websocket server/client, C/C++, Python, Kotlin, C#, Go, NodeJS, Java, Swift, Dart, JavaScript, Flutter, Object Pascal, Lazarus, Rust
https://k2-fsa.github.io/sherpa/onnx/index.html
Apache License 2.0
3.34k stars 391 forks source link

Can python version output the timestamp information? #506

Closed OswaldoBornemann closed 9 months ago

OswaldoBornemann commented 9 months ago

Can python version output the timestamp information?

csukuangfj commented 9 months ago

Yes, it is definitely possible.

OswaldoBornemann commented 9 months ago

Is there any related document to implement it?

OswaldoBornemann commented 9 months ago

Oh i see. I have seen the timestamps function in recognizer.

OswaldoBornemann commented 9 months ago

Can the other pretrained models, such as paraformer, support the timestamp function? It seems that when I use paraformer, the timestamp output is empty.

csukuangfj commented 9 months ago

It seems that when I use paraformer, the timestamp output is empty.

Not all paraformer models support timestamps.

If you use the following one, you should be able to get timestamp information, as you can see from the doc. https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-09-14-chinese

Screenshot 2023-12-29 at 11 24 35

OswaldoBornemann commented 9 months ago

Thank you very much.