Pregunta

Scenario 1 : Text file contains 5 line of text. maximum = 4 If I say, "multiplayer game", it will say "multiplayer game" ( Works perfectly )

Thus, if maximum is 4, I can say up to 4 words

Scenario 2 : Text file contains 500 line of text. maximum = 4 If I say, "multiplayer game", it will say nothing ( Doesn't work )

If I say, "multiplayer game multiplayer game", it will say "multiplayer game multiplayer game" ( Works perfectly )

Thus, if I set it to 4, it must be exactly 4 words. Not like in Scenerio 1, where it can be up to 4 words instead of MUST BE 4 words

    private static Grammar RFC_Grammar(int lineNum, string fileName, string grammarName, int maximum)
    {
        string[] choiceArray = File.ReadAllLines("C:\\Users\\Hehe\\Desktop\\" + fileName);
        Choices choices = new Choices(choiceArray );

        GrammarBuilder choicesGrammar = new GrammarBuilder();
        choicesGrammar.Append(choices,0,maximum);

        Grammar grammar = new Grammar(choicesGrammar);
        grammar.Name = grammarName;

        return grammar;
    }
¿Fue útil?

Solución

With a set of 500 words in a single choice, you're likely running into limits of the recognizer to correctly disambiguate between the various choices.

Without going into a ton of detail, speech recognizers work by matching phoneme sequences to possible words.

If a sequence is considered to be "too unlikely", it is pruned; if an audio sequence comes in that doesn't result in a sufficiently high confidence, then the entire recognition is rejected (and a "false recognition" event is generated).

The wider the spread of words, the lower the individual confidences can be (and, indeed, the narrower the spread of words, then the confidences can be unjustifiably high, resulting in false positive recognitions).

With this large set of words, you're likely going to need some sort of dictation recognition model (which can be implemented, but it's a lot more complicated).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top