automatic_speech_recognition icon indicating copy to clipboard operation
automatic_speech_recognition copied to clipboard

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

Open HuynhKEn opened this issue 7 years ago • 27 comments

HuynhKEn avatar Feb 20 '19 13:02 HuynhKEn

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 avatar Feb 20 '19 13:02 HuynhKEn

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

HuynhKEn avatar Feb 20 '19 15:02 HuynhKEn

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

luiyen avatar Feb 21 '19 03:02 luiyen

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

maxcogay avatar Feb 21 '19 06:02 maxcogay

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

luiyen avatar Feb 21 '19 08:02 luiyen

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 avatar Feb 21 '19 09:02 HuynhKEn

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

HuynhKEn avatar Feb 21 '19 11:02 HuynhKEn

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

HuynhKEn avatar Feb 21 '19 12:02 HuynhKEn

@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á

rain1024 avatar Feb 22 '19 04:02 rain1024

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 :

HuynhKEn avatar Feb 22 '19 04:02 HuynhKEn

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

vdnguyenbk98 avatar Mar 13 '19 07:03 vdnguyenbk98

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 avatar Mar 13 '19 09:03 luiyen

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 avatar Mar 13 '19 09:03 luiyen

Bạn tải bộ vivos data về bỏ vào data/vivos nhé

On Wed, Mar 13, 2019 at 20:39 nguyen vu [email protected] wrote:

data ├── diadiem │ ├── COPYING │ ├── preprocess.py │ ├── README │ ├── test │ │ └── wave │ ├── text.py │ └── train │ └── wave └── vivos ├── COPYING ├── corpus │ ├── test │ │ └── wav │ └── train │ └── wav ├── preprocess.py └── README

đây là cấu trúc thư mục data, mình đã chỉnh lại như lúc đầu , bạn chỉ giúp mình cách thêm dữ liệu, mình cảm ơn !!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/undertheseanlp/automatic_speech_recognition/issues/34#issuecomment-472425499, or mute the thread https://github.com/notifications/unsubscribe-auth/ANY4ykLIWrlWjmOIzwBhnfZmSP47Ahnnks5vWP-DgaJpZM4bFPtC .

--

Regards,

LE PHI HUNG (Mr.)

Phone : 0963257788

Skype : [email protected]

luiyen avatar Mar 13 '19 16:03 luiyen

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

vdnguyenbk98 avatar Mar 13 '19 17:03 vdnguyenbk98

Cho mình xem câu lệnh predict của bạn

On Thu, Mar 14, 2019 at 00:47 nguyen vu [email protected] wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/undertheseanlp/automatic_speech_recognition/issues/34#issuecomment-472532951, or mute the thread https://github.com/notifications/unsubscribe-auth/ANY4yrbudzvf6YmtKkUuV8nRup276_i0ks5vWTmbgaJpZM4bFPtC .

--

Regards,

LE PHI HUNG (Mr.)

Phone : 0963257788

Skype : [email protected]

luiyen avatar Mar 14 '19 00:03 luiyen

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

vdnguyenbk98 avatar Mar 14 '19 08:03 vdnguyenbk98

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

HuynhKEn avatar Mar 14 '19 09:03 HuynhKEn

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 ạ

vdnguyenbk98 avatar Mar 15 '19 05:03 vdnguyenbk98

Hiện tại đã kết hợp rồi bạn có thể vào train_method.sh để có thể xem mô hình. Hiện tại tăng audio dự đoán lên 1p bị gì à bạn.

On Fri, Mar 15, 2019 at 12:46 nguyen vu [email protected] wrote:

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 ạ

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/undertheseanlp/automatic_speech_recognition/issues/34#issuecomment-473166514, or mute the thread https://github.com/notifications/unsubscribe-auth/ANY4yqbaH-f1aFwd4VMurdHGMe_zX0CBks5vWzO8gaJpZM4bFPtC .

--

Regards,

LE PHI HUNG (Mr.)

Phone : 0963257788

Skype : [email protected]

luiyen avatar Mar 15 '19 06:03 luiyen

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 ạ.

vdnguyenbk98 avatar Mar 16 '19 06:03 vdnguyenbk98

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

rain1024 avatar Mar 16 '19 11:03 rain1024

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 :)))

vdnguyenbk98 avatar Mar 16 '19 15:03 vdnguyenbk98

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

luiyen avatar Mar 16 '19 16:03 luiyen

cảm ơn bạn

vdnguyenbk98 avatar Mar 16 '19 16:03 vdnguyenbk98

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'

ductandev avatar Jun 19 '19 07:06 ductandev

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 avatar Jul 09 '19 03:07 luiyen