MoonInTheRiver / MoonInTheRiver/DiffSinger
处理数据的时候报这个问题
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 826
- PR merge metrics
- No merged PRs in 30d
Description
Traceback (most recent call last):
File "/mnt/d/workspace/DiffSinger-master/utils/multiprocess_utils.py", line 13, in chunked_worker
res = map_func(*arg)
File "/mnt/d/workspace/DiffSinger-master/data_gen/singing/binarize.py", line 382, in process_item
cls.get_pitch(wav_fn, wav, mel, ph, res)
File "/mnt/d/workspace/DiffSinger-master/data_gen/singing/binarize.py", line 364, in get_pitch
gt_f0, gt_pitch_coarse = get_pitch(wav, spec, hparams)
File "/mnt/d/workspace/DiffSinger-master/data_gen/tts/data_gen_utils.py", line 174, in get_pitch
f0 = np.pad(f0, [[lpad, rpad]], mode='constant')
File "<array_function internals>", line 200, in pad
File "/home/wjc/anaconda3/envs/svc/lib/python3.8/site-packages/numpy/lib/arraypad.py", line 744, in pad
pad_width = _as_pairs(pad_width, array.ndim, as_index=True)
File "/home/wjc/anaconda3/envs/svc/lib/python3.8/site-packages/numpy/lib/arraypad.py", line 510, in _as_pairs
raise ValueError("index can't contain negative values")
ValueError: index can't contain negative values
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with data_gen/tts/data_gen_utils.py at get_pitch, where the traceback reaches np.pad, then trace the inputs from data_gen/singing/binarize.py. Reproduce the failure with the reported data and determine which padding calculation becomes negative; done means the failing case is explained and the correction is covered by a suitable regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100