GithubHelp home page GithubHelp logo

hiroshiba / become-yukarin Goto Github PK

View Code? Open in Web Editor NEW
576.0 576.0 88.0 4.71 MB

Convert your voice to favorite voice

Home Page: https://hiroshiba.github.io/blog/became-yuduki-yukari-with-deep-learning-power/

License: MIT License

Python 100.00%

become-yukarin's People

Contributors

hiroshiba avatar wakiyamap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

become-yukarin's Issues

extract_acoustic_feature.py実行時のSyntaxError

【実行環境】
Ubuntu17.10
Nvidia Toolkit 9.2
cuDNN7.2.1

チップの種類:NVIDIA GeForce GT 730
利用可能な全グラフィックスメモリ:4096MB
requirements.txtにあるライブラリは全てインストールしました

【コマンド】
PYTHONPATH='pwd' python scripts/extract_acoustic_feature.py ---

【エラー文】
File "scripts/extract_acoustic_feature.py", line 137 def generate_mean_var(path_directory: Path): ^ SyntaxError: invalid syntax

【参考】
https://qiita.com/atticatticattic/items/f1e4c671d73d815bbad2 を参考に進めて、「6.2 音響特徴量切り出しをする」の「python scripts/extract_acoustic_feature.py -i1 dat/in_1st_my_wav -i2 dat/in_1st_yukari_wav -o1 dat/out_1st_my_npy -o2 dat/out_1st_yukari_npy」を実行した場合にも上記と同様のエラーが出てしまいます。

解決策などありましたらどうかご教授ください。
よろしくお願いします。

extract_acoustic_feature.pyによる音調特徴量の切り出しで、RuntimeWarningが出る

以下のように指定して、実行してみたところ、RuntimeWarnigを吐きます。どうしたらよいでしょうか。パス指定は間違っていないと思います。どうもnumpyのエラーのようですが。
C:\become-yukarin\become-yukarin>python scripts/extract_acoustic_feature.py -i1 \My_ATR503 -i2 \Sasara_ATR503 -o1 \out_MyATR503 -o2 \out_SasaraATR503
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
(中略)
C:\Users\KHB15\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:2957: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
C:\Users\KHB15\Anaconda3\lib\site-packages\numpy\core_methods.py:73: RuntimeWarning: invalid value encountered in true_divide
ret, rcount, out=ret, casting='unsafe', subok=False)
C:\Users\KHB15\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:3194: RuntimeWarning: Degrees of freedom <= 0 for slice
**kwargs)
C:\Users\KHB15\Anaconda3\lib\site-packages\numpy\core_methods.py:105: RuntimeWarning: invalid value encountered in true_divide
arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
C:\Users\KHB15\Anaconda3\lib\site-packages\numpy\core_methods.py:125: RuntimeWarning: invalid value encountered in true_divide
ret, rcount, out=ret, casting='unsafe', subok=False)

Pythonでpysptkのインストールに失敗します。

前提・実現したいこと
Phythonで機械学習の変換システムを作っています。
Pysptkのインストール中に次のエラーメッセージが発生しました。

発生している問題・エラーメッセージ

Collecting pysptk
Using cached pysptk-0.1.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\KHB15\AppData\Local\Temp\pip-build-pwyzyltm\pysptk\setup.py", line 25, in
['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip()
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
Command "python setup.py egg_info" failed with error code 1 in C:\Users\KHB15\AppData\Local\Temp\pip-build-pwyzyltm\pysptk\

gitを入れて再実行しました。

C:\become-yukarin\become-yukarin\scripts>git --version
git version 2.16.2.windows.1

C:\become-yukarin\become-yukarin\scripts>pip install pysptk
Collecting pysptk
Using cached pysptk-0.1.10.tar.gz
Requirement already satisfied: numpy>=1.8.0 in c:\anaconda3\lib\site-packages (from pysptk)
Requirement already satisfied: six in c:\anaconda3\lib\site-packages (from pysptk)
Requirement already satisfied: decorator in c:\anaconda3\lib\site-packages (from pysptk)
Building wheels for collected packages: pysptk
Running setup.py bdist_wheel for pysptk ... error
Failed building wheel for pysptk
Running setup.py clean for pysptk
Failed to build pysptk
Installing collected packages: pysptk
Running setup.py install for pysptk ... error
Exception:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\pip\compat_init_.py", line 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 5: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Anaconda3\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Anaconda3\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "C:\Anaconda3\lib\site-packages\pip\utils_init_.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "C:\Anaconda3\lib\site-packages\pip\compat_init_.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 5: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\pip\commands\install.py", line 385, in run
requirement_set.cleanup_files()
File "C:\Anaconda3\lib\site-packages\pip\req\req_set.py", line 729, in cleanup_files
req.remove_temporary_source()
File "C:\Anaconda3\lib\site-packages\pip\req\req_install.py", line 977, in remove_temporary_source
rmtree(self.source_dir)
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 212, in call
raise attempt.get()
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Anaconda3\lib\site-packages\pip_vendor\six.py", line 686, in reraise
raise value
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Anaconda3\lib\site-packages\pip\utils_init_.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "C:\Anaconda3\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Anaconda3\lib\shutil.py", line 376, in rmtree_unsafe
onerror(os.listdir, path, sys.exc_info())
File "C:\Anaconda3\lib\site-packages\pip\utils_init
.py", line 112, in rmtree_errorhandler
os.chmod(path, stat.S_IWRITE)
PermissionError: [WinError 5] アクセスが拒否されました。: 'C:\Users\KHB15\AppData\Local\Temp\pip-build-hy1k76f9\pysptk\lib\SPTK\include'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Anaconda3\lib\site-packages\pip\commands\install.py", line 385, in run
requirement_set.cleanup_files()
File "C:\Anaconda3\lib\site-packages\pip\utils\build.py", line 38, in exit
self.cleanup()
File "C:\Anaconda3\lib\site-packages\pip\utils\build.py", line 42, in cleanup
rmtree(self.name)
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 212, in call
raise attempt.get()
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Anaconda3\lib\site-packages\pip_vendor\six.py", line 686, in reraise
raise value
File "C:\Anaconda3\lib\site-packages\pip_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Anaconda3\lib\site-packages\pip\utils_init_.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "C:\Anaconda3\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Anaconda3\lib\shutil.py", line 376, in rmtree_unsafe
onerror(os.listdir, path, sys.exc_info())
File "C:\Anaconda3\lib\site-packages\pip\utils_init
.py", line 112, in rmtree_errorhandler
os.chmod(path, stat.S_IWRITE)
PermissionError: [WinError 5] アクセスが拒否されました。: 'C:\Users\KHB15\AppData\Local\Temp\pip-build-hy1k76f9\pysptk\lib\SPTK\include'
該当のソースコード
pip install pysptk

試したこと
https://qiita.com/ruteshi_SI_shiteru/items/be6a58276bdbd67dc096
によるpipのファイルの書き換え
システム入れ直し
Gitを入れてみました。
補足情報(FW/ツールのバージョンなど)
Python3.6(Anaconda)2.7や3.4や3.5ではダメでした。

音響特徴量の切り出し作業

音響特徴量の切り出しで、
mean.npy
var.npy
の二つが、自分の声と変換後の声で2つずつ4つ出力されるので合ってますか?
config.json見ると、3つのようですがどうでしょうか?

NumpyのRuntimeWarningに悩まされています。

ディレクトリ内の*.wavを指定してみました。変化ありませんでした。
C:\become-yukarin\become-yukarin>python scripts/extract_acoustic_feature.py -i1 \My_ATR503/*.wav -i2 \Sasara_ATR503/*.wav -o1 \out_MyATR503 -o2 \out_SasaraATR503 C:\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_get_args', '_get_kwargs', 'alpha', 'disable_alignment', 'enable_overwrite', 'f0_ceil1', 'f0_ceil2', 'f0_estimating_method', 'f0_floor1', 'f0_floor2', 'frame_period', 'ignore_feature', 'input1_directory', 'input2_directory', 'order', 'output1_directory', 'output2_directory', 'pad_second', 'pre_converter1_config', 'pre_converter1_model', 'sample_rate', 'top_db'] C:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:2957: RuntimeWarning: Mean of empty slice. out=out, **kwargs) C:\Anaconda3\lib\site-packages\numpy\core\_methods.py:73: RuntimeWarning: invalid value encountered in true_divide ret, rcount, out=ret, casting='unsafe', subok=False) C:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:3194: RuntimeWarning: Degrees of freedom <= 0 for slice **kwargs) C:\Anaconda3\lib\site-packages\numpy\core\_methods.py:105: RuntimeWarning: invalid value encountered in true_divide arrmean, rcount, out=arrmean, casting='unsafe', subok=False) C:\Anaconda3\lib\site-packages\numpy\core\_methods.py:125: RuntimeWarning: invalid value encountered in true_divide ret, rcount, out=ret, casting='unsafe', subok=False)

world4pyがインストールできない

以下の通りインストールに失敗しているようです。
``
C:\become-yukarin\become-yukarin>pip install pyworld
Collecting pyworld
Using cached pyworld-0.2.4.tar.gz
Requirement already satisfied: numpy in c:\users\khb15\anaconda3\lib\site-packages (from pyworld)
Requirement already satisfied: cython>=0.24.0 in c:\users\khb15\anaconda3\lib\site-packages (from pyworld)
Building wheels for collected packages: pyworld
Running setup.py bdist_wheel for pyworld ... error
Failed building wheel for pyworld
Running setup.py clean for pyworld
Failed cleaning build dir for pyworld
Failed to build pyworld
Installing collected packages: pyworld
Running setup.py install for pyworld ... error
Complete output from command c:\users\khb15\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\KHB15\AppData\Local\Temp\pip-build-c3pttjzp\pyworld\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\KHB15\AppData\Local\Temp\pip-awrx1d9m-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
copying pyworld_init_.py -> build\lib.win-amd64-3.6\pyworld
running build_ext
skipping 'pyworld\pyworld.cpp' Cython extension (up-to-date)
running install_lib
copying build\lib.win-amd64-3.6\pyworld\pyworld.cp36-win_amd64.pyd -> c:\users\khb15\anaconda3\Lib\site-packages\pyworld
error: could not open 'build\lib.win-amd64-3.6\pyworld\pyworld.cp36-win_amd64.pyd': Permission denied

----------------------------------------

Command "c:\users\khb15\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\KHB15\AppData\Local\Temp\pip-build-c3pttjzp\pyworld\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\KHB15\AppData\Local\Temp\pip-awrx1d9m-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\KHB15\AppData\Local\Temp\pip-build-c3pttjzp\pyworld\

sr_train.py 実行時エラーについて

sr_train.pyを実行し、学習を始めたところ、SRDecoderクラス内__call__でtype_check時に以下のようなエラーが出てしまいます。

Expect: in_types[0].shape[2] == in_types[1].shape[2]
Actual: 511 != 512

自分で調べましたところ次元数が一致していない時に出るようです。
Deconvolution2Dなどshapeを操作している場所を調べてみたのですが理解度が低いため解決方法がわかりませんでした。
修正のアプローチを教えて欲しいです。

class SRDecoder(chainer.Chain):

    # ~ 略 ~ 
    # ~ 略 ~ 

    def __call__(self, hs):
        h = self.c0(hs[-1])
        for i in range(1, 8):
            h = F.concat([h, hs[-i - 1]]) # ここでエラーが出てしまいます。
            if i < 7:
                h = self['c%d' % i](h)
            else:
                h = self.c7(h)
        return h

こちらがエラー時のTracebackとなります

Traceback (most recent call last):
  File "train_sr.py", line 85, in <module>
    trainer.run()
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/training/trainer.py", line 320, in run
    six.reraise(*sys.exc_info())
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/training/trainer.py", line 306, in run
    update()
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/training/updaters/standard_updater.py", line 149, in update
    self.update_core()
  File "/home/username/PycharmProjects/become-yukarin/become_yukarin/updater/sr_updater.py", line 77, in update_core
    loss = self.forward(**batch)
  File "/home/username/PycharmProjects/become-yukarin/become_yukarin/updater/sr_updater.py", line 61, in forward
    output = self.predictor(input)
  File "/home/username/PycharmProjects/become-yukarin/become_yukarin/model/sr_model.py", line 101, in __call__
    deco = self.decoder(self.encoder(x))
  File "/home/username/PycharmProjects/become-yukarin/become_yukarin/model/sr_model.py", line 85, in __call__
    h = F.concat([h, hs[-i - 1]])
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/functions/array/concat.py", line 105, in concat
    y, = Concat(axis).apply(xs)
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/function_node.py", line 243, in apply
    self._check_data_type_forward(in_data)
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/function_node.py", line 328, in _check_data_type_forward
    self.check_type_forward(in_type)
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/functions/array/concat.py", line 41, in check_type_forward
    type_check.expect(in_types[0].shape[d] == in_types[i].shape[d])
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/utils/type_check.py", line 524, in expect
    expr.expect()
  File "/home/username/anaconda3/envs/become-yukarin/lib/python3.6/site-packages/chainer/utils/type_check.py", line 482, in expect
    '{0} {1} {2}'.format(left, self.inv, right))
chainer.utils.type_check.InvalidType: 
Invalid operation is performed in: Concat (Forward)

Expect: in_types[0].shape[2] == in_types[1].shape[2]
Actual: 511 != 512

windowsでのvoice_conversion_test.pyの実行エラーについて

環境:
windows10

問題点:
コマンド実行:
PS D:\work\become-yukarin-master> python .\scripts\voice_conversion_test.py result_1 -md .\ -iwd .\firstData\test
結果:

C:\Users\f\AppData\Roaming\Python\Python36\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it
will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
result_1\predictor_415000.npz
C:\Users\f\AppData\Roaming\Python\Python36\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it
will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters

C:\Users\f\AppData\Roaming\Python\Python36\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it
will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
error! firstData\firstOutputMyVoice\003.npy
error! firstData\firstOutputMyVoice\013.npy

要望:
voice_conversion_test.pyを実行するとエラーが発生するのですが、エラー文があまりに短く原因の特定ができずにいます。
どのようにすれば改善してエラー無くコマンドを実行できるでしょうか。

補足:
#33 のイシューからここまで来るまでに実施したことについて、かいつまんで説明します。

・train.py実行時、pickle使用時にAttributeErrorが発生する
windows環境ではmultiprocessingの開始にはspawnを使用する必要があります。
https://docs.python.jp/3/library/multiprocessing.html
おそらくこのプログラムはforkを前提として記載しているため、spawnでpickleを使用する際にエラーが発生します。
この点を改善するために、pickleではなくdillを使用するようにしてpickle使用時のエラーに対応しました。

・train.py実行時、if name == 'main' が無いというエラーが発生する。
こちらもmultiprocessingに関連するエラーのようです。
どの部分をif name == 'main'で囲めばよいのか分からないため全体を囲ってから実行しました。

・train.pyが終わらない
おそらく強制終了させない限り終わらないようにプログラムされているからだと認識しています。
predictor_415000.npzが作成された後に強制終了をかけており、こちらのファイルを用いてvoice_conversion_test.pyを実行しました。

・voice_conversion_test.py実行時、if name == 'main' が無いというエラーが発生する。
同様に、全体をif name == 'main'で囲いました。

trainのconfig.jsonの設定値はこのようにしています。

"train": {
"batchsize": 8,
"gpu": 0,
"log_iteration": 250,
"snapshot_iteration": 5000
}

1段目学習時のdiscriminator/accuracy

1段目の学習についてなのですが
discriminator/accuracyの推移を見ると
以前こちらのissue #10 で回答されていたような挙動とは異なった推移をしています
GANのaccuracyとしては上下しながら減少していくのが自然かと考えたのですが…
いくつかモデルの学習を行った際にaccuracyの推移の傾向が毎回異なるなどはありましたか?
(学習データはATR503文中のサブセットjを除いた450文を使用しております)
tda

predictor/lossも図示してみたのですが
250*250iteration付近から上昇しているのが気になります
これはpredictorの学習に失敗しているということでしょうか?
ploss

train.pyでZeroDivisionError: division by zeroのエラーが出る。

学習第一段階でtrain.pyを実行すると、/chainer/iterators/multiprocess_iterator.pyで
previous_epoch_detail = epoch + pos / n ZeroDivisionError: division by zeroというエラーになる問題で困っています。
原因または解決策をご存知の方はいらっしゃいませんか。

PYTHONPATH='pwd' python train.py recipe/config.json output

を実行すると、以下のような結果になりました。

/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Exception in main training loop: division by zero
Traceback (most recent call last):
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/training/trainer.py", line 299, in run
update()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/training/updater.py", line 223, in update
self.update_core()
File "/home/lab/jupyterhome/takakura/workspace/become-yukarin/become_yukarin/updater/updater.py", line 82, in update_core
batch = self.get_iterator('main').next()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 86, in next
batch, prefetch_state = self._prefetch_loop.measure()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 286, in measure
indices = self._proceed()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 361, in _proceed
previous_epoch_detail = epoch + pos / n
Will finalize trainer extensions and updater before reraising the exception.
Traceback (most recent call last):
File "train.py", line 83, in
trainer.run()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/training/trainer.py", line 313, in run
six.reraise(*sys.exc_info())
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/training/trainer.py", line 299, in run
update()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/training/updater.py", line 223, in update
self.update_core()
File "/home/lab/workspace/become-yukarin/become_yukarin/updater/updater.py", line 82, in update_core
batch = self.get_iterator('main').next()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 86, in next
batch, prefetch_state = self._prefetch_loop.measure()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 286, in measure
indices = self._proceed()
File "/home/lab/anaconda2/envs/dl/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 361, in _proceed
previous_epoch_detail = epoch + pos / n
ZeroDivisionError: division by zero

原因として考えられるのが入力、出力音声の条件かと考えているのですが、
なにかこれらに条件はありますか?

なお、私の環境は以下の通りです。
【MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports), メモリ量 16 GB 2133 MHz LPDDR3, , OSX 10.13.3, python3.6】

不足情報等あればお申し付けください。
宜しくお願いいたします。

動作推奨環境について

素晴らしい研究をありがとうございます。背景にいたく共感しました。

推奨環境はUnix系のpython3.6以上でしょうか。その他環境ではエラーが発生します。
・Windows環境ではマルチスレッド処理のpickleでエラーが起きます
・Unix環境であってもpython3.5以下だと型宣言でエラーが起きます(PEP-526は3.6以降のみ)
(READMEに記載しておくとサポート対応が減るかと思います)

become-yukarin と yukarin の関係は?

あなたのworkは最高です、私のお気に入りの声を作り可能で、ありがとうございました!
ただし、realtime-voice-conversionはbecome-yukarin と yukarinのwarpperですが、become-yukarin と yukarin の関係は一体?両方とも同時に必要ですか?

音調特徴量の切り出しのエラー

インの二つのデータの数を合わせて、アウトにも*.wavを追記
``
C:\become-yukarin\become-yukarin>python scripts\extract_acoustic_feature.py -i1 \My_ATR503*.wav -i2 \Sasara_ATR503*.wav -o1 \out_MyATR503*.wav -o2 \out_SasaraATR503*.wav
C:\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
['class',
'contains',
'delattr',
'dict',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'weakref',
'_get_args',
'_get_kwargs',
'alpha',
'disable_alignment',
'enable_overwrite',
'f0_ceil1',
'f0_ceil2',
'f0_estimating_method',
'f0_floor1',
'f0_floor2',
'frame_period',
'ignore_feature',
'input1_directory',
'input2_directory',
'order',
'output1_directory',
'output2_directory',
'pad_second',
'pre_converter1_config',
'pre_converter1_model',
'sample_rate',
'top_db']
Traceback (most recent call last):
File "C:\Anaconda3\lib\pathlib.py", line 1226, in mkdir
self._accessor.mkdir(self, mode)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '\out_MyATR503\
.wav'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "scripts\extract_acoustic_feature.py", line 208, in
main()
File "scripts\extract_acoustic_feature.py", line 197, in main
arguments.output1_directory.mkdir(exist_ok=True)
File "C:\Anaconda3\lib\pathlib.py", line 1235, in mkdir
if not exist_ok or not self.is_dir():
File "C:\Anaconda3\lib\pathlib.py", line 1326, in is_dir
return S_ISDIR(self.stat().st_mode)
File "C:\Anaconda3\lib\pathlib.py", line 1136, in stat
return self._accessor.stat(self)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '\out_MyATR503\
.wav'
``

続 第一段階の学習でエラーが出てしまう

アドバイスに従って、WORLD4pyの入れ直しやvocorder.pyの入れ直しを行ってみましたが
エラーは減りましたがやはり出ます。
buri@buri-Diginnos-PC:~/become-yukarin$ python train.py dat/config.json dat/model/yukari_1st
Traceback (most recent call last):
File "train.py", line 13, in
from become_yukarin.config.config import create_from_json
File "/home/buri/become-yukarin/become_yukarin/init.py", line 6, in
from .vocoder import RealtimeVocoder
File "/home/buri/become-yukarin/become_yukarin/vocoder.py", line 3, in
from world4py.native import structures, apidefinitions, utils
ModuleNotFoundError: No module named 'world4py'

WAVに変換できません

ヒホさんのリポジトリーも同じエラーが出ています
voice_conversion_test.pyを実行したのですが エラーが出ます
音声データは 16Bit 16000Hz 1Ch 約20秒 なのですが
Linux Ubuntu Base Feren OS
Python3.6 4GB Core i3 Swap 2Gb No GPU

error! dat/out_1st_my_npy/1.npy
Traceback (most recent call last):
File "scripts/voice_conversion_test.py", line 39, in process
fn = glob.glob(str(input_wave_directory / p.stem) + '.*')[0]
IndexError: list index out of range

GPUについて

GPUは必要ですか?
どれぐらいのスペックが必要ですか?

第一段階の学習でエラーが出てしまう

第一段階の学習をかけたところ以下のエラーが出ました 何が悪いのでしょうか?

python train.py dat/config.json dat/model/yukari_1st
Traceback (most recent call last):
File "train.py", line 13, in
from become_yukarin.config.config import create_from_json
File "/home/buri/become-yukarin/become_yukarin/init.py", line 6, in
from .vocoder import RealtimeVocoder
File "/home/buri/become-yukarin/become_yukarin/vocoder.py", line 3, in
from world4py.native import structures, apidefinitions, utils
File "/home/buri/.pyenv/versions/3.6.3/lib/python3.6/site-packages/world4py/native/init.py", line 6, in
from world4py.native import apis, tools, utils, structures
File "/home/buri/.pyenv/versions/3.6.3/lib/python3.6/site-packages/world4py/native/apis.py", line 6, in
from world4py.native import apidefinitions, structures, utils
File "/home/buri/.pyenv/versions/3.6.3/lib/python3.6/site-packages/world4py/native/apidefinitions.py", line 7, in
from world4py.native import structures, instance
File "/home/buri/.pyenv/versions/3.6.3/lib/python3.6/site-packages/world4py/native/instance.py", line 9, in
_WORLD = ctypes.cdll.LoadLibrary(_WORLD_LIBRARY_PATH)
File "/home/buri/.pyenv/versions/3.6.3/lib/python3.6/ctypes/init.py", line 426, in LoadLibrary
return self._dlltype(name)
File "/home/buri/.pyenv/versions/3.6.3/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/buri/.pyenv/versions/3.6.3/lib/python3.6/site-packages/world4py/libworld.so: cannot open shared object file: No such file or directory

Win + Python3.6で「pip install pysptk」を実行したときにエラーが出てインストールできない

前提・実現したいこと
Phythonで機械学習の皇室変換システムを作っています。
Pysptkのインストール中に次のエラーメッセージが発生しました。

発生している問題・エラーメッセージ

Traceback (most recent call last):
File "C:\Users\KHB15\Anaconda3\Scripts\pip-script.py", line 6, in
from pip import main
File "C:\Users\KHB15\Anaconda3\lib\site-packages\pip_init_.py", line 26, in
from pip.utils import get_installed_distributions, get_prog
File "C:\Users\KHB15\Anaconda3\lib\site-packages\pip\utils_init_.py", line 22, in
from pip.compat import console_to_str, expanduser, stdlib_pkgs
File "C:\Users\KHB15\Anaconda3\lib\site-packages\pip\compat_init_.py", line 78
def native_str(s, replace=False):
^
IndentationError: expected an indented block

Pipを更新してみたところ以下のエラーになりました。

Collecting pysptk
Using cached pysptk-0.1.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\KHB15\AppData\Local\Temp\pip-build-qtdykif9\pysptk\setup.py", line 25, in
['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip()
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 316, in check_output
**kwargs).stdout
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 383, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 676, in init
restore_signals, start_new_session)
File "C:\Users\KHB15\Anaconda3\lib\subprocess.py", line 957, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\KHB15\AppData\Local\Temp\pip-build-qtdykif9\pysptk\

スペースやタブを見直したところ以下のエラーになりました。

Traceback (most recent call last):
File "C:\Users\KHB15\Anaconda3\Scripts\pip-script.py", line 6, in
from pip import main
File "C:\Users\KHB15\Anaconda3\lib\site-packages\pip_init_.py", line 26, in
from pip.utils import get_installed_distributions, get_prog
File "C:\Users\KHB15\Anaconda3\lib\site-packages\pip\utils_init_.py", line 22, in
from pip.compat import console_to_str, expanduser, stdlib_pkgs
File "C:\Users\KHB15\Anaconda3\lib\site-packages\pip\compat_init_.py", line 78
def native_str(s, replace=False):
^
IndentationError: expected an indented block
該当のソースコード

pip install pysptk

を実行しました。
修正したのは、tryから4行をコメントアウトしました。

if sys.version_info >= (3,):
def console_to_str(s):
try:
return s.decode(sys.stdout.encoding)
except UnicodeDecodeError:
return s.decode('utf_8')

def native_str(s, replace=False):
    if isinstance(s, bytes):
        return s.decode('utf-8', 'replace' if replace else 'strict')
    return s

else:
def console_to_str(s):
return s

def native_str(s, replace=False):
    # Replace is ignored -- unicode to UTF-8 can't fail
    if isinstance(s, text_type):
        return s.encode('utf-8')
    return s

def total_seconds(td):
if hasattr(td, "total_seconds"):
return td.total_seconds()
else:
val = td.microseconds + (td.seconds + td.days * 24 * 3600) * 10 ** 6
return val / 10 ** 6

def get_path_uid(path):
"""
Return path's uid.

修正後、import localeは追記してあります。

if sys.version_info >= (3,):
def console_to_str(s):

try:

return s.decode(sys.stdout.encoding)

except UnicodeDecodeError:

return s.decode('utf_8')

return s.decode(locale.getpreferredencoding() or "utf-8", 'replace')
試したこと
chcpでのUTF8へのへの切り替え
https://qiita.com/ruteshi_SI_shiteru/items/be6a58276bdbd67dc096
によるpipの書き直し
pipの入れ直し
スペースの見直し

補足情報(FW/ツールのバージョンなど)
Qiitaの指示でエラーが赤字から白地になって減りましたが、インストールはできないです。
Python3.6アナコンダ使用

Become-yukarinにパスを通す件

実行環境:
Python3, PyCharm
ライブラリ関係が必要とのことで、Anacondaを入れ直しました。

結月ゆかりに機械学習で声質変換するスクリプトのReadme.mdに従って、音響特徴量の切り出しをしようとコードを実行するも、PyCharmが立ち上がってしまいます。別なコードを実行してみても、PyCharmが立ち上がってしまいます。

ふと気づいたので、関連付けがPyCharmになっていたので、Pythonに変更しました。
実行できましたが以下のエラーが出ます。

ModuleNotFoundError : No Module Named 'become_yukarin'
Pythonのモジュールの説明を見ていて気づいたのですが、ディレクトリ図の

become_yukarin # このディレクトリは外から使えることを想定

これが関係ありますか?このディレクトリにパスを通す必要がありますか?パスを通してみましたが、エラー結果は同じです。

音響特徴量の切り出しスクリプトであるextract_acoustic_feature.py # 音響特徴量切り出しですが、PyCharmで見る限り、冒頭部分の、

import numpy

from become_yukarin.acoustic_converter import AcousticConverter
from become_yukarin.config.config import create_from_json as create_config
from become_yukarin.data_struct import AcousticFeature
from become_yukarin.dataset.dataset import AcousticFeatureLoadProcess
from become_yukarin.dataset.dataset import AcousticFeatureProcess
from become_yukarin.dataset.dataset import AcousticFeatureSaveProcess
from become_yukarin.dataset.dataset import WaveFileLoadProcess
from become_yukarin.dataset.utility import MFCCAligner
from become_yukarin.param import AcousticFeatureParam
from become_yukarin.param import VoiceParam
で引っかかっているようです。numpyはAnacondaで入ったはずですが、呼び出せてないようです。あと頭にbecame_yukarinがあるそのフォルダにあるパッケージ化されたスクリプトも呼び出せていないようです。

なのでエラーを吐いて止まってしまうのでは無いかと考えました。

├── become_yukarin # このディレクトリは外から使えることを想定
│ ├── init.py
│ ├── config.py # 学習の設定パラメータ
│ ├── data_struct.py # データ構造の定義
│ ├── dataset
│ │ ├── init.py
│ │ ├── dataset.py # データ処理
│ │ └── utility.py
│ ├── model.py # ニューラルネットワーク構造
│ ├── param.py # 音声パラメータ
│ ├── updater.py # chainerのUpdater
│ └── voice_changer.py # 学習済みモデルを使って声質変換
├── recipe
│ ├── config.json # 学習の設定パラメータ
│ └── recipe.json # 複数の学習を回す時のパラメータ
├── requirements.txt # 依存関係のあるライブラリ
├── scripts
│ ├── extract_acoustic_feature.py # 音響特徴量切り出し
│ ├── launch.py # 複数の学習を回す
│ ├── ln_apply_subset.py
│ ├── ln_atr503_to_subset.py
│ ├── ln_jnas_subset.py
├── tests
│ ├── init.py
│ └── test_dataset.py
└── train.py # 学習用のスクリプト
回答1を参考にして考えました。

PythonのPathについてによれば、

Pythonを使い始めた頃、Path設定がよくわからなかった。
あるモジュールをインポートして使いたいのだけど、使えない。どうもPathが通っていないようだという事はわかったのだが、Pathと言えばWindowsだと思っていたのでWindows設定を変更していた。でも動かない・・・。

実はPythonの実行マシン内にPath設定を持っていたのでした(笑)。

ということで、Windowsのユーザー環境変数のPYTHONPATHに設定する必要があるようです。

それで、PYTHONPATHをbecome_yukarinに通しましたが、同じエラーが出ます。

become_yukarinの上のディレクトリにPYTHONPATHを通してみたところ、パッケージbecome_yukarinが見つからないとのエラーは回避できました。

今度はchainerがないとのエラーが出ました。

Chainerのインストール方法をわかりやすく解説|Mac・Linux・Windowsを参考に、
試したところ、もうChainerはインストールされているようです。

pip uninstall Chainer
でChainerをいったんアンインストールしました。
pip install chainer
でChainerを再びインストールしました。
結果は変わりなしです。

PythonとAnacondaをアンインストールして、Anacondaを入れ直し、chainerを入れ直したところ何もエラーが出なくなりました。

やはり関連付けがPycahrmになっていたので変更しました。

librosaが無いとのエラーが出ました。
pip install librosa
で入れました。

pysptkがないとのエラーが出ました。
pip install pysptk
で入れようとしたら、赤字のエラーが大量に出ます。
    
Win + Python3.6で「pip install」を実行したときに「UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83」と表示される。を参考に修正してみました。追記2行コメントアウト4行でエラーメッセージに変化が見られましたが、インストールはできないです。

参考
ディープラーニングの力で結月ゆかりの声になってみた
https://hiroshiba.github.io/blog/became-yuduki-yukari-with-deep-learning-power/

pythonが立ち上がらなくなりました

python scripts/extract_acoustic_feature.py -i1 dat/in_1st_my_wav -i2 dat/in_1st_yukari_wav -o1 dat/out_1st_my_npy -o2 dat/out_1st_yukari_npy

Command 'python' not found, but can be installed with:

sudo apt install python3
sudo apt install python
sudo apt install python-minimal

You also have python3 installed, you can run 'python3' instead.

ステレオ入力・ステレオ出力

初めまして
質問お願い致します。

学習用の音声データにステレオの音源を使用しても
モノラル化して(?)学習し、モノラルで出力されるようになっているようですが

変換結果もステレオにすることはできますでしょうか?

train_crop_sizeの意味

recipe内でtrain_crop_sizeを指定していますが
こちらは特徴量のフレーム数を表すのか,音声のサンプル数を表しているのかどちらなのでしょうか?

第一段階の学習を回す

音響特徴量の切り出しはできました。train.pyで第一段階の学習を回すところまで来ましたが、
config.jsonに、切り出した音響特徴量のそれぞれのパスファイル名を指定して、train.pyを実行すると良いのですか?

feature thinking

あなたのプロジェクトを見た後で、私たちは歌のスペクトルを生成し、それを合成のためのコンポジションにインポートできるモデルを訓練することができると思います。
何かアドバイス?

After seeing your project, I think that can we train a model that can generate the spectrum of singing and import it into the composition to synthesis.
any advice?

第1段階学習用の音声データ準備について

第1段階の音声データのペアを作成して試しているのですが、性能を上げるために音声データ準備について勘所をご教授いただきたいです。

  • 音声ファイルの頭位置やタイミングを揃えた方がよいか(学習の過程で吸収されるので揃える必要ないなどありますでしょうか)

  • 各音声ファイルの1ファイルの長さはどれくらいがよいか(1文字単位の音声や10秒以上のセリフなどの音声が手元にあるのですが、どれを優先的に録音していくべきか迷っています)

  • どの程度の音声ファイルを用意すればよいか(デモ動画作成時はどの程度のファイル数(または音声の長さ)を用意したのか教えていただきたいです)

  • 複数の表現の声をまとめて学習してしまってよいか(例えば、かわいい声とドスの聞いた声がある場合、混ぜて学習してしまってよいのかが知りたいです)

音響特徴量の切り出しのコマンドのエラー

アウトプットには何を指定するといいのですか?
また、ファイル名はA01~A13.wavをを指定していますが、これで良いのですか?

C:\become-yukarin\become-yukarin>python scripts\extract_acoustic_feature.py -i1 ../My_ATR503/.wav -i2 ../Sasara_ATR503/.wav -o1 ../out_MyATR503/.wav -o2 ../out_SasaraATR503/.wav
C:\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
['class',
'contains',
'delattr',
'dict',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'weakref',
'_get_args',
'_get_kwargs',
'alpha',
'disable_alignment',
'enable_overwrite',
'f0_ceil1',
'f0_ceil2',
'f0_estimating_method',
'f0_floor1',
'f0_floor2',
'frame_period',
'ignore_feature',
'input1_directory',
'input2_directory',
'order',
'output1_directory',
'output2_directory',
'pad_second',
'pre_converter1_config',
'pre_converter1_model',
'sample_rate',
'top_db']
Traceback (most recent call last):
File "C:\Anaconda3\lib\pathlib.py", line 1226, in mkdir
self._accessor.mkdir(self, mode)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '..\out_MyATR503\
.wav'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "scripts\extract_acoustic_feature.py", line 208, in
main()
File "scripts\extract_acoustic_feature.py", line 197, in main
arguments.output1_directory.mkdir(exist_ok=True)
File "C:\Anaconda3\lib\pathlib.py", line 1235, in mkdir
if not exist_ok or not self.is_dir():
File "C:\Anaconda3\lib\pathlib.py", line 1326, in is_dir
return S_ISDIR(self.stat().st_mode)
File "C:\Anaconda3\lib\pathlib.py", line 1136, in stat
return self._accessor.stat(self)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '..\out_MyATR503\
.wav'

train.pyの実行エラー

train.pyを動かすとこのようなエラーがはきだされます。
Traceback (most recent call last):
File "train.py", line 21, in
parser.add_argument('config_json_path', type=Path)
NameError: name 'parser' is not defined

train.pyによる学習

以下のエラーが出ます。

train.py
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "C:\become-yukarin\become-yukarin\train.py", line 19, in
parser = argparse.ArgumentParser()
NameError: name 'argparse' is not defined

モデルの余剰部分について

トーダと申します。いつも生放送を拝見しております。
SRおよび変換モデルについてなのですが、ソースコードを読む限りではConv-BatchNorm(BN)-Relu構造を使用していると見受けられるのですが、Convolutionレイヤーでnobias=Falseとなっています。BNでは平均を0分散を1に正規化しています。そのためこの構造ではbiasを使用する意味はないと思われます。重箱の隅をつつくようで申し訳ないのですが、高速化の観点から削減すべきだと思っております。
長文失礼いたしました。

音響特徴量切り出しがうまくいかない

\become-yukarin-master\scripts> python extract_acoustic_feature.pyTraceb
ack (most recent call last):
File "extract_acoustic_feature.py", line 12, in
from become_yukarin.acoustic_converter import AcousticConverter
ModuleNotFoundError: No module named 'become_yukarin'
といったエラーをだします。

上記の問題は解決しましたが、次は最後のnamed 'world4py'になりました

become_yukarin/param.pyで指定されているalphaの値

現在、alpha = 0.466と指定されておりますが
こちらの値はサンプリング周波数ごとに異なるようです
https://github.com/marytts/marytts/blob/master/marytts-builder/src/main/java/marytts/tools/voiceimport/HMMVoiceConfigure.java#L151

pysptkのutil.pyに実装があるようなので可能であれば周波数ごとにalphaを指定するように対応していただけませんでしょうか
https://github.com/r9y9/pysptk/blob/5829eba57324bd6a8d1d4badc6b7e31c108ae97e/pysptk/util.py#L140

お手数ですがよろしくお願いします

2段階目の学習文数

第2段階の学習で

1つのディレクトリの超大量の結月ゆかり音声データを置く

とありますが、だいたい何文(何時間分)程の学習データを使用されてますか?
結月ゆかりにJNASを読ませたものを使用してる感じでしょうか?

音響特徴量の切り出しのコマンドのエラー

*.wavを追加してみたところ以下のエラーになりました。

C:\become-yukarin\become-yukarin>python scripts\extract_acoustic_feature.py -i1 My_ATR503 *.wav -i2 Sasara_ATR503 *.wav -o1 out_MyATR503 *.wav -o2 out_SasaraATR503 *.wav
C:\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
usage: extract_acoustic_feature.py [-h] [--input1_directory INPUT1_DIRECTORY]
[--input2_directory INPUT2_DIRECTORY]
[--output1_directory OUTPUT1_DIRECTORY]
[--output2_directory OUTPUT2_DIRECTORY]
[--pre_converter1_config PRE_CONVERTER1_CONFIG]
[--pre_converter1_model PRE_CONVERTER1_MODEL]
[--sample_rate SAMPLE_RATE]
[--top_db TOP_DB] [--pad_second PAD_SECOND]
[--frame_period FRAME_PERIOD]
[--order ORDER] [--alpha ALPHA]
[--f0_estimating_method F0_ESTIMATING_METHOD]
[--f0_floor1 F0_FLOOR1]
[--f0_ceil1 F0_CEIL1]
[--f0_floor2 F0_FLOOR2]
[--f0_ceil2 F0_CEIL2]
[--ignore_feature IGNORE_FEATURE [IGNORE_FEATURE ...]]
[--disable_alignment] [--enable_overwrite]
extract_acoustic_feature.py: error: unrecognized arguments: *.wav *.wav *.wav *.wav`

抽出した特徴量を音声に戻したい

1段目の変換時に、無音部分から発話部分に入るところでノイズが発生してしまう問題がありました
DTWの精度を確かめる必要があるため、特徴量から音声に戻したいと考えておりますが
どのようにすればよいでしょうか?

合成部分は
become-yukarin/show alignment feature.ipynb
を参考にやってみます

extract_acoustic_feature.py時のエラー

Traceback (most recent call last):
File "scripts/extract_acoustic_feature.py", line 206, in
main()
File "scripts/extract_acoustic_feature.py", line 193, in main
assert len(paths1) == len(paths2)
AssertionError
のようなエラーがでるようになってしまいました。
何が原因でしょうか?

NumpyのRuntime Errorで困っています。

前提・実現したいこと
Phythonでbecome-yukarinを動かそうとしています。
Readme.mdに従い、Githubクローン、Python3.6(Anaconda)インストール、環境整備を行い、
音響特徴量の切り出しを行おうと、scripts/extract_acoustic_feature.pyを4つパスの引数付けて実行してみましたが、エラーが出ます。

発生している問題・エラーメッセージ

C:\become-yukarin\become-yukarin>python scripts/extract_acoustic_feature.py -i1 \My_ATR503 -i2 \Sasara_ATR503 -o1 \out_MyATR503 -o2 \out_SasaraATR503
C:\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
['class',
'contains',
'delattr',
'dict',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'weakref',
'_get_args',
'_get_kwargs',
'alpha',
'disable_alignment',
'enable_overwrite',
'f0_ceil1',
'f0_ceil2',
'f0_estimating_method',
'f0_floor1',
'f0_floor2',
'frame_period',
'ignore_feature',
'input1_directory',
'input2_directory',
'order',
'output1_directory',
'output2_directory',
'pad_second',
'pre_converter1_config',
'pre_converter1_model',
'sample_rate',
'top_db']
C:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:2957: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
C:\Anaconda3\lib\site-packages\numpy\core_methods.py:73: RuntimeWarning: invalid value encountered in true_divide
ret, rcount, out=ret, casting='unsafe', subok=False)
C:\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:3194: RuntimeWarning: Degrees of freedom <= 0 for slice
**kwargs)
C:\Anaconda3\lib\site-packages\numpy\core_methods.py:105: RuntimeWarning: invalid value encountered in true_divide
arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
C:\Anaconda3\lib\site-packages\numpy\core_methods.py:125: RuntimeWarning: invalid value encountered in true_divide
ret, rcount, out=ret, casting='unsafe', subok=False)

該当のソースコード

C:\become-yukarin\become-yukarin>python scripts/extract_acoustic_feature.py -i1 \My_ATR503 -i2 \Sasara_ATR503 -o1 \out_MyATR503 -o2 \out_SasaraATR503
試したこと
extract_acoustic_feature.pyに引数で学習データの入力出力を指定した。
193行lobになっていたのでglobに修正
引数を4つにした。

補足情報(FW/ツールのバージョンなど)
Python3.6(Anaconda)

ファイル構造 My_ATR503とSasara_ATR503を追加しました。

``
├── become_yukarin  # このディレクトリは外から使えることを想定
│  ├── init.py
│  ├── config.py  # 学習の設定パラメータ
│  ├── data_struct.py  # データ構造の定義
│  ├── dataset
│  │  ├── init.py
│  │  ├── dataset.py  # データ処理
│  │  └── utility.py
│  ├── model.py  # ニューラルネットワーク構造
│  ├── param.py  # 音声パラメータ
│  ├── updater.py  # chainerのUpdater
│  └── voice_changer.py  # 学習済みモデルを使って声質変換
├── recipe
│  ├── config.json  # 学習の設定パラメータ
│  └── recipe.json  # 複数の学習を回す時のパラメータ
├── requirements.txt  # 依存関係のあるライブラリ
├── scripts
│  ├── extract_acoustic_feature.py  # 音響特徴量切り出し
│  ├── launch.py  # 複数の学習を回す
│  ├── ln_apply_subset.py
│  ├── ln_atr503_to_subset.py
│  ├── ln_jnas_subset.py
├── tests
│  ├── init.py
│  └── test_dataset.py
└── train.py  # 学習用のスクリプト  └── voice_changer.py  # 学習済みモデルを使って声質変換
├── recipe
│  ├── config.json  # 学習の設定パラメータ
│  └── recipe.json  # 複数の学習を回す時のパラメータ
├── requirements.txt  # 依存関係のあるライブラリ
├── scripts
│  ├── extract_acoustic_feature.py  # 音響特徴量切り出し
│  ├── launch.py  # 複数の学習を回す
│  ├── ln_apply_subset.py
│  ├── ln_atr503_to_subset.py
│  ├── ln_jnas_subset.py
├── tests
│  ├── init.py
│  └── test_dataset.py
└── train.py  # 学習用のスクリプト
``

train.pyの学習数について

学習はtrainerを使用して学習していると思いますが
trainer = training.Trainer(updater, out=arguments.output)
こちらではtriggerが指定されていないようです
何iterationで学習を切り上げる、lossがどの程度になったら学習を切り上げるなどの知見はありますか?

train.py実行エラーについて

実行環境:windows10 anaconda

src,yukariに録音音声,ゆかり音声を入れ

python scritpts/extract_acoustic_feature.py -i1 src -i2 yukari -o1 src2 -o2 yukari2

を実行し、src2,yukari2に*.npyとmean.npy,var.npy出力できました。
次に、recipe/config.jsonのinput_glob,input_mean_path,input_var_pathをsrc2のファイルを設定
target_glob,target_mean_path,target_var_pathをyukari2のファイルを設定

python train.py recipe/config.json result

File "C:\yukari\become-yukarin-master\become_yukarin\dataset\dataset.py", line 272, in call
f0[~data.voiced] = 0
TypeError: bad operand type for unary ~: 'float'

と、エラーが出てしましました。

data.voiced=>"nan"
となっており、jsonファイルの設定間違いか、コマンドライン引数の間違いでしょうか。

scripts/super_resolution_test.pyを実行した際にerror!が出る

環境:ubuntu17.10.1

【実行したコード】
PYTHONPATH=pwd python scripts/super_resolution_test.py yukari_2nd -md dat/model -iwd dat/in_2nd_yukari_many_wav

【結果】
dat/model/yukari_2nd/predictor_24300.npz

error! test_data_sr/音声.wav

音声の周波数を統一していないのが要因だと思われますが、他に考えられる要因はございますでしょうか。
もしあればご教示ください。
よろしくお願いします。

-o1のファイル名もしくはディレクトリ名の指定ミス?

C:\become-yukarin\become-yukarin>python scripts\extract_acoustic_feature.py -i1 ../My_ATR503/.wav -i2 ../Sasara_ATR503/.wav -o1 ../out_MyATR503/.npy -o2 ../out_SasaraATR503/.npy
C:\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
['class',
'contains',
'delattr',
'dict',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'weakref',
'_get_args',
'_get_kwargs',
'alpha',
'disable_alignment',
'enable_overwrite',
'f0_ceil1',
'f0_ceil2',
'f0_estimating_method',
'f0_floor1',
'f0_floor2',
'frame_period',
'ignore_feature',
'input1_directory',
'input2_directory',
'order',
'output1_directory',
'output2_directory',
'pad_second',
'pre_converter1_config',
'pre_converter1_model',
'sample_rate',
'top_db']
Traceback (most recent call last):
File "C:\Anaconda3\lib\pathlib.py", line 1226, in mkdir
self._accessor.mkdir(self, mode)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '..\out_MyATR503\
.npy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "scripts\extract_acoustic_feature.py", line 208, in
main()
File "scripts\extract_acoustic_feature.py", line 197, in main
arguments.output1_directory.mkdir(exist_ok=True)
File "C:\Anaconda3\lib\pathlib.py", line 1235, in mkdir
if not exist_ok or not self.is_dir():
File "C:\Anaconda3\lib\pathlib.py", line 1326, in is_dir
return S_ISDIR(self.stat().st_mode)
File "C:\Anaconda3\lib\pathlib.py", line 1136, in stat
return self.accessor.stat(self)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '..\out_MyATR503\
.npy'
C:\become-yukarin\become-yukarin>python scripts\extract_acoustic_feature.py -i1 ../My_ATR503/.wav -i2 ../Sasara_ATR503/.wav -o1 ../out_MyATR503/.npy -o2 ../out_SasaraATR503/.npy
C:\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
['class',
'contains',
'delattr',
'dict',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'weakref',
'_get_args',
'_get_kwargs',
'alpha',
'disable_alignment',
'enable_overwrite',
'f0_ceil1',
'f0_ceil2',
'f0_estimating_method',
'f0_floor1',
'f0_floor2',
'frame_period',
'ignore_feature',
'input1_directory',
'input2_directory',
'order',
'output1_directory',
'output2_directory',
'pad_second',
'pre_converter1_config',
'pre_converter1_model',
'sample_rate',
'top_db']
Traceback (most recent call last):
File "C:\Anaconda3\lib\pathlib.py", line 1226, in mkdir
self._accessor.mkdir(self, mode)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '..\out_MyATR503\
.npy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "scripts\extract_acoustic_feature.py", line 208, in
main()
File "scripts\extract_acoustic_feature.py", line 197, in main
arguments.output1_directory.mkdir(exist_ok=True)
File "C:\Anaconda3\lib\pathlib.py", line 1235, in mkdir
if not exist_ok or not self.is_dir():
File "C:\Anaconda3\lib\pathlib.py", line 1326, in is_dir
return S_ISDIR(self.stat().st_mode)
File "C:\Anaconda3\lib\pathlib.py", line 1136, in stat
return self._accessor.stat(self)
File "C:\Anaconda3\lib\pathlib.py", line 387, in wrapped
return strfunc(str(pathobj), args)
OSError: [WinError 123] ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。: '..\out_MyATR503\
.npy'

-o1 ../out/MyATR503/*.npyが間違っていますか?

Don't install pyworld

Installation fails as follows.

C:\become-yukarin\become-yukarin>pip install pyworld
Collecting pyworld
Using cached pyworld-0.2.4.tar.gz
Requirement already satisfied: numpy in c:\users\khb15\anaconda3\lib\site-packages (from pyworld)
Requirement already satisfied: cython>=0.24.0 in c:\users\khb15\anaconda3\lib\site-packages (from pyworld)
Building wheels for collected packages: pyworld
Running setup.py bdist_wheel for pyworld ... error
Failed building wheel for pyworld
Running setup.py clean for pyworld
Failed cleaning build dir for pyworld
Failed to build pyworld
Installing collected packages: pyworld
Running setup.py install for pyworld ... error
Complete output from command c:\users\khb15\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\KHB15\AppData\Local\Temp\pip-build-c3pttjzp\pyworld\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\KHB15\AppData\Local\Temp\pip-awrx1d9m-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
copying pyworld_init_.py -> build\lib.win-amd64-3.6\pyworld
running build_ext
skipping 'pyworld\pyworld.cpp' Cython extension (up-to-date)
running install_lib
copying build\lib.win-amd64-3.6\pyworld\pyworld.cp36-win_amd64.pyd -> c:\users\khb15\anaconda3\Lib\site-packages\pyworld
error: could not open 'build\lib.win-amd64-3.6\pyworld\pyworld.cp36-win_amd64.pyd': Permission denied

Command "c:\users\khb15\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\KHB15\AppData\Local\Temp\pip-build-c3pttjzp\pyworld\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\KHB15\AppData\Local\Temp\pip-awrx1d9m-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\KHB15\AppData\Local\Temp\pip-build-c3pttjzp\pyworld\

WIN+PhothonでAttributeErrorが出て困っています。

WIN+PhothonでAttributeErrorが出て困っています。
解決済

回答 1

投稿 2018/03/09 13:16 ・編集 2018/03/09 14:26

評価 0
クリップ 0
VIEW 95
BURI55
BURI55

score 3

前提・実現したいこと
Phythonで機械学習の声質変換システムを動かそうとしています。
Githubからのクローン、学習データの用意、環境整備は終わりました。音響特徴量の切り出しを行いたいと、
extract_acoustic_feature.pyの実行中に次のエラーメッセージが発生しました。

発生している問題・エラーメッセージ

C:\become-yukarin\become-yukarin\scripts>extract_acoustic_feature.py
C:\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
['class',
'contains',
'delattr',
'dict',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'weakref',
'_get_args',
'_get_kwargs',
'alpha',
'disable_alignment',
'enable_overwrite',
'f0_ceil1',
'f0_ceil2',
'f0_estimating_method',
'f0_floor1',
'f0_floor2',
'frame_period',
'ignore_feature',
'input1_directory',
'input2_directory',
'order',
'output1_directory',
'output2_directory',
'pad_second',
'pre_converter1_config',
'pre_converter1_model',
'sample_rate',
'top_db']
Traceback (most recent call last):
File "C:\become-yukarin\become-yukarin\scripts\extract_acoustic_feature.py", line 206, in
main()
File "C:\become-yukarin\become-yukarin\scripts\extract_acoustic_feature.py", line 191, in main
paths1 = list(sorted(arguments.input1_directory.glob('\become-yukarin\My_ATR503')))
AttributeError: 'NoneType' object has no attribute 'glob'
該当のソースコード・コマンド
おそらくパス指定してる部分で指示されていないためエラーが出るのかと思いました。

def main():
paths1 = list(sorted(arguments.input1_directory.glob('')))
paths2 = list(sorted(arguments.input2_directory.glob('
')))
assert len(paths1) == len(paths2)

arguments.output1_directory.mkdir(exist_ok=True)
arguments.output2_directory.mkdir(exist_ok=True)

pool = multiprocessing.Pool()
pool.starmap(generate_feature, zip(paths1, paths2), chunksize=16)

generate_mean_var(arguments.output1_directory)
generate_mean_var(arguments.output2_directory)

コンフィグファイルにあるこのディレクトリ指示部分が怪しいと思っているのですが。

{
"dataset": {
"input_glob": "C:/become-yukarin/dataset/aligned-feature/aligned-yukari-pause-hiho-pause-atr-topdb40-smart/hiho-pause/atr.npy",
"input_mean_path": "C:/become-yukarin/dataset/aligned-feature/aligned-yukari-pause-hiho-pause-atr-topdb40-smart/hiho-pause/mean.npy",
"input_var_path": "C:/become-yukarin/dataset/aligned-feature/aligned-yukari-pause-hiho-pause-atr-topdb40-smart/hiho-pause/var.npy",
"target_glob": "C:/become-yukarin/dataset/aligned-feature/aligned-yukari-pause-hiho-pause-atr-topdb40-smart/yukari-pause/atr.npy",
"target_mean_path": "C:/become-yukarin/dataset/aligned-feature/aligned-yukari-pause-hiho-pause-atr-topdb40-smart/yukari-pause/mean.npy",
"target_var_path": "C:/become-yukarin/dataset/aligned-feature/aligned-yukari-pause-hiho-pause-atr-topdb40-smart/yukari-pause/var.npy",
"features": [
"f0",
"mfcc"
],

引数付けて実行しました。

C:\become-yukarin\become-yukarin>python scripts/extract_acoustic_feature.py -i1 C:become-yukarin\become-yukarin\My_ATR503 -i2 C:\become-yukarin\become-yukarin\Sasara_ATR503
C:\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
['class',
'contains',
'delattr',
'dict',
'dir',
'doc',
'eq',
'format',
'ge',
'getattribute',
'gt',
'hash',
'init',
'init_subclass',
'le',
'lt',
'module',
'ne',
'new',
'reduce',
'reduce_ex',
'repr',
'setattr',
'sizeof',
'str',
'subclasshook',
'weakref',
'_get_args',
'_get_kwargs',
'alpha',
'disable_alignment',
'enable_overwrite',
'f0_ceil1',
'f0_ceil2',
'f0_estimating_method',
'f0_floor1',
'f0_floor2',
'frame_period',
'ignore_feature',
'input1_directory',
'input2_directory',
'order',
'output1_directory',
'output2_directory',
'pad_second',
'pre_converter1_config',
'pre_converter1_model',
'sample_rate',
'top_db']
Traceback (most recent call last):
File "scripts/extract_acoustic_feature.py", line 208, in
main()
File "scripts/extract_acoustic_feature.py", line 193, in main
paths1 = list(sorted( arguments.input1_directory.lob('')))
AttributeError: 'WindowsPath' object has no attribute 'lob'
試したこと
glob('
')のアスタリスクにパスを入れてみる。
引数付けて実行する

使い方
必要なライブラリのインストール

pip install -r requirements.txt
学習させる
学習用のPythonスクリプトを実行するには、become_yukarinライブラリをパス(PYTHONPATH)に通す必要があります。
例えばscripts/extract_acoustic_feature.pyを以下のように書いて、パスを通しつつ実行します。

PYTHONPATH=pwd python scripts/extract_acoustic_feature.py ---
第1段階の学習
音声データを用意する
2つのディレクトリに、入出力の音声データを置く(ファイル名を揃える)
音響特徴量切り出しをする
scripts/extract_acoustic_feature.py
補足情報(FW/ツールのバージョンなど)
Python3.6(Anaconda)

Can you please host the pre-trained networks?

I do not have a GPU.
Training the network will take a long time, because I do not have a GPU.
I just want to be a cute girl.
Can you please upload the pretrained network weights?

extract_acoustic_feature.pyによる音響特徴量の切り出しでエラーを吐く

PRINTデバッグしてみたところ、path1の指定はうまくいったようです。が、エラーが出ます。このエラーは何でしょうか?

C:\become-yukarin\become-yukarin>python scripts/extract_acoustic_feature.py -i1 My_ATR503 -i2 Sasara_ATR503 -o1 out_MyATR503 -o2 out_SasaraATR503
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
(中略)
[WindowsPath('My_ATR503/A01.wav'), WindowsPath('My_ATR503/A02.wav'), WindowsPath('My_ATR503/A03.wav'), WindowsPath('My_ATR503/A04.wav'), WindowsPath('My_ATR503/A05.wav'), WindowsPath('My_ATR503/A06.wav'), WindowsPath('My_ATR503/A07.wav'), WindowsPath('My_ATR503/A08.wav'), WindowsPath('My_ATR503/A09.wav'), WindowsPath('My_ATR503/A10.wav'), WindowsPath('My_ATR503/A11.wav'), WindowsPath('My_ATR503/A12.wav'), WindowsPath('My_ATR503/A13.wav')]
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
C:\Users\KHB15\Anaconda3\lib\site-packages\h5py_init
.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\KHB15\Anaconda3\lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "C:\Users\KHB15\Anaconda3\lib\multiprocessing\pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "C:\become-yukarin\become-yukarin\scripts\extract_acoustic_feature.py", line 91, in generate_feature
f1 = acoustic_feature_process1(wave1, test=True).astype_only_float(numpy.float32)
File "C:\become-yukarin\become-yukarin\become_yukarin\dataset\dataset.py", line 130, in call
f0 = pyworld.stonemask(x, _f0, t, fs)
AttributeError: module 'pyworld' has no attribute 'stonemask'
"""
(中略)
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "scripts/extract_acoustic_feature.py", line 209, in
main()
File "scripts/extract_acoustic_feature.py", line 202, in main
pool.starmap(generate_feature, zip(paths1, paths2), chunksize=16)
File "C:\Users\KHB15\Anaconda3\lib\multiprocessing\pool.py", line 274, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "C:\Users\KHB15\Anaconda3\lib\multiprocessing\pool.py", line 644, in get
raise self._value
AttributeError: module 'pyworld' has no attribute 'stonemask'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.