Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Không chạy được file train.py #35

Open
ductandev opened this issue Jul 9, 2019 · 16 comments
Open

Không chạy được file train.py #35

ductandev opened this issue Jul 9, 2019 · 16 comments

Comments

@ductandev
Copy link

cho em hỏi lỗi như này thì khắc phục làm sao vậy ạ ! em có tìm kiếm trên google nhưng không tìm thấy cách để khắc phục lỗi này ! xin giúp đỡ cho em !

Traceback (most recent call last):
File "train.py", line 1, in
from egs.vivos.extension.model import KaldiSpeechRecognition
ModuleNotFoundError: No module named 'egs'

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

bạn chạy từ command line bằng lệnh: python -m egs.vivos.train thử nhé

@ductandev
Copy link
Author

em có chạy thử comand line và nó lại xuất hiện lỗi như sau :

/home/tan/anaconda3/bin/python: Error while finding module specification for 'egs.vivos.train' (ModuleNotFoundError: No module named 'egs')

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

Bạn thử python3 -m egs.vivos.train

@ductandev
Copy link
Author

Em đã thử luôn rồi và nó lại xuất hiện lỗi tương tự như trên . Không biết là minh còn cách nào khác để khắc phục không vậy ạ ! Em đang sài phiên bản Ubuntu 18.04

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

bạn run pwd từ command line xem đường dẫn bạn run có phải đang trong automatic_speech_recognition chưa nhé

@ductandev
Copy link
Author

em đã run trong /home/tan/automatic_speech_recognition/egs/vivos
mà vẫn không được luôn a .

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

em run trong /home/tan/automatic_speech_recognition nhé, đừng run từ vivos dir

@ductandev
Copy link
Author

ductandev commented Jul 9, 2019

em đã run và nó lại xuất hiện như sau:

usage: train.py [-h] --kaldi_folder KALDI_FOLDER --corpus_folder CORPUS_FOLDER
[--export_path EXPORT_PATH] [--nj NJ] [--method METHOD]
train.py: error: the following arguments are required: --kaldi_folder, --corpus_folder

không biết là em nên làm gì bước tiếp theo vậy ạ !

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

có nghĩa là bạn phải thêm: --kaldi_folder và --corpus_folder sau lệnh train, ví dụ:
python3 -m egs.vivos.train --kaldi_folder /home/tan/kaldi_trunk --corpus_folder /home/tan/vivos/corpus

@ductandev
Copy link
Author

em rất cảm ơn vì sự giúp đỡ của anh nhưng rất tiếc là em vẫn chưa làm được, do em chưa có kiến thức sâu về vấn đề này và em chỉ mới bắt đầu tìm hiểu gần đây, không biết là anh có cách nào khác để giúp em không ạ ! em có thử chạy lệnh ở trên và nó xuất hiện như sau :

tan@tan-VirtualBox:~/automatic_speech_recognition$ python3 -m egs.vivos.train --kaldi_folder /home/tan/kaldi_trunk --corpus_folder /home/tan/vivos
Traceback (most recent call last):
File "/home/tan/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/tan/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/tan/automatic_speech_recognition/egs/vivos/train.py", line 28, in
train(args.kaldi_folder, args.corpus_folder, args.export_path,args.nj,args.method)
File "/home/tan/automatic_speech_recognition/egs/vivos/train.py", line 23, in train
model = KaldiSpeechRecognition(corpus_folder, kaldi_folder, params)
File "/home/tan/automatic_speech_recognition/egs/vivos/extension/model.py", line 36, in init
train_list = os.listdir("{}/{}/wav".format(self.corpus_folder, "train"))
FileNotFoundError: [Errno 2] No such file or directory: '/home/tan/vivos/train/wav'

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

@fulloption1998 Cứ bình tĩnh thử từ từ bạn, đừng bỏ, ai cũng bắt đầu từ số 0.
Về lỗi bạn đang gặp phải là do bạn chưa tải data về để train, bạn search bộ dữ liệu vivos rồi bỏ vào project thư mục data/vivos. Sau đó bạn chạy preprocess.py, rồi hãy bắt đầu run train như trên lại nhé.

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

Do chưa cập nhật hướng dẫn rõ ràng nên các bạn cũng khó setup và tốn thời gian. Mình sẽ cập nhật lại hướng dẫn setup kĩ hơn.

@rain1024
Copy link
Contributor

rain1024 commented Jul 9, 2019

@Pubbus đã trở lại à?

Các bạn đều rất mong reproduce được thử nghiệm này @Pubbus ạ :D

@luiyen
Copy link
Collaborator

luiyen commented Jul 9, 2019

Dạ em đã trở lại :D.

@ductandev
Copy link
Author

dạ em cảm ơn anh ạ ! Mong là sẽ sớm nhận được cập nhật mới nhất cụ thể hơn đến từ anh ! em chân thành cảm ơn anh vì đã giúp đỡ cho em ạ !

@ductandev
Copy link
Author

ductandev commented Jul 11, 2019

**em đã tải dữ liệu (vivos) bỏ vào project thư mục (data/vivos). Sau đó em chạy (preprocess.py) ở (data/vivos) đã thành công rồi và nó đã xuất hiện được file dữ liệu (corpus). Bây giờ em bắt đầu chạy lệnh như anh nói ở trên và nó xuất hiện như sau thì không biết em nên làm sao để khắc phục tiếp nó đây ạ !

-Lệnh mà em chạy:
python3 -m egs.vivos.train --kaldi_folder /home/tan/kaldi_trunk --corpus_folder /home/tan/kaldi-trunk/automatic_speech_recognition/data/vivos/corpus

-Sau khi chạy xuất hiện :
Init Kaldi Speech Recognition in uts_658 folder
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
sh: 1: cd: can't cd to /home/tan/kaldi_trunk/egs/uts_658
Traceback (most recent call last):
File "/home/tan/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/tan/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/tan/kaldi-trunk/automatic_speech_recognition/egs/vivos/train.py", line 28, in
train(args.kaldi_folder, args.corpus_folder, args.export_path,args.nj,args.method)
File "/home/tan/kaldi-trunk/automatic_speech_recognition/egs/vivos/train.py", line 23, in train
model = KaldiSpeechRecognition(corpus_folder, kaldi_folder, params)
File "/home/tan/kaldi-trunk/automatic_speech_recognition/egs/vivos/extension/model.py", line 44, in init
self._config()
File "/home/tan/kaldi-trunk/automatic_speech_recognition/egs/vivos/extension/model.py", line 203, in _config
open(outfile, "w").write(content)
FileNotFoundError: [Errno 2] No such file or directory: '/home/tan/kaldi_trunk/egs/uts_658/conf/decode.config'
-------------------------------------------------------------------------------------------------------------------**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants