ディープラーニングとは直接の関係はないですが、ゆくゆくは音声系の何かしらをやりたいのでWORLDを触ってみます。
http://www.kki.yamanashi.ac.jp/~mmorise/world/index.html
参考にしたのはこちらの記事です。
https://qiita.com/ohtaman/items/84426cee09c2ba4abc22
結果がこちら。
https://hello-deeplearning.herokuapp.com/examples/hello_world
scipy.io.wavfile.write を使ってファイルを書き出して再生してもよい
ということで、
1
wavfile.write('synthesized.wav', fs, synthesized)
で書き込んだデータを再生したら爆音で耳が死にかけました。
なぜ?と思って出力ファイルを見てみると Bits per sample
が16から64に変わっていました。
(そのせいで音が大きくなる原理はまだわかっていない)
https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.write.html
The bits-per-sample and PCM/float will be determined by the data-type.
型によって自動判別されるようです。
1
wavfile.write('synthesized.wav', fs, synthesized.astype(np.int16))
として爆音問題は解消しました。