Fix low audio quality for Windows SAPI5 voices #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
XML tags
<voice>are used to change the voice, but the output audio format is affected by the current selected voice, which is the system default voice. If the system default voice only support a lower audio quality (for example, 16kHz sample rate), the entire speech audio will be output at this quality, which can make higher quality voices sound worse.This change attempts to fix the problem by forcing the output audio format to be 48kHz 16-bit stereo, the highest quality preset in SAPI, no matter what format the voice and the audio device support. SAPI will convert the audio format when necessary.