CSTR-Edinburgh / merlin

This is now the official location of the Merlin project.
http://www.cstr.ed.ac.uk/projects/merlin/
Apache License 2.0
1.3k stars 441 forks source link

Merlin Voice Conversion file_id_list.scp file #256

Open AhensNamar opened 6 years ago

AhensNamar commented 6 years ago

I am trying to run the voice conversion example that came with merlin. It gave me an error,,

Traceback (most recent call last): File "/home/aholab/merlin/src/run_merlin.py", line 1224, in main_function(cfg) File "/home/aholab/merlin/src/run_merlin.py", line 511, in main_function assert cfg.train_file_number+cfg.valid_file_number+cfg.test_file_number == total_file_number, 'check train, valid, test file number' AssertionError: check train, valid, test file number

I was told that 'number of train, valid, test files is not matching with total number in file_id_list.scp -- please check config files, if they all sum upto number of files in file_id_list.scp'.

But, turns out the file_id_list.scp file (in ..\voice_conversion\s1\experiments\bdl\acoustic_model\data) doesn't really contain a list of files but a single line which is an asterisk.

Has anyone else faced this issue? Any idea how to solve this?

seblemaguer commented 6 years ago

based on what I see in this file: https://github.com/CSTR-Edinburgh/merlin/blob/master/egs/voice_conversion/s1/03_align_src_with_target.sh

you should not have a star in the file_id_list.scp. Are you sure that "${src_aligned_feat_dir}/mgc/" directory exists?

AhensNamar commented 6 years ago

Yes I have the directory that you mentioned. On running step 3 I am getting the following error. Any thoughts? Step 3: Align source acoustic features with target acoustic features... --- DTW alignment started --- 100001 100012 100023 100034 100045 100056 100067 100078 100100 100089 100111 100122 100133 100155 100144 multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, *kwds)) File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "//home/aholab/merlin/misc/scripts/voice_conversion/dtw_aligner_festvox.py", line 113, in process src_features, src_frame_number = io_funcs.load_binary_file_frame(src_mgc_file, mgc_dim) File "/home/aholab/merlin/misc/scripts/voice_conversion/binary_io.py", line 30, in load_binary_file_frame features = features[:(dimension * frame_number)] TypeError: slice indices must be integers or None or have an index method """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "//home/aholab/merlin/misc/scripts/voice_conversion/dtw_aligner_festvox.py", line 158, in pool.map(process, mgc_files) File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 260, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 608, in get raise self._value TypeError: slice indices must be integers or None or have an index method Copying features to acoustic data directory... preparing file list... done...!

ronanki commented 6 years ago

As an alternative, try replacing dtw_aligner_festvox.py with dtw_aligner.py at line number 60.

AhensNamar commented 6 years ago

Actually I am now running it step by step and the error is from the second step. How can I solve this?

Error: You should have your features ready in: ///home/aholab/merlin/egs/voice_conversion/s1/database/bdl/feats --- Feature extraction completion time: 5 min. 59 sec --- Traceback (most recent call last): File "//home/aholab/merlin/misc/scripts/voice_conversion/compute_lf0_stats.py", line 47, in mean_f0, std_f0 = compute_mean_and_std(lf0_file_list) File "//home/aholab/merlin/misc/scripts/voice_conversion/compute_lf0_stats.py", line 14, in compute_mean_and_std lf0_arr, frame_number = io_funcs.load_binary_file_frame(lf0_file, 1) File "/home/aholab/merlin/misc/scripts/voice_conversion/binary_io.py", line 30, in load_binary_file_frame features = features[:(dimension * frame_number)] TypeError: slice indices must be integers or None or have an index method

ronanki commented 6 years ago

The current setup doesn't use lf0 stats for transformation of pitch. Therefore, you can ignore this error and proceed further.

However, if your features are not extracted properly, you may likely face this error again.

fosimoes commented 6 years ago

I don't know if this has something to do with your problem, just a guess: I also had an error message when executing compute_lf0_stats.py, what I did to fix it was to increase the dimension of "all_files_lf0_arr" in line 10. It seems that the fixed dimension 200000 is not enough when training with larger datasets.

ronanki commented 6 years ago

Yeah, thank you for reminding that. Anyway, I'll remove this code -- as we're not using the stats for final F0 transformation.

huangjun0413 commented 5 years ago

@ronanki “As an alternative, try replacing dtw_aligner_festvox.py with dtw_aligner.py at line number 60.” I have done this, but it is still wrong.

multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/root/anaconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, *kwds)) File "/root/anaconda3/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/data1/merlin-master/misc/scripts/voice_conversion/dtw_aligner.py", line 106, in process src_features, src_frame_number = io_funcs.load_binary_file_frame(src_mgc_file, mgc_dim) File "/data1/merlin-master/misc/scripts/voice_conversion/binary_io.py", line 30, in load_binary_file_frame features = features[:(dimension * frame_number)] TypeError: slice indices must be integers or None or have an index method """

huangjun0413 commented 5 years ago

@ronanki I have solved this problem by using Environmental python 2.7.

source activate py2_7

mgarbayona commented 5 years ago

Yes I have the directory that you mentioned. On running step 3 I am getting the following error. Any thoughts? Step 3: Align source acoustic features with target acoustic features... --- DTW alignment started --- 100001 100012 100023 100034 100045 100056 100067 100078 100100 100089 100111 100122 100133 100155 100144 multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, kwds)) File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "//home/aholab/merlin/misc/scripts/voice_conversion/dtw_aligner_festvox.py", line 113, in process src_features, src_frame_number = io_funcs.load_binary_file_frame(src_mgc_file, mgc_dim) File "/home/aholab/merlin/misc/scripts/voice_conversion/binary_io.py", line 30, in load_binary_file_frame features = features[:(dimension frame_number)] TypeError: slice indices must be integers or None or have an index** method """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "//home/aholab/merlin/misc/scripts/voice_conversion/dtw_aligner_festvox.py", line 158, in pool.map(process, mgc_files) File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 260, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/home/aholab/anaconda3/lib/python3.6/multiprocessing/pool.py", line 608, in get raise self._value TypeError: slice indices must be integers or None or have an index method Copying features to acoustic data directory... preparing file list... done...!

Also had an AssertionError when I ran run_demo_vc.sh, and when I ran the steps one by one, encountered this same TypeError: slice indices must be integers or None or have an __index method__ on step 03.

Other notes: