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

GIÚP ĐỠ CÁCH CHẠY FILE "train.py" #34

Open
HuynhKEn opened this issue Feb 20, 2019 · 27 comments
Open

GIÚP ĐỠ CÁCH CHẠY FILE "train.py" #34

HuynhKEn opened this issue Feb 20, 2019 · 27 comments

Comments

@HuynhKEn
Copy link

No description provided.

@HuynhKEn
Copy link
Author

HuynhKEn commented Feb 20, 2019

Mọi người ơi em chạy file train.py
lệnh em như thế này:
python /home/l/kaldi-trunk/automatic_speech_recognition/egs/vivos/train.py --kaldi_folder /home/l/kaldi-trunk/ --corpus_folder /home/l/kaldi-trunk/automatic_speech_recognition/data/vivos/corpus --nj 10 --method lda_mlt
Lỗi:
from egs.vivos.extension.model import KaldiSpeechRecognition
ImportError: No module named egs.vivos.extension.model

Ai biết chỉ em giùm

@HuynhKEn HuynhKEn changed the title GIÚP ĐỠ CÁCH CHẠY FILE GIÚP ĐỠ CÁCH CHẠY FILE "train.py" Feb 20, 2019
@HuynhKEn
Copy link
Author

HuynhKEn commented Feb 20, 2019

Em đã sửa được lỗi bây giờ em chạy file preprocess.py trong thư mục data/vivos/ nó báo lỗi như thế này:
Traceback (most recent call last):
File "preprocess.py", line 111, in
create_train_text()
File "preprocess.py", line 43, in create_train_text
content = open("raw/train/prompts.txt").read()
IOError: [Errno 2] No such file or directory: 'raw/train/prompts.txt

@luiyen
Copy link
Collaborator

luiyen commented Feb 21, 2019

@HuynhKEn Bạn chạy file preprocess.py trong data/vivos nhé, đừng chạy trong egs/vivos.

@maxcogay
Copy link

Cảm ơn anh đã phản hồi. Em chạy trong data/vivos và bị lỗi như vậy đó anh

@luiyen
Copy link
Collaborator

luiyen commented Feb 21, 2019

@maxcogay Bạn đã tải dữ liệu vivos và bỏ vào data chưa?

@HuynhKEn
Copy link
Author

Dạ cảm ơn anh, em chưa tải ,em là sinh viên vì thế không có lộ trình chỉ toàn tìm hiểu. nên có gì mong anh giúp đỡ thêm

@HuynhKEn
Copy link
Author

HuynhKEn commented Feb 21, 2019

Anh có thể giúp em nên đọc hiểu code nên bắt đầu từ file nào không?

@HuynhKEn
Copy link
Author

WER 66%
em chạy file predict:
... LOG (lattice-best-path[5.5.203~1-6fc4]:main():lattice-best-path.cc:99) For utterance result:, best cost 148.163 + 35105.9 = 35254.1 over 492 frames. result: sẼ xÍ mÂu xÓt lÔ lÔ lo trỊ uỐng lÝ nÁm hy LOG (lattice-best-path[5.5.203~1-6fc4]:main():lattice-best-path.cc:124) Overall cost per frame is 71.6547 = 0.301143 [graph] + 71.3535 [acoustic] over 492 frames. LOG (lattice-best-path[5.5.203~1-6fc4]:main():lattice-best-path.cc:128) Done 1 lattices, failed for 0 sẼ xÍ mÂu xÓt lÔ lÔ lo trỊ uỐng lÝ nÁm hy Nội dung file wav: sẽ luôn nỗ lực bạn sẽ được đền đáp.
có cách nào cãi thiện không anh

@rain1024
Copy link
Contributor

@HuynhKEn Em chạy như thế nào? Huấn luyện trên dữ liệu nào? trong bao lâu? WER đang được đo trên tập nào?

Về việc cải tiến, anh đang tính sẽ thêm training data. Hiện tại training data đang ít quá

@HuynhKEn
Copy link
Author

HuynhKEn commented Feb 22, 2019

Lệnh train em chạy:
python3 /home/l/kaldi-trunk/automatic_speech_recognition/egs/vivos/train.py --kaldi_folder /home/l/kaldi-trunk/ --corpus_folder /home/l/kaldi-trunk/automatic_speech_recognition/data/vivos/corpus --nj 10 --method lda_mllt
Lệnh predict em chạy như thế này:
python3 /home/l/kaldi-trunk/automatic_speech_recognition/egs/vivos/predict.py --wav /home/l/kaldi-trunk/automatic_speech_recognition/data/vivos/raw/test/waves/VIVOSDEV01/VIVOSDEV01_R012.wav --kaldi_folder /home/l/kaldi-trunk/ --model_path /home/l/kaldi-trunk/egs/uts_736/exp/tri3a --utils_path /home/l/kaldi-trunk/egs/uts_736/utils/ --method lda_mllt
Em huấn luyện trên tập dữ liệu VIVOS RELEASE December 2016 .
Em train mất cỡ 3h .
Lúc chạy training hàng cuối cùng nó để BEST WER là 43% em thấy nó nhỏ rất tốt nhưng mà ko hiểu sao lúc perdict thì nó ra kết qủa tệ .
Em còn một thắc mắc em ghi âm một file mới em setting cấu hình file audio giống như tập dữ liệu vivos, nhưng kết quả trả về là một text rỗng result :

@vdnguyenbk98
Copy link

vdnguyenbk98 commented Mar 13, 2019

cho mình hỏi cho dữ liệu train và test vào file nào trong data (vivos hay diadiem) và sắp xếp như nào ạ mình thử cho vivos sau đó cho vào diadiem mà vẫn bị lỗi như vậy : File "preprocess.py", line 43, in create_train_text
content = open("raw/train/prompts.txt").read()
IOError: [Errno 2] No such file or directory: 'raw/train/prompts.txt

@luiyen
Copy link
Collaborator

luiyen commented Mar 13, 2019

cho mình hỏi cho dữ liệu train và test vào file nào trong data (vivos hay diadiem) và sắp xếp như nào ạ mình thử cho vivos sau đó cho vào diadiem mà vẫn bị lỗi như vậy : File "preprocess.py", line 43, in create_train_text
content = open("raw/train/prompts.txt").read()
IOError: [Errno 2] No such file or directory: 'raw/train/prompts.txt

Bạn có thể show cấu trúc thư mục data của bạn không. Bạn pwd file preprocess.py rồi show mình xem thử

@luiyen
Copy link
Collaborator

luiyen commented Mar 13, 2019

Em còn một thắc mắc em ghi âm một file mới em setting cấu hình file audio giống như tập dữ liệu vivos, nhưng kết quả trả về là một text rỗng result :

Bạn kiểm tra lại samprate của file bạn so với vivos audio file nhé (convert về 16000), convert audio chanel về 1,

@luiyen
Copy link
Collaborator

luiyen commented Mar 13, 2019 via email

@vdnguyenbk98
Copy link

mình train được rồi và giờ mình chạy hàm predict thì lại gặp lỗi này:
h: 1: kaldi-trunk/src/featbin/compute-mfcc-feats: not found
sh: 1: kaldi-trunk/src/featbin/compute-cmvn-stats: not found
sh: 1: kaldi-trunk/src/featbin/splice-feats: not found
sh: 1: kaldi-trunk/src/featbin/transform-feats: not found
sh: 1: kaldi-trunk/src/gmmbin/gmm-latgen-faster: not found
sh: 1: kaldi-trunk/src/latbin/lattice-best-path: not found
sh: 1: cannot create kaldi-trunk/egs/uts_165/exp/tri3a/predict/transcriptions/one-best-hypothesis.txt: Directory nonexistent
sh: 1: cannot open kaldi-trunk/egs/uts_165/exp/tri3a/predict/transcriptions/one-best-hypothesis.txt: No such file
-mình đã cố sửa trong file predict để dẫn lại link nhưng sau đó lại xuất hiện lỗi khác:
ERROR (compute-mfcc-feats[5.5.232~1-5a56]:ReadConfigFile():parse-options.cc:462) Cannot open config file: config/mfcc.conf

[ Stack-Trace: ]
kaldi::MessageLogger::LogMessage() const
kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)
kaldi::ParseOptions::ReadConfigFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
kaldi::ParseOptions::Read(int, char const* const*)
main
__libc_start_main
_start

@luiyen
Copy link
Collaborator

luiyen commented Mar 14, 2019 via email

@vdnguyenbk98
Copy link

python3 kaldi-trunk/automatic_speech_recognition/egs/vivos/predict.py --wav kaldi-trunk/automatic_speech_recognition/data/vivos/raw/test/waves/VIVOSDEV01/VIVOSDEV01_R012.wav --kaldi_folder kaldi-trunk --model_path kaldi-trunk/egs/uts_165/exp/tri3a --utils_path kaldi-trunk/egs/uts_165/utils/ --method lda_mllt bạn xem giúp mình

@HuynhKEn
Copy link
Author

HuynhKEn commented Mar 14, 2019

Bạn kiểm tra lại samprate của file bạn so với vivos audio file nhé (convert về 16000), convert audio chanel về 1
em đã chuyển rùi không được

@vdnguyenbk98
Copy link

cho mình hỏi là có thể kết hợp các emthod lại với nhau ko ạ như tài liệu đã viết :GMM: MFCC + delta để nâng tì lệ lên 84%, và cho mình hỏi thêm nữa là có thể tăng audio dự đoán lên 1p được không ạ

@luiyen
Copy link
Collaborator

luiyen commented Mar 15, 2019 via email

@vdnguyenbk98
Copy link

theo như trong file readme thì tỉ lện WER là 78%, mà thực tế test đươc 49% vậy làm thế nào để nâng tỉ lện này lên ạ.

@rain1024
Copy link
Contributor

rain1024 commented Mar 16, 2019

theo như trong file readme thì tỉ lện WER là 78%, mà thực tế test đươc 49% vậy làm thế nào để nâng tỉ lện này lên ạ.

mình nghĩ cách cải tiến tốt nhất là thêm dữ liệu huấn luyện :D

@vdnguyenbk98
Copy link

vdnguyenbk98 commented Mar 16, 2019

mình thấy trong file readme có gi là 78% mà cũng dùng chung bộ dữ liệu vivos nên mình thắc mắc thôi :)))

@luiyen
Copy link
Collaborator

luiyen commented Mar 16, 2019

mình thấy trong file readme có gi là 78% mà cũng dùng chung bộ dữ liệu vivos nên mình thắc mắc thôi :)))

Bạn nhầm giữa WER và độ chính xác rồi, WER càng thấp thì càng tốt nhé bạn ơi.

lower word error rate shows superior accuracy in recognition of speech

https://en.wikipedia.org/wiki/Word_error_rate

@vdnguyenbk98
Copy link

cảm ơn bạn

@ductandev
Copy link

cho em hỏi làm sao để chạy file train.py vậy ạ . em chạy gặp lỗi như thế này thì phải khắc phục như thế nào ạ!

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

Xin lỗi bạn đã trả lời issue bạn lâu vì bị trôi issue, mình có rep trong issue bạn vừa tạo.

@luiyen luiyen mentioned this issue Sep 7, 2023
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

6 participants