yeyupiaoling / MASR

Pytorch实现的流式与非流式的自动语音识别框架,同时兼容在线和离线识别,目前支持Conformer、Squeezeformer、DeepSpeech2模型,支持多种数据增强方法。
Apache License 2.0
563 stars 100 forks source link

运行train.py时报错 #66

Closed Vickywhy closed 9 months ago

Vickywhy commented 10 months ago

您好,我在执行到train.py时发生如下报错: Traceback (most recent call last): File "train.py", line 25, in trainer.train(save_model_path=args.save_model_path, File "/home/WA22201024/MASR-develop/masr/trainer.py", line 474, in train dist.init_process_group(backend='nccl') File "/home/WA22201024/anaconda3/envs/masr1/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 754, in init_process_group store, rank, world_size = next(rendezvous_iterator) File "/home/WA22201024/anaconda3/envs/masr1/lib/python3.8/site-packages/torch/distributed/rendezvous.py", line 236, in _env_rendezvous_handler rank = int(_get_env_or_raise("RANK")) File "/home/WA22201024/anaconda3/envs/masr1/lib/python3.8/site-packages/torch/distributed/rendezvous.py", line 221, in _get_env_or_raise raise _env_error(env_var) ValueError: Error initializing torch.distributed using env:// rendezvous: environment variable RANK expected, but not set 请问这是什么问题,我要如何解决呢

yeyupiaoling commented 10 months ago

命令前面加上CUDA_VISIBLE_DEVICES=0,指定某一张卡

Vickywhy commented 10 months ago

好的,可以跑了,谢谢!

Vickywhy commented 10 months ago

我还有个问题啊,如果我测试自己录的音频文件,那么对这个音频文件有什么要求吗

yeyupiaoling commented 10 months ago

我还有个问题啊,如果我测试自己录的音频文件,那么对这个音频文件有什么要求吗

这个你可以参考gui那个程序的录音识别。