nerd-dictation icon indicating copy to clipboard operation
nerd-dictation copied to clipboard

Number conversion: "seven twenty two" becomes "7 twenty-two"

Open KJ7LNW opened this issue 1 year ago • 6 comments

When I say "seven twenty two" it becomes "7 twenty-two", but I would expect "722".

I also tried:

  • "seven hundred twenty two" becomes "700 twenty-two"
  • "seven hundred and twenty two" becomes "700 and twenty-two"

KJ7LNW avatar Mar 27 '23 21:03 KJ7LNW

I can't redo this:

  • "seven hundred and twenty two" becomes "722" here.

Other combinations noted are more ambiguous, what is your --numbers-min-value set to?

ideasman42 avatar Apr 02 '23 03:04 ideasman42

Oops, funny, I wrote the min value stuff and forgot it was there. I have --numbers-min-value=3 which explains the issue.

If you see an easy way to make --numbers-min-value realize that 722 is much bigger than 3, then go for it because I'm not quite sure how to hook that in properly. Otherwise, you may close the issue as not a bug.

KJ7LNW avatar Apr 02 '23 23:04 KJ7LNW

Could you show the command used to activate the nerd-dictation ? I can't redo the issue even with --numbers-min-value=3 set.

ideasman42 avatar Apr 05 '23 02:04 ideasman42

 ./nerd-dictation begin --numbers-as-digits --numbers-no-suffix --numbers-min-value=3 --suspend-on-start --verbose=1 --simulate-input-tool=DOTOOLC

KJ7LNW avatar Apr 05 '23 23:04 KJ7LNW

I still can't redo this even with the exact command. It might be the language model outputs "twenty-two" instead of "twenty two" which confuses the parsing - which assumes spaces.

The readme in the model directory reads:

Accurate universal English model (both for callcenter and wideband)

Based on Appen Kaldi model https://github.com/Appen/UHV-OTS-Speech

Librispeech test-clean WER:  5.69%
Tedlium WER:                 6.05%
Callcenter WER:             29.78%

ideasman42 avatar Apr 07 '23 02:04 ideasman42

That could be. I'm using an unmodified vosk-model-en-us-0.42-gigaspeech model and it does say twenty-two.

KJ7LNW avatar Apr 08 '23 00:04 KJ7LNW