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

kaldi status output is too noisy #799

Open
kendonB opened this issue Apr 29, 2020 · 19 comments
Open

kaldi status output is too noisy #799

kendonB opened this issue Apr 29, 2020 · 19 comments
Labels
Kaldi Related to Kaldi speech recognition backend

Comments

@kendonB
Copy link
Collaborator

kendonB commented Apr 29, 2020

Describe the bug
In the status window when running Kaldi, there is too much output.

To Reproduce
Steps to reproduce the behavior (be sure to include the exact command phrase you are using):

  1. Follow the instructions to install kaldi
  2. Say 'sauce.'
*- Starting Caster v 1.6.16 -*
INFO:engine:Listening...
DEBUG:action.exec:Executing action: RegisteredAction() ({'direction': 'up', 'textnv': '', 'nnavi50': 1, 'big': False, '_grammar': Grammar(ccr-1), 'spacing': 0, 'mtn_dir': 'right', 'nnavi10': 1, 'npunc': 1, 'extreme': None, 'modifier': '', 'nnavi3': 1, 'capitalization': 0, 'npunc100': 1, '_rule': PreparedRule(PreparedRule), '_node': Node: Alternative(...), [u'sauce'], 'long': '', 'mtn_mode': None, 's': '', 'n': 1, 'nnavi500': 1, 'splatdir': 'backspace'})
arrow keys
DEBUG:action.exec:Executing action: ['%(direction)s'] ({'direction': 'up', 'textnv': '', 'nnavi50': 1, 'big': False, '_grammar': Grammar(ccr-1), 'spacing': 0, 'mtn_dir': 'right', 'nnavi10': 1, 'npunc': 1, 'extreme': None, 'modifier': '', 'nnavi3': 1, 'capitalization': 0, 'npunc100': 1, '_rule': PreparedRule(PreparedRule), '_node': Node: Alternative(...), [u'sauce'], 'long': '', 'mtn_mode': None, 's': '', 'n': 1, 'nnavi500': 1, 'splatdir': 'backspace'})
DEBUG:action.exec:['%(direction)s']: Parsing dynamic spec: 'up'

Expected behavior
Some concise output along the lines of what shows up in the Natlink status window with DNS.

Screenshots
If applicable, add screenshots to help explain your problem.

System:

  • OS: Windows 10
@kendonB kendonB added the Bug Unexpected behavior from existing features. label Apr 29, 2020
@LexiconCode

This comment has been minimized.

@LexiconCode

This comment has been minimized.

@LexiconCode
Copy link
Member

Actually I will have to double check this, debug should be even more verbose.

@LexiconCode LexiconCode added Kaldi Related to Kaldi speech recognition backend and removed Bug Unexpected behavior from existing features. labels Apr 29, 2020
@LexiconCode
Copy link
Member

@kendonB The verbose output is most likely due to the following workaround in dictation-toolbox/dragonfly#235

@kendonB
Copy link
Collaborator Author

kendonB commented Apr 30, 2020

@Danesprite @daanzu do you have thoughts on how to go about addressing this one? I'm a bit out of my depth here.

@daanzu
Copy link
Contributor

daanzu commented May 1, 2020

@kendonB You can read the background at dictation-toolbox/dragonfly#182 and #774. I currently can't reproduce it myself. I welcome any help trying to track it down. Apparently, removing or disabling that action logging may cause the problems, but I don't really have a good/actionable idea as to why. Alternatively, in lieu of a fix, maybe there is a less conspicuous/annoying hack solution than the logging, but that was all I found before I lost reproducibility.

@kendonB
Copy link
Collaborator Author

kendonB commented May 2, 2020

@daanzu when you say you can't reproduce it, you mean on your regular system or using caster?

@daanzu
Copy link
Contributor

daanzu commented May 2, 2020

@kendonB I can't reproduce it on my dev system currently, although it was happening in the past, both without caster.

@kendonB
Copy link
Collaborator Author

kendonB commented May 2, 2020

I tried reinstalling dragonfly changing the text of the message in this line:
https://github.com/dictation-toolbox/dragonfly/blob/d572df964ea6e65a82d95ca9861ec370af01e341/dragonfly/actions/action_base.py#L96

and I was still finding that the messages came through the same as before - no change.

Does the kaldi model code package up some of the dragonfly code? Or am I just installing the package wrong? To install dragonfly locally I clone the repo then run

python setup.py install

replacing python with the hard coded paths of all three of my python installations to be double sure.

@kendonB
Copy link
Collaborator Author

kendonB commented May 2, 2020

If kaldi is packaging up the dragonfly code, the kaldi releases might just need an update if you are not seeing it on your development system @daanzu?

@LexiconCode
Copy link
Member

@kendonB

python setup.py install

try the following python -m pip install -e .[kaldi]

@kendonB
Copy link
Collaborator Author

kendonB commented May 2, 2020

@LexiconCode I tried doing it that way and I still see the same message without my change.

@kendonB
Copy link
Collaborator Author

kendonB commented May 2, 2020

OK worked it out - just had to delete stuff manually in the packages folder

@kendonB
Copy link
Collaborator Author

kendonB commented May 2, 2020

OK I am trying commenting out the logging line in dragonfly. I'll see if it ruins other things for me over the coming days.
Now like this:

arrow keys
DEBUG:action.exec:['%(direction)s']: Parsing dynamic spec: 'up'
arrow keys
DEBUG:action.exec:['%(direction)s']: Parsing dynamic spec: 'down'

@daanzu
Copy link
Contributor

daanzu commented May 2, 2020

@kendonB I should have been clearer. To "re-enable" the problem, you should only need to do one of (although your way should work too, modulo the craziness of this bug in the first place):

@kendonB
Copy link
Collaborator Author

kendonB commented May 2, 2020

@daanzu your first bullet point means changing this line:

https://github.com/dictation-toolbox/dragonfly/blob/d572df964ea6e65a82d95ca9861ec370af01e341/dragonfly/engines/backend_kaldi/engine.py#L94

to:

logging.getLogger('action.exec').setLevel(logging.WARN)

?

@daanzu
Copy link
Contributor

daanzu commented May 2, 2020

@kendonB No, just add that line somewhere in your loader file or a grammar file, as long as it is executed after the logging initialization. But I am not experienced with Caster.

@kendonB
Copy link
Collaborator Author

kendonB commented May 3, 2020

I haven't noticed any trouble yet after quieting down the debug messages using:

logging.getLogger('action.exec').setLevel(logging.WARN)

This may have fixed it:
dictation-toolbox/dragonfly#182 (comment)

@daanzu
Copy link
Contributor

daanzu commented May 4, 2020

This may have fixed it:
dictation-toolbox/dragonfly#182 (comment)

I don't think that fixed it, because I think I still had it happen after that change, and reverting that change didn't allow me to reproduce it. But with this bug, not sure about anything 🤷 .

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

No branches or pull requests

3 participants