Enable whole-program optimization when compiling eSpeak-NG#17631
Conversation
|
@gexgd0419 - did you test the klatt voice at different rates and while rateboosted? |
|
I compared the waveforms by inverting one of them and overlay it onto the other to check if they could cancel each other out. When at 1X speed, the waveforms could cancel each other out perfectly, leaving only silence, which means that they were exactly the same. When using rate boost, however, the result wasn't purely silence, so the cancelling out wasn't perfect, which means that they were not exactly the same. But still, the result was much quieter, so the cancelling out did work to some extent, which means that they were at least very similar. Here are two of the wave files I got from eSpeak, with rate boost enabled, one with and one without whole-program optimization. You can listen to them and compare them. Welcome to NVDA dialog wave files (with rate boost).zip I also tried making eSpeak speak the same thing twice at the same rate when it was compiled without whole-program optimization. But still, the results couldn't cancel each other out perfectly. I would assume that rate boosting the same audio might make it slightly different each time. |
Link to issue number:
Closes #17623
Summary of the issue:
As for now, whole-program optimization for eSpeak-NG is intentionally turned off.
This was introduced in commit cf0443b when MSVC 2012 was used to compile eSpeak.
Enabling whole-program optimization can make the eSpeak DLL more efficient and smaller, from 637 KiB to 624 KiB.
It can also solve the problem of using a dynamically linked version of Sonic without
__declspec(dllimport)in the header, because the optimization will be performed by the linker, if whole-program optimization is enabled.Description of user facing changes
None.
Description of development approach
Enable whole-program optimization by removing the
/GL-option.Testing strategy:
I tried the klatt4 variant, but couldn't notice the difference between enabling and disabling the whole-program optimization. In fact, the waveforms generated are exactly the same.
Known issues with pull request:
None.
Code Review Checklist:
@coderabbitai summary