mmorise / World

A high-quality speech analysis, manipulation and synthesis system
http://www.kisc.meiji.ac.jp/~mmorise/world/english
Other
1.17k stars 251 forks source link

Segmentation fault in Dio #62

Closed takenori-y closed 6 years ago

takenori-y commented 6 years ago

If a very short waveform is given to Dio(), a segmentation fault is caused. The minimum length of waveform causes the segmentation fault seems to depend on sampling rate and floor F0.

mmorise commented 6 years ago

There are several causes in the segmentation fault. In cases where the signal's amplitudes in all frames are completely zero, the Dio() would not be able to work. Adding a low-SNR noise is effective to avoid this error. If you have a waveform that causes a segmentation fault, please give me the file if possible. I will check the source code by using the file and fix the bug.

takenori-y commented 6 years ago

Thank you for your quick reply. I attached the waveform that causes a segmentation fault. When the floor F0 is 60 Hz and the sampling frequency is 16 kHz, the waveform whose length is less than 480 causes the problem. tmp.zip

mmorise commented 6 years ago

Thank you very much. I will check the source code this weekend. (If I find a serious bug, please give me more days. I have no time next week because of a business trip.)

mmorise commented 6 years ago

I updated the source code. StoneMask() was also modified because it cause another error.

takenori-y commented 6 years ago

Thank you for your quick response. I used the latest source code, but a waveform whose length is between 80 and 130 still caused a segmentation fault. I attached it. tmp2.zip

mmorise commented 6 years ago

Sorry, I cannot confirm the error in Dio(), but Harvest() caused a segmentation fault. If Dio() cannot work as you pointed out, please give me more information. I will check the source code in Harvest().

mmorise commented 6 years ago

I fixed a bug in Harvest(). I think that the limitation in the length was removed.

takenori-y commented 6 years ago

I modified dio.cpp in the same way as harvest.cpp. The problem is solved. Thank you!