Implement Voice Change for both WindowsTTS, MacOS TTS (w Unicode support) #24
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.
This pull request includes the work done by
mooreg-siin #8 in adding functionality to the WindowsTTS implementation to allow for changing the voice as well as adding some other functionality.A tweak has been made to that implementation to use
CP_UTF8instead ofCP_ACPwhen copying the string data on the native C++ side, to allow for unicode strings to be parsed correctly instead of being converted into ANSI. The x86 and x64 DLLs have been updated with this (one line) change. The resulting DLLs that I've included are also much smaller in size -- I'm assuming this is because mooreg-si's DLLs were compiled using a Debug configuration instead of Release.In addition, I've added support to change the voice passed to the
saycommand for the MacOS TTS implementation. I've added some comments as to how you can retrieve the available list of voices usingsay -v '?'.The set of voices is of course completely different from the set used by the WindowsTTS implementation, so you'll have to figure out how you'd like to manage and map those on your side.
I'm unfortunately not easily able to test these changes locally as the project I have makes some additional internal changes to UAP, so feel free to let me know if I made any careless mistakes here.