facebookresearch / svoice

We provide a PyTorch implementation of the paper Voice Separation with an Unknown Number of Multiple Speakers In which, we present a new method for separating a mixed audio sequence, in which multiple voices speak simultaneously. The new method employs gated neural networks that are trained to separate the voices at multiple processing steps, while maintaining the speaker in each output channel fixed. A different model is trained for every number of possible speakers, and the model with the largest number of speakers is employed to select the actual number of speakers in a given sample. Our method greatly outperforms the current state of the art, which, as we show, is not competitive for more than two speakers.
Other
1.23k stars 178 forks source link

Got ValueError when training with toy dataset #55

Closed Yang-Xijie closed 2 years ago

Yang-Xijie commented 2 years ago

After installation and generating json files for the toy dataset, I got ValueError: numpy.ndarray size changed. Any hint will be helpful!

Platform: macOS 12.0.1

The full operations are shown as follows:

Installation

conda create -n svoicetry python=3.7 conda activate svoicetry pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html got an error here

ERROR: Could not find a version that satisfies the requirement torch==1.6.0+cu101 (from versions: 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.1.0.post2, 1.2.0, 1.3.0, 1.3.0.post2, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0)
ERROR: No matching distribution found for torch==1.6.0+cu101

pip install torch==1.6.0 torchvision==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html removed+cu101on macOS, successfully pip install -r requirements.txt

Usage

https://github.com/facebookresearch/svoice#usage

Quick Start with Toy Example

Run ./make_debug.sh to generate json files for the toy dataset. Run python train.py Notice, we already provided the yaml file for it. Can be found under conf/dset/debug.yaml.

$ python train.py
/Users/yangxijie/opt/miniconda3/envs/svoicetry/lib/python3.7/site-packages/hydra/core/utils.py:143: UserWarning: register_resolver() is deprecated.
See https://github.com/omry/omegaconf/issues/426 for migration instructions.

  OmegaConf.register_resolver(name, f)
[2021-12-13 17:22:24,359][__main__][INFO] - For logs, checkpoints and samples check /Users/yangxijie/yxj/SEMESTER5/C 视听导/github-projects/svoice/outputs/exp_
[2021-12-13 17:22:26,731][__main__][ERROR] - Some error happened
Traceback (most recent call last):
  File "train.py", line 118, in main
    _main(args)
  File "train.py", line 112, in _main
    run(args)
  File "train.py", line 30, in run
    from svoice.solver import Solver
  File "/Users/yangxijie/yxj/SEMESTER5/C 视听导/github-projects/svoice/svoice/solver.py", line 22, in <module>
    from .evaluate import evaluate
  File "/Users/yangxijie/yxj/SEMESTER5/C 视听导/github-projects/svoice/svoice/evaluate.py", line 16, in <module>
    from pesq import pesq
  File "/Users/yangxijie/opt/miniconda3/envs/svoicetry/lib/python3.7/site-packages/pesq/__init__.py", line 6, in <module>
    from .cypesq import cypesq
  File "pesq/cypesq.pyx", line 1, in init cypesq
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
Yang-Xijie commented 2 years ago

Upgrading numpy to 1.20.3 will solve this problem.

Check https://stackoverflow.com/questions/66060487/valueerror-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-exp for more info.


Besides,

/Users/yangxijie/opt/miniconda3/envs/svoicetry/lib/python3.7/site-packages/hydra/core/utils.py:143: UserWarning: register_resolver() is deprecated.
See https://github.com/omry/omegaconf/issues/426 for migration instructions.

use omegaconf==2.0.6 instead (add it to requirements.txt).