You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It failed with CoreML on macOS but works with CPU.
Log:
cargo run --example punctuate Compiling sherpa-rs v0.5.1-beta.0 (/Volumes/Internal/sherpa-rs) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.30s Running `target/debug/examples/punctuate`/Users/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/c-api/c-api.cc:SherpaOnnxCreateOfflinePunctuation:1589 OfflinePunctuationConfig(model=OfflinePunctuationModelConfig(ct_transformer="./sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12/model.onnx", num_threads=1, debug=True, provider="coreml"))/Users/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/csrc/offline-ct-transformer-model.cc:Init:117 vocab_size: 272727num_punctuations: 6punctuations: <unk> _ , 。 ? 、 --------------------2024-10-20 02:46:26.496 punctuate[784:1415639] 2024-10-20 02:46:26.496798 [E:onnxruntime:, sequential_executor.cc:514 ExecuteKernel] Non-zero status code returned while running CoreML_15887252831431197149_7 node. Name:'CoreMLExecutionProvider_CoreML_15887252831431197149_7_7' Status Message: Error executing model: Unable to compute the prediction using a neural network model. It can be an invalid input data or broken/unsupported model (error code: -1).fatal runtime error: Rust cannot catch foreign exceptions[1] 784 abort cargo run --example punctuate
Code:
/*We assume you have pre-downloaded the model files for testingfrom https://github.com/k2-fsa/sherpa-onnx/releases/tag/punctuation-modelswget https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2tar xvf sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2rm sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2cargo run --example punctuate*/fnmain(){let model = "./sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12/model.onnx";let sentences = ["这是一个测试你好吗How are you我很好thank you are you ok谢谢你","我们都是木头人不会说话不会动","The African blogosphere is rapidly expanding bringing more voices online in the form of commentaries opinions analyses rants and poetry"];let config = sherpa_rs::punctuate::PunctuationConfig{model: model.into(),debug:true,
..Default::default()};letmut punctuate = sherpa_rs::punctuate::Punctuation::new(config).unwrap();println!("--------------------");for sentence in sentences {let punctuated = punctuate.add_punctuation(&sentence);println!("Input text: {}", sentence);println!("Output text: {}", punctuated);println!("--------------------");}}
The text was updated successfully, but these errors were encountered:
It failed with CoreML on macOS but works with CPU.
Log:
Code:
The text was updated successfully, but these errors were encountered: