bshall / acoustic-model

Acoustic models for: A Comparison of Discrete and Soft Speech Units for Improved Voice Conversion
https://bshall.github.io/soft-vc/
MIT License
100 stars 24 forks source link

Bug: `generate.py` failed with No such file error #1

Closed tarepan closed 2 years ago

tarepan commented 2 years ago

Summary

unit-to-mel inference by generate.py crash with missing file error.
It is caused by variable name mistake in generate.py.
It can be fixed with one-line fix, so I made a pull request (#2).

Phenomena

When run generate.py with proper in-dir and out-dir, it crash.
Error message argue that No such file or directory: 'path'.

Error messages

Generating from sample_softVC -> o_test
  0% 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "./generate.py", line 57, in <module>
    generate(args)
  File "./generate.py", line 22, in generate
    units = np.load("path")
  File "/usr/local/lib/python3.7/dist-packages/numpy/lib/npyio.py", line 417, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'path'

Cause

In generate.py, variable path becomes mistakenly string "path".

https://github.com/bshall/acoustic-model/blob/c30a7c3908dbe585ab55109b1073e37984f4f130/generate.py#L16

When I fix it, the bug disappear.

Notes

I make a pull request (#2) which will fix this bug.
I am so impressed with softVC project, so, If this PR will help this super cool project, I am grad.