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

Question related to run_feature.sh #3

Closed
DeeDive opened this issue Jul 29, 2019 · 6 comments
Closed

Question related to run_feature.sh #3

DeeDive opened this issue Jul 29, 2019 · 6 comments

Comments

@DeeDive
Copy link

DeeDive commented Jul 29, 2019

Hi @jefflai108 ,

I've successfully created scp file with your help.

To extract logspec used in the paper, I changed the $stage in run_feature.sh to 0 .
File local/make_spectrogram.sh is missing, so I copied the one from your AFN repo.

But it seems that feature extraction processes in make_spectrogram.sh does not work properly since the resource usage is almost zero. Is there anything wrong with me?

fix_data_dir.sh: kept all 134730 utterances.
fix_data_dir.sh: old files are kept in data/pa_eval/.backup
utils/copy_data_dir.sh: copied data from data/pa_eval to data/pa_eval_spec
utils/validate_data_dir.sh: Successfully validated data-directory data/pa_eval_spec
local/make_spectrogram.sh --fbank-config conf/spec.conf --nj 40 --cmd run.pl data/pa_eval_spec exp/make_spec /home/bill/ASSERT/features/logspec
utils/validate_data_dir.sh: Successfully validated data-directory data/pa_eval_spec
local/make_spectrogram.sh: [info]: no segments file exists: assuming wav.scp indexed by utterance.
run.pl: 40 / 40 failed, log is in exp/make_spec/make_fbank_pa_eval_spec.*.log

And I have another question that what's the difference between spec and logspec, is the latter one better for the task?

Millions of thanks in advance

@jefflai108
Copy link
Owner

Could you post one of the log files: exp/make_spec/make_fbank_pa_eval_spec.*.log

It is a common practice (in speech) to take the log-scale on the magnitude spectrogram.

@DeeDive
Copy link
Author

DeeDive commented Jul 29, 2019

This is one of them, and thanks for your reply.
make_fbank_pa_eval_spec.1.log

@jefflai108
Copy link
Owner

seems like there's something wrong with you wav.scp
ERROR (compute-spectrogram-feats[5.5.424~1-b5385]:Read():wave-reader.cc:122) WaveData: expected RIFF or RIFX, got fLaC

This is an example of my wav.scp and you can read more about data preparation for Kaldi.
LA_E_1003228-LA_E_1003228 sox /export/b14/jlai/ASVspoof2019-data/LA/ASVspoof2019_LA_eval/flac/LA_E_1003228.flac -r 16k -t wav -b 16 -e signed-integer - |
LA_E_1004363-LA_E_1004363 sox /export/b14/jlai/ASVspoof2019-data/LA/ASVspoof2019_LA_eval/flac/LA_E_1004363.flac -r 16k -t wav -b 16 -e signed-integer - |
LA_E_1005565-LA_E_1005565 sox /export/b14/jlai/ASVspoof2019-data/LA/ASVspoof2019_LA_eval/flac/LA_E_1005565.flac -r 16k -t wav -b 16 -e signed-integer - |

@DeeDive
Copy link
Author

DeeDive commented Jul 30, 2019

It works, thx:)

@DeeDive DeeDive closed this as completed Jul 30, 2019
@wuqiangch
Copy link

@InfiniteStudy
I have successfully get the feature by run_feature.sh.But I dont know how to generate these files in main.py
data_files = { # training
'train_scp': 'data_reader/feats/la_train_spec_tensor4.scp',
'train_utt2index': 'data_reader/utt2systemID/la_train_utt2index_8',
'dev_scp': 'data_reader/feats/la_dev_spec_tensor4.scp',
'dev_utt2index': 'data_reader/utt2systemID/la_dev_utt2index_8',
'dev_utt2systemID': 'data_reader/utt2systemID/la_dev_utt2systemID',
'scoring_dir': 'scoring/la_cm_scores/',
}

@braveheartwithlove
Copy link

@wuqiangch are you able to generate the files above?

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

4 participants