操作系统ubuntu,gcc 和 glibc 版本均和notebook一致,但是在本地机器运行到 run_auto_label 就报错了,相关代码(按示例):
from modelscope.tools import run_auto_label
input_wav = "./test_female"
output_data = "./output_training_data"
ret, report = run_auto_label(input_wav=input_wav, work_dir=output_data, resource_revision="v1.0.4")
(试试看,为什么文章老被截断………………)
报错信息(含调用栈):
(test) summer K@summerK-HP-Z420-Workstation:~/dev/test$ python label.py
2023-04-19 21:49:07,056 - modelscope - INFO - Use user-specified model revision: v1.0.4
2023-04-19:21:49:07, INFO [api.py:463] Use user-specified model revision: v1.0.4
--- Remove /home/summerK/dev/test/output_training_data/paragraph/prosody folder! ---
--- New folder /home/summerK/dev/test/output_training_data/paragraph/prosody... ---
--- OK ---
--- Remove /home/summerK/dev/test/output_training_data/log folder! ---
--- New folder /home/summerK/dev/test/output_training_data/log... ---
--- OK ---
2023-04-19:21:49:36, INFO [auto_label.py:289] 2023-04-19 21:49:36
2023-04-19:21:49:36, INFO [auto_label.py:340] wav_preprocess start...
--- There is this folder! ---
100%|██████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 83.22it/s]
/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/audio2phone/rapid_paraformer/utils/utils.py:181: RuntimeWarning: CUDAExecutionProvider is not avaiable for current env, the inference part is automatically shifted to be executed under CPUExecutionProvider.
Please ensure the installed onnxruntime-gpu version matches your cuda and cudnn version, you can check their relations from the offical web site: https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html
RuntimeWarning)
[2023/04/19 21:49:38] rapdi_paraformer INFO: Audio to text start...
100%|██████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 9.61it/s]
2023-04-19:21:49:39, INFO [audio2prosody.py:104] Text to label start...
100%|████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1768.63it/s]
text.cc: festival_Text_init
pre-break recording in paragraph by vad.
no need to break sentence!!!
2023-04-19:21:49:44, INFO [auto_label.py:759] Generate phone interval by asr align.
--- Remove /home/summerK/dev/test/output_training_data/align folder! ---
--- New folder /home/summerK/dev/test/output_training_data/align... ---
--- OK ---
prosody_dir=/home/summerK/dev/test/output_training_data/paragraph/prosody
run_asr_align step 2
speak_script=/home/summerK/dev/test/output_training_data/align/script.txt
2023-04-19:21:49:44, INFO [asr_align.py:189] job_num=2 process_num=4 fbank_config=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/fbank.conf, data_dir=/home/summerK/dev/test/output_training_data/align/gen/data, fbank_dir=/home/summerK/dev/test/output_training_data/align/gen/fbank
2023-04-19:21:49:44, INFO [make_fbank.py:48] run make_fbank with num=2 config_path=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/fbank.conf
2023-04-19:21:49:44, INFO [make_fbank.py:49] data_path=/home/summerK/dev/test/output_training_data/align/gen/data fbank_path=/home/summerK/dev/test/output_training_data/align/gen/fbank
2023-04-19:21:49:44, INFO [make_fbank.py:62] [{'id': 't', 'wav': '/home/summerK/dev/test/output_training_data/wav/t.wav'}, {'id': 'test', 'wav': '/home/summerK/dev/test/output_training_data/wav/test.wav'}]
100%|██████████████████████████████████████████████████████████████████| 2/2 [00:10<00:00, 5.02s/it]
2023-04-19:21:49:54, INFO [make_fbank.py:77] DONE compute fbank and copy feats
2023-04-19:21:49:54, INFO [make_fbank.py:84] DONE!
2023-04-19:21:49:54, INFO [asr_align.py:193] job_num=2 process_num=4 data_dir=/home/summerK/dev/test/output_training_data/align/gen/data lm_dir=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/lang am_dir=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2, fbank_dir=/home/summerK/dev/test/output_training_data/align/gen/fbank, align_dir=/home/summerK/dev/test/output_training_data/align/gen/align
2023-04-19:21:49:54, INFO [align_wave.py:274] [{'id': 't', 'ark': '/home/summerK/dev/test/output_training_data/align/gen/fbank/raw_fbank_data.t.ark', 'scp': '/home/summerK/dev/test/output_training_data/align/gen/fbank/raw_fbank_data.t.scp'}, {'id': 'test', 'ark': '/home/summerK/dev/test/output_training_data/align/gen/fbank/raw_fbank_data.test.ark', 'scp': '/home/summerK/dev/test/output_training_data/align/gen/fbank/raw_fbank_data.test.scp'}]
2023-04-19:21:50:08, INFO [align_wave.py:276] Feature preprocessing start...
0%| | 0/2 [00:10<?, ?it/s]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/summerK/anaconda3/envs/test/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/align_wave.py", line 109, in do_nnet_forward
return {'ret': run_kaldi_bin('nnet-forward', nnet_forward_opts), 'index':index, 'score': score, 'scp': final_scp, 'ark': final_ark}
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/run_kaldi_bin.py", line 14, in run_kaldi_bin
stderr=subprocess.DEVNULL)
File "/home/summerK/anaconda3/envs/test/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/kaldi_bin/nnet-forward.py', '--no-softmax=true', '--prior-scale=1.0', '--feature-transform=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/lstm.mvn', '--class-frame-counts=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/lstm.prior', '--use-gpu=no', '/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/lstm.net', 'ark:/home/summerK/dev/test/output_training_data/align/gen/fbank/final_fbank_data.t.ark', 'ark:/home/summerK/dev/test/output_training_data/align/gen/fbank/score.t.ark']' died with <Signals.SIGILL: 4>.
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "label.py", line 6, in <module>
ret, report = run_auto_label(input_wav=input_wav, work_dir=output_data, resource_revision="v1.0.4")
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/modelscope/tools/speech_tts_autolabel.py", line 77, in run_auto_label
ret_code, report = auto_labeling.run()
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/auto_label.py", line 760, in run
self.asr_align()
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/auto_label.py", line 460, in asr_align
run_asr_align(self.resource_dir, align_output, script_file, self.out_wav_dir, job_num = self.align_job_num, process_num=self.process_num)
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/asr_align.py", line 521, in run_asr_align
process(job_num, process_num, lm_dir, am_dir, working_dir, speak_script, wave_dir, engine_test_dir, engine_data_dir, sy2ph_map, step)
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/asr_align.py", line 488, in process
align_wave(job_num, process_num, data_dir, lm_dir, am_dir, fbank_dir, align_dir)
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/asr_align.py", line 194, in align_wave
do_wave_align(job_num, process_num, lm_dir, am_dir, data_dir, fbank_dir, align_dir)
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/align_wave.py", line 277, in do_wave_align
feats_list = feat_preprocess(num, process_num, am, data_path, feat_path, feats_list)
File "/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/align_wave.py", line 139, in feat_preprocess
ret = v.get()
File "/home/summerK/anaconda3/envs/test/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
subprocess.CalledProcessError: Command '['python', '/home/summerK/anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/kaldi_bin/nnet-forward.py', '--no-softmax=true', '--prior-scale=1.0', '--feature-transform=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/lstm.mvn', '--class-frame-counts=/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/lstm.prior', '--use-gpu=no', '/home/summerK/.cache/modelscope/hub/damo/speech_ptts_autolabel_16k/model/fsmn_16k_2/lstm.net', 'ark:/home/summerK/dev/test/output_training_data/align/gen/fbank/final_fbank_data.t.ark', 'ark:/home/summerK/dev/test/output_training_data/align/gen/fbank/score.t.ark']' died with <Signals.SIGILL: 4>.
进入到 /anaconda3/envs/test/lib/python3.7/site-packages/tts_autolabel/kaldi_bin/nnet-forward.py 文件,注释掉
nnet_bin_exe.nnet_forward(sys.argv)
这一行,就不会报错,但是相关文件也不生成了, 疑似兼容性问题,求大佬解答,万谢。
sudo apt-get install libsndfile1 也已经安装, 并且在创空间运行,查看日志,同样是在这一个步骤报错了。