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

请问Sherpa_ONNX框架下的ASR模型的output是如何与tokens.txt中的文字对应起来的呢? #922

Closed zihanyue closed 4 months ago

zihanyue commented 4 months ago

新手提问,在Sherpa_ONNX框架下,ASR模型的output应该是一个二维数组(如果没错的话),那么这个output是如何与tokens.txt中的文字对应起来的呢?谢谢!

我现在用的模型是sherpa-onnx-paraformer-zh-small-2024-03-09

csukuangfj commented 4 months ago

请自行查看解码的代码。最后是一个1-d 的数组。