dwks / silvius

Kaldi-based speech recognition system + grammar
http://voxhub.io/silvius
BSD 2-Clause "Simplified" License
101 stars 28 forks source link

Saying a number in a sentence throws an error #12

Closed crypdick closed 6 years ago

crypdick commented 6 years ago

If I try to say "phrase something something something one" I get this error:

[phrase, ANY, ANY, ANY, one, END]
Error: Unexpected token `one' (word number 5)

Works with every number I tried:

> phrase five
[phrase, five, END]
Error: Unexpected token `five' (word number 2)
dwks commented 6 years ago

Fixed in 4d57276. The root problem is that the lexer always handles command words, even out of context. So any command words which do not actually begin a command need to be slurped into the "phrase/sentence" code. There may be other examples like this.