k2-fsa / sherpa

Speech-to-text server framework with next-gen Kaldi
https://k2-fsa.github.io/sherpa
Apache License 2.0
477 stars 97 forks source link

Using the onnx model exported by the latest zipformer2, there is a problem with sherpa-onnx inference #503

Open lucy9527 opened 8 months ago

lucy9527 commented 8 months ago

使用最新的zipformer2训练模型,配置如下:

  ./zipformer/train.py \
    --world-size 1 \
    --num-epochs 100 \
    --start-epoch 1 \
    --num-workers 8  \
    --context-size 1 \
    --master-port 12346 \
    --lang-dir ./ \
    --use-fp16 1 \
    --on-the-fly-feats true \
    --exp-dir zipformer/exp \
    --max-duration 100

export_onnx.py导出模型,配置如下:

    --tokens $lang_dir/tokens.txt \
    --epoch 30 \
    --avg 2 \
    --exp-dir ./zipformer/exp

./sherpa-onnx/build-shared/bin/sherpa-onnx \ --tokens=lang_char/tokens.txt \ --encoder=$par/encoder-epoch-30-avg-2.onnx \ --decoder=$par/decoder-epoch-30-avg-2.onnx \ --joiner=$par/joiner-epoch-30-avg-2.onnx \ ./demo.wav 运行如下:

2023-11-08 16:32:23.640478208 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640559025 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640576743 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640593560 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640603194 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640613891 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640626106 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '930'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640635520 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640645007 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640693339 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640751766 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640765662 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640777343 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640788741 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640818898 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640829609 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640840478 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640853336 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '2184'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640864816 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640875604 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640935149 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640949005 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640960636 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640971506 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.640995589 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641010160 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '3488'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641033046 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641043128 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641055604 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641067756 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641128093 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641141944 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641153598 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641168439 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641179374 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '5256'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641191280 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641201979 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641214998 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641229454 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641240680 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641295012 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641309705 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641325703 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641337510 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641353328 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641363360 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641377163 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '7468'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641386785 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641397321 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641408514 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641466814 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641480968 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641497221 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641508586 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641523011 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641533505 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641544508 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641556120 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '9214'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641565569 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:23.641574903 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.965930946 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.965968948 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.965980263 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.965991761 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966001767 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966010697 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966021085 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '930'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966031002 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966040758 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966050242 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/0/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966144471 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966156429 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966166177 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966175961 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966187968 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966198132 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966220721 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966232480 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '2184'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966243079 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966252663 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966326403 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966337328 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966347346 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966356838 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966380904 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966393124 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '3488'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966405932 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966415806 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966425272 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966436194 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966494124 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966505551 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966515823 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966525729 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966536893 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '5256'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966548493 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966557588 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966569501 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966583634 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966596782 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966653339 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966666572 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966704924 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966715735 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966727822 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966736974 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966745750 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '7468'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966754873 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966764486 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966773957 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966833500 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966845908 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966872820 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966883942 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966907301 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966917121 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966941007 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966951203 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '9214'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966963044 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2023-11-08 16:32:26.966972688 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
/ceph/luhongxuan/code/k2/test/sherpa-onnx/sherpa-onnx/csrc/online-zipformer2-transducer-model.cc:InitEncoder:101 encoder_dims does not exist in the metadata
csukuangfj commented 8 months ago

使用最新的zipformer2训练模型,配置如下:

从你给的配置看,你用的是非流式。因为你没有用 --causal=1.


./sherpa-onnx/build-shared/bin/sherpa-onnx 这个只支持流式模型。

你不要把非流式的模型和流式的代码混用了。

针对你这个情况,请使用 sherpa-onnx-offline 等支持非流式模型的 binaries.

lucy9527 commented 8 months ago

Sorry to bother you, but three more questions! 1、sherpa编译报错,部分截取如下

python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `cudaGraphInstantiateWithFlags@libcudart.so.11.0'
anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `ncclCommCount'
anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `cusparseSpSM_destroyDescr@libcusparse.so.11'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `ncclCommInitAll'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `cusparseSpSV_analysis@libcusparse.so.11'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `ncclAllGather'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libc10_cuda.so: undefined reference to `cudaMemPoolTrimTo@libcudart.so.11.0'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `ncclReduce'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cuptiMetricGetIdFromName@libcupti.so.11.7'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libc10_cuda.so: undefined reference to `cudaMallocAsync@libcudart.so.11.0'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `cusparseSpSM_bufferSize@libcusparse.so.11'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cuptiEventGetIdFromName@libcupti.so.11.7'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cuptiActivityEnable@libcupti.so.11.7'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `cusparseSpMatSetAttribute@libcusparse.so.11'
/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so: undefined reference to `cuptiActivityDisable@libcupti.so.11.7'
collect2: error: ld returned 1 exit status
make[2]: *** [sherpa/cpp_api/websocket/CMakeFiles/sherpa-offline-websocket-server.dir/build.make:135: bin/sherpa-offline-websocket-server] Error 1
make[1]: *** [CMakeFiles/Makefile2:641: sherpa/cpp_api/websocket/CMakeFiles/sherpa-offline-websocket-server.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

conda list | grep cuda

k2                        1.24.3.dev20230718+cuda11.7.torch2.0.1          pypi_0    pypi
k2-sherpa                 1.3.dev20230725+cuda11.7.torch2.0.1          pypi_0    pypi
kaldifeat                 1.25.0.dev20231022+cuda11.7.torch2.0.1          pypi_0    pypi
nvidia-cuda-cupti-cu11    11.7.101                 pypi_0    pypi
nvidia-cuda-nvrtc-cu11    11.7.99                  pypi_0    pypi
nvidia-cuda-runtime-cu11  11.7.99                  pypi_0    pypi

分析:是不是安装都是cuda11.7版本,linux环境目前只有cuda11.1/2版本,是不是得重装 k2 等,再编译

2、sherpa-onnx -> build-static编译报错部分截取如下:

beam_search_scorer.cc:(.text._ZNSt17_Function_handlerIFvPN11onnxruntime7contrib12transformers14BeamHypothesesEEZNS0_10IAllocator13MakeUniquePtrIS3_EESt10unique_ptrIT_St8functionIFvPS9_EEESt10shared_ptrIS6_EmbPNS0_6StreamESA_IFvRSH_RNS0_11synchronize12NotificationEEEEUlS4_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation[_ZNSt17_Function_handlerIFvPN11onnxruntime7contrib12transformers14BeamHypothesesEEZNS0_10IAllocator13MakeUniquePtrIS3_EESt10unique_ptrIT_St8functionIFvPS9_EEESt10shared_ptrIS6_EmbPNS0_6StreamESA_IFvRSH_RNS0_11synchronize12NotificationEEEEUlS4_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation]+0xe1): undefined reference to `__libc_single_threaded'
../../_deps/onnxruntime-src/lib/libonnxruntime.a(beam_search_scorer.cc.o): In function `std::_Function_handler<void (onnxruntime::contrib::transformers::HypothesisScore*), std::unique_ptr<onnxruntime::contrib::transformers::HypothesisScore, std::function<void (onnxruntime::contrib::transformers::HypothesisScore*)> > onnxruntime::IAllocator::MakeUniquePtr<onnxruntime::contrib::transformers::HypothesisScore>(std::shared_ptr<onnxruntime::IAllocator>, unsigned long, bool, onnxruntime::Stream*, std::function<void (onnxruntime::Stream&, onnxruntime::synchronize::Notification&)>)::{lambda(onnxruntime::contrib::transformers::HypothesisScore*)#1}>::_M_manager(std::_Any_data&, std::_Function_handler<void (onnxruntime::contrib::transformers::HypothesisScore*), std::unique_ptr<onnxruntime::contrib::transformers::HypothesisScore, std::function<void (onnxruntime::contrib::transformers::HypothesisScore*)> > onnxruntime::IAllocator::MakeUniquePtr<onnxruntime::contrib::transformers::HypothesisScore>(std::shared_ptr<onnxruntime::IAllocator>, unsigned long, bool, onnxruntime::Stream*, std::function<void (onnxruntime::Stream&, onnxruntime::synchronize::Notification&)>)::{lambda(onnxruntime::contrib::transformers::HypothesisScore*)#1}> const&, std::_Manager_operation)':
beam_search_scorer.cc:(.text._ZNSt17_Function_handlerIFvPN11onnxruntime7contrib12transformers15HypothesisScoreEEZNS0_10IAllocator13MakeUniquePtrIS3_EESt10unique_ptrIT_St8functionIFvPS9_EEESt10shared_ptrIS6_EmbPNS0_6StreamESA_IFvRSH_RNS0_11synchronize12NotificationEEEEUlS4_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation[_ZNSt17_Function_handlerIFvPN11onnxruntime7contrib12transformers15HypothesisScoreEEZNS0_10IAllocator13MakeUniquePtrIS3_EESt10unique_ptrIT_St8functionIFvPS9_EEESt10shared_ptrIS6_EmbPNS0_6StreamESA_IFvRSH_RNS0_11synchronize12NotificationEEEEUlS4_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation]+0x54): undefined reference to `__libc_single_threaded'
beam_search_scorer.cc:(.text._ZNSt17_Function_handlerIFvPN11onnxruntime7contrib12transformers15HypothesisScoreEEZNS0_10IAllocator13MakeUniquePtrIS3_EESt10unique_ptrIT_St8functionIFvPS9_EEESt10shared_ptrIS6_EmbPNS0_6StreamESA_IFvRSH_RNS0_11synchronize12NotificationEEEEUlS4_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation[_ZNSt17_Function_handlerIFvPN11onnxruntime7contrib12transformers15HypothesisScoreEEZNS0_10IAllocator13MakeUniquePtrIS3_EESt10unique_ptrIT_St8functionIFvPS9_EEESt10shared_ptrIS6_EmbPNS0_6StreamESA_IFvRSH_RNS0_11synchronize12NotificationEEEEUlS4_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation]+0xe1): undefined reference to `__libc_single_threaded'
../../_deps/onnxruntime-src/lib/libonnxruntime.a(beam_search_scorer.cc.o): In function `gsl::span<onnxruntime::contrib::transformers::HypothesisScore, 18446744073709551615ul> onnxruntime::rnn::detail::Allocate<onnxruntime::contrib::transformers::HypothesisScore>(std::shared_ptr<onnxruntime::IAllocator>, unsigned long, std::unique_ptr<onnxruntime::contrib::transformers::HypothesisScore, std::function<void (onnxruntime::contrib::transformers::HypothesisScore*)> >&, bool, onnxruntime::contrib::transformers::HypothesisScore)':
beam_search_scorer.cc:(.text._ZN11onnxruntime3rnn6detail8AllocateINS_7contrib12transformers15HypothesisScoreEEEN3gsl4spanIT_Lm18446744073709551615EEESt10shared_ptrINS_10IAllocatorEEmRSt10unique_ptrIS8_St8functionIFvPS8_EEEbS8_[_ZN11onnxruntime3rnn6detail8AllocateINS_7contrib12transformers15HypothesisScoreEEEN3gsl4spanIT_Lm18446744073709551615EEESt10shared_ptrINS_10IAllocatorEEmRSt10unique_ptrIS8_St8functionIFvPS8_EEEbS8_]+0x1b3): undefined reference to `__libc_single_threaded'
../../_deps/onnxruntime-src/lib/libonnxruntime.a(beam_search_scorer.cc.o):beam_search_scorer.cc:(.text._ZN11onnxruntime3rnn6detail8AllocateINS_7contrib12transformers14BeamHypothesesEEEN3gsl4spanIT_Lm18446744073709551615EEESt10shared_ptrINS_10IAllocatorEEmRSt10unique_ptrIS8_St8functionIFvPS8_EEEbS8_[_ZN11onnxruntime3rnn6detail8AllocateINS_7contrib12transformers14BeamHypothesesEEEN3gsl4spanIT_Lm18446744073709551615EEESt10shared_ptrINS_10IAllocatorEEmRSt10unique_ptrIS8_St8functionIFvPS8_EEEbS8_]+0x1b3): more undefined references to `__libc_single_threaded' follow
../../_deps/onnxruntime-src/lib/libonnxruntime.a(utils.cc.o): In function `std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > >, true>* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > >, true> > >::_M_allocate_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > const&>(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > const&) [clone .isra.0]':
utils.cc:(.text._ZNSt8__detail16_Hashtable_allocISaINS_10_Hash_nodeISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEELb1EEEEE16_M_allocate_nodeIJRKSD_EEEPSE_DpOT_.isra.0+0x19e): undefined reference to `std::__throw_bad_array_new_length()'
../../_deps/onnxruntime-src/lib/libonnxruntime.a(utils.cc.o): In function `void std::vector<onnxruntime::QDQ::NodeGroup, std::allocator<onnxruntime::QDQ::NodeGroup> >::_M_realloc_insert<onnxruntime::QDQ::NodeGroup const&>(__gnu_cxx::__normal_iterator<onnxruntime::QDQ::NodeGroup*, std::vector<onnxruntime::QDQ::NodeGroup, std::allocator<onnxruntime::QDQ::NodeGroup> > >, onnxruntime::QDQ::NodeGroup const&)':
utils.cc:(.text._ZNSt6vectorIN11onnxruntime3QDQ9NodeGroupESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_[_ZNSt6vectorIN11onnxruntime3QDQ9NodeGroupESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_]+0x366): undefined reference to `std::__throw_bad_array_new_length()'
utils.cc:(.text._ZNSt6vectorIN11onnxruntime3QDQ9NodeGroupESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_[_ZNSt6vectorIN11onnxruntime3QDQ9NodeGroupESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_]+0x375): undefined reference to `std::__throw_bad_array_new_length()'
../../_deps/onnxruntime-src/lib/libonnxruntime.a(utils.cc.o): In function `onnxruntime::QDQ::SelectorManager::InitializeSelectorsMap()':
utils.cc:(.text._ZN11onnxruntime3QDQ15SelectorManager22InitializeSelectorsMapEv+0x5e3): undefined reference to `std::__throw_bad_array_new_length()'
../../_deps/onnxruntime-src/lib/libonnxruntime.a(utils.cc.o): In function `onnxruntime::QDQ::SelectorManager::GetQDQSelections(onnxruntime::GraphViewer const&) const':
utils.cc:(.text._ZNK11onnxruntime3QDQ15SelectorManager16GetQDQSelectionsERKNS_11GraphViewerE+0x92f): undefined reference to `std::__throw_bad_array_new_length()'
../../_deps/onnxruntime-src/lib/libonnxruntime.a(utils.cc.o):utils.cc:(.text._ZNK11onnxruntime3QDQ15SelectorManager16GetQDQSelectionsERKNS_11GraphViewerE+0xc43): more undefined references to `std::__throw_bad_array_new_length()' follow
../../_deps/onnxruntime-src/lib/libonnxruntime.a(regexp.cc.o): In function `re2::ConvertRunesToBytes(bool, int*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
regexp.cc:(.text._ZN3re219ConvertRunesToBytesEbPiiPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xbe): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve()'
collect2: error: ld returned 1 exit status
make[2]: *** [sherpa-onnx/csrc/CMakeFiles/sherpa-onnx-offline-tts.dir/build.make:103: bin/sherpa-onnx-offline-tts] Error 1
make[1]: *** [CMakeFiles/Makefile2:1899: sherpa-onnx/csrc/CMakeFiles/sherpa-onnx-offline-tts.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

3、请问k2的WASR在大数据集和中文效果怎么样啊?

csukuangfj commented 8 months ago

1、sherpa编译报错,部分截取如下

Please don't use conda, use pip instead.

Please follow

  1. https://k2-fsa.github.io/k2/installation/cuda-cudnn.html to install cudatoolkit
  2. https://k2-fsa.github.io/k2/installation/from_wheels.html to install torch and k2

(Never use conda install)

分析:是不是安装都是cuda11.7版本,linux环境目前只有cuda11.1/2版本,是不是得重装 k2 等,再编译

请先看 nvidia-smi 的输出, cuda 版本是多少。(别看 nvcc --version, 是看 nvidia-smi)


2、sherpa-onnx -> build-static编译报错部分截取如下:

Please either use -DBUILD_SHARED_LIBS=ON or use GCC > 9

3、请问k2的WASR在大数据集和中文效果怎么样啊?

这个问题,请去 icefall 的那个 pull request 里面去问下作者。

lucy9527 commented 8 months ago

1、sherpa编译问题:

/usr/bin/ld: warning: libnccl.so.2, needed by **/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so, not found (try using -rpath or -rpath-link)
**/anaconda3/envs/k2/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined reference to `ncclRecv'
**/anaconda3/envs/k2/lib/python3.8/site-packages/k2/lib/libk2fsa.so: undefined reference to `std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'

得安装nccl吗?GLIBCXX_3.4.26?

csukuangfj commented 8 months ago

1、sherpa编译问题:

请参考上面的链接:

  1. 安装 cudatoolkit
  2. 安装 torch
  3. 安装 k2

别用 conda install 去安装 torch 和 cudatoolkit. 再重复一遍,不要用 conda install.

csukuangfj commented 8 months ago

安装新一代 kaldi 里面的项目,请完全按照我们提供的文档来。

如果你能自己解决问题,可以自行发挥。不然,请按照我们提供的文档,谢谢合作。

lucy9527 commented 8 months ago

好的,感谢!