Hi Nicholay
I recognized if I use both options -lm and -jsgf together for starting
pocketsphinx_continuous, only the grammar gets comprised.
Does that mean you can't use a grammar and a language model for pocketsphinx
at the same time?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My recognizer is supposed to recognize the read aloud continuous text.
Until now I only used a language model with Spinx.
If Sphinx can't use a language model and a grammar at the same time, how can
it recognize an arbitrary number inside the text?
I need an idea to solve the numbers problem within the speech recognition.
Thank you in advance for a fast answer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To do such things people usually employ class-based models where trigram lm
describes classes probabilities and each class can be represented by grammar.
Pocketsphinx and sphinx4 support class-based lm in some degree. It's possible
to use classes with word lists. For numbers it should be enough.
If you need more complex grammars embedded into open language model you need
to implement this feature.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Nicholay
Thank you for your proposal.
But I don't understand how I should implement this.
Let's make a little example.
I have a corpus which consists of only a single sentence: there is NUM_CLASS cars
I generate a Trigram language model "test.arpa" out of this corpus.
I write a grammar for the class "NUM_CLASS"
grammar NUM_CLASS;
public < num > = (one | two | three| four);
How can I integrate these two things, language model "test.arpa" and the
grammar which represents the class "NUM_CLASS", into my recognizer during
decoding?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I have just used a language model for Pocketsphinx yet.
Is it possible to use a grammar instead?
Yes, you can use grammar in JSGF format. See -jsgf option of
pocketsphinx_continuous as well as fsg_set* part of the API.
Hi Nicholay
I recognized if I use both options -lm and -jsgf together for starting
pocketsphinx_continuous, only the grammar gets comprised.
Does that mean you can't use a grammar and a language model for pocketsphinx
at the same time?
It means exactly that.
My recognizer is supposed to recognize the read aloud continuous text.
Until now I only used a language model with Spinx.
If Sphinx can't use a language model and a grammar at the same time, how can
it recognize an arbitrary number inside the text?
I need an idea to solve the numbers problem within the speech recognition.
Thank you in advance for a fast answer.
Hello
To do such things people usually employ class-based models where trigram lm
describes classes probabilities and each class can be represented by grammar.
Pocketsphinx and sphinx4 support class-based lm in some degree. It's possible
to use classes with word lists. For numbers it should be enough.
If you need more complex grammars embedded into open language model you need
to implement this feature.
Hi Nicholay
Thank you for your proposal.
But I don't understand how I should implement this.
Let's make a little example.
I have a corpus which consists of only a single sentence:
there is NUM_CLASS carsI generate a Trigram language model "test.arpa" out of this corpus.
I write a grammar for the class "NUM_CLASS"
grammar NUM_CLASS;
public < num > = (one | two | three| four);
How can I integrate these two things, language model "test.arpa" and the
grammar which represents the class "NUM_CLASS", into my recognizer during
decoding?
Hello
You can't integrate jsgf grammar right now, only the list of words. Please see
ClassBased demo in sphinx4 sources for details.