Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Word Probability #236

Open
revett opened this issue Nov 11, 2016 · 5 comments
Open

Word Probability #236

revett opened this issue Nov 11, 2016 · 5 comments

Comments

@revett
Copy link

revett commented Nov 11, 2016

Current Behavior

const didDetectSpeech = (possiblePhrases) => {
  console.log(possiblePhrases);
};

annyang.addCallback('result', didDetectSpeech);
annyang.start({
  continuous: false,
});

// Output: ['cat', 'mat', 'hat']

Possible Solution

Output changed to:

[
  {
    value: 'cat',
    probability: '0.9'
  },
  {
    value: 'mat',
    probability: '0.8'
  },
  {
    value: 'hat',
    probability: '0.7'
  },
]

Questions

  • Does the speech recognition engine return a probability for a given word?
  • Is there a way to limit the number of possible words handed back? E.g; top 5.
@danep93
Copy link

danep93 commented Nov 30, 2016

Is anyone working on this? I think it's a good idea and would like to pick this up

@TalAter
Copy link
Owner

TalAter commented Dec 1, 2016

  1. What is the use case? Why do you need this in your code? (it helps to plan a feature better, if we keep some use cases in mind).

  2. I would prefer an API that does not break existing behavior like the one suggested above. There are a lot of people using this right now, and this might break their existing code.


Does the speech recognition engine return a probability for a given word?

Yes, it does.

Is there a way to limit the number of possible words handed back? E.g; top 5.

It is currently limited to 5. Do you see a need to allow the developer to change this?


Thanks 👍

@revett
Copy link
Author

revett commented Dec 1, 2016

Great 🎉

My use-case is around filtering out words which have a low probability, to make my application more reliable.

@TalAter I agree that the schema should be consistent. I can imagine two possible implementations:

  1. Release as a major version (v3.0.0) which follows the rules of semantic versioning.
  2. Add optional configuration to output verbose values. So the default output is still the same schema (an array of strings), but the verbose output will be an array of objects.

Thoughts?

@danep93
Copy link

danep93 commented Jan 16, 2017

Any update on this? Still want to implement this whether through an API or just through a new major version

@caffeinum
Copy link

caffeinum commented Jan 16, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants