Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

处理数据的时候报这个问题

Open
#109 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

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.

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

Dominant language
Python
Stars
4.9k
Forks
826
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MoonInTheRiver/DiffSinger

All issues in MoonInTheRiver/DiffSinger

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.