MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Speech input source: Add a confidence level selector

Open cybergoulion opened this issue 9 years ago • 9 comments

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);

cybergoulion avatar Sep 04 '17 11:09 cybergoulion

Great idea!

StephenHodgson avatar Sep 04 '17 15:09 StephenHodgson

@StephenHodgson I actually already implemented it and use it, but I am not familiar with the procedure to contribute the changes to the project.

cybergoulion avatar Sep 04 '17 16:09 cybergoulion

Fork the repo, make a pull request, and be sure to sign the contribution agreement.

StephenHodgson avatar Sep 04 '17 16:09 StephenHodgson

OK, I'll do that then!

cybergoulion avatar Sep 04 '17 16:09 cybergoulion

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.

StephenHodgson avatar Sep 04 '17 16:09 StephenHodgson

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.

  1. Is the name of the property clear enough?
  2. Should I create a branch for this?
  3. 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...

cybergoulion avatar Sep 04 '17 16:09 cybergoulion

Well thanks for joining the party and making a contribution!

  1. Is the name of the property clear enough?

Yeah it's great, no worries there.

  1. Should I create a branch for this?

Yes, after forking your copy of the repository make a new branch and add your changes.

  1. Should I change this and make a pull request now?

That would be awesome!

StephenHodgson avatar Sep 04 '17 16:09 StephenHodgson

Ok, last question. Is there a guideline for branch naming?

cybergoulion avatar Sep 04 '17 17:09 cybergoulion

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.

StephenHodgson avatar Sep 04 '17 17:09 StephenHodgson