Fix support for neural-only voices #160
Merged
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.
Description
This is a bug fix. Prior to this PR, if a developer tried to configure a host to use a voice that was only supported with the Polly neural engine the voice ID would be ignored and the host would default to using the Amy (en-GB) voice.
The root cause was faulty conditional logic that didn't accurately identify when the neural engine was available. This PR fixes that.
Related Issue #
n/a
Reviewer Testing Instructions
In the previous version of the repo, if you modified any of the demos to use a neural-only voice like "Elin" it would instead use "Amy" instead. Now if you modify any of the demos to use a neural-only voice, that voice will be used.
Submission Checklist
I confirm that I have...
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.