Speech input source: Add a confidence level selector
As it is in SpeechInputSource, new keyword recognizers are created with the default confidence level. This is problematic epsecially if the application targets non native speakers of the spoken language, because confidence cannot be set to ConfidenceLevel.Low. This can be solved by adding confidence level enumeration selector for a property in the inspector and using the alternative constructor for the new KeywordRecognizer in the Start() function as in:
keywordRecognizer = new KeywordRecognizer(keywords, ConfidenceLevelSelection);
Great idea!
@StephenHodgson I actually already implemented it and use it, but I am not familiar with the procedure to contribute the changes to the project.
Fork the repo, make a pull request, and be sure to sign the contribution agreement.
OK, I'll do that then!
Just be aware I have some pending changes to those classes in https://github.com/Microsoft/MixedRealityToolkit-Unity/pull/747. If it get's merged before your PR then you'll need to merge it in on your branch to avoid conflicts.
Ok, I saw the change, there should be no conflict.
I mainly added this in SpeechInputSource.cs:
[Tooltip("The confidence level for the keyword recognizer.")]
public ConfidenceLevel RecognitionConfidenceLevel;
and made some changes to SpeechInputSourceEditor.cs to work in the inspector.
I also have some questions if you please.
- Is the name of the property clear enough?
- Should I create a branch for this?
- Should I change this and make a pull request now?
Sorry, I have not contributed to the project before and trying to get my bearings...
Well thanks for joining the party and making a contribution!
- Is the name of the property clear enough?
Yeah it's great, no worries there.
- Should I create a branch for this?
Yes, after forking your copy of the repository make a new branch and add your changes.
- Should I change this and make a pull request now?
That would be awesome!
Ok, last question. Is there a guideline for branch naming?
Nope not really, that's up to you on your repo. You'll be submitting a PR directly to the master branch here so it really won't matter.