Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    LexiconCode
    @LexiconCode
    Is there some sort of lightweight package for detecting whether or not two words are homonyms?
    David Zurow
    @daanzu
    @LexiconCode I haven't thought about it deeply, but I think it is as simple as looking at the lexicon.txt file in one of my models, and checking if the pronunciation is identical
    LexiconCode
    @LexiconCode
    Oh that's interesting. This issue is particularly difficult when parsing free dictation. Similar use case dealing with OCR result compared to dictation result.
    Lauren Horne
    @lahwran
    @daanzu any chance you know what paper that was? I'm very interested in what it would take to get transformers working, especially if a pretrained LM transformer can be used rather than the papers I've found, which all seem to be trying to do end-to-end transformer
    David Zurow
    @daanzu
    @lahwran https://arxiv.org/pdf/2001.01140.pdf Unfortunately, as far as I know, the code for it isn't released. You could check with the author. I'd be curious to see it too.
    I don't think integrating a transformer with Kaldi is too difficult conceptually, though I say that only knowing the basics of how transformers usually work. Doing it efficiently may be more difficult. I might be able to give you pointers or help out some. Basically, you need to run the transformer so that it mimics a FST LM.
    Most simplistically, you could just take the n-best most likely recognitions for an utterance, and then run them through the transformer, and rank them by its perplexity.
    Ryan Hileman
    @lunixbochs
    FWIW I've been playing with transformer LMs and they're just not very fast
    Ryan Hileman
    @lunixbochs
    like the above sentence would probably be over a second just to check one path
    David Zurow
    @daanzu
    yeah, speed is a big problem
    JohnDoe02
    @JohnDoe02
    How can I ensure KAG stays responsive when my system is under heavy load (e.g., when building a large codebase)?
    I tried renice of the dragonfly process to -19 while at the same time lowering priority of the build to 19
    However, this does not really do the trick .. I end up waiting 2 seconds for a recognition, while the system still feels responsive when using mouse and keyboard
    David Zurow
    @daanzu
    @JohnDoe02 this is on linux, right? I haven't experienced that myself on linux, but maybe try ionice too. the kaldi decoder is bandwith hungry.
    JohnDoe02
    @JohnDoe02
    Yes, linux .. thanks for the hint, I will give it a try
    Shervin Emami
    @shervinemami
    @JohnDoe02 If it's something important for you, I'm guessing it's worth you learning about cgroups in Linux and running things through that, so you have more control of priorities and resources. The "nice" tool is great that it's so easy to use but in many cases it doesn't have much impact these days since the Linux scheduler is quite complex, and cgroups is the recommended way to do these sorts of things.
    JohnDoe02
    @JohnDoe02
    @shervinemami Thanks, sounds like a good hint. ionice did not fix this issue for me
    David Zurow
    @daanzu
    @JohnDoe02 sorry ionice didn't help. I suspect then that it may be located in the system sound, outside of the scope of the kaldi backend. what if you try running a simple audio app to record during such a heavy load situation, to see if that recording has glitches?
    ckie
    @ckie:ckie.dev
    [m]
    hey so i've been packaging the ecosystem for NixOS and i have to say KAG has been very resistant to being packaged
    so far, 4 patches to: - stub the main repo's cmake ExternalProject thingy - remove exec_dir - change the FFI path - (the kaldi fork) add the dragonfly things to their cmake
    but other then that, the software seems very cool :D
    ckie
    @ckie:ckie.dev
    [m]
    daanzu-5b9241cbd73408ce4fa73ab2: compile of the kaldi fork just blew up for me: /build/source/src/dragonfly/agf-gmm.cc:307:35: error: no matching function for call to 'fst::ActiveGrammarFst::ActiveGrammarFst(std::vector<const fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > >*>&)'
    David Zurow
    @daanzu
    @ckie:ckie.dev Thanks for your work! Packaging this ecosystem to make it easier to use could use the help! I have been curious about nix, but haven't had a chance to mess with it yet. I am interested to see how the packaging works. Sorry to hear that KaldiAG has been troublesome. Kaldi itself is a big project, and interfacing with it can be difficult.
    agf-gmm.cc is actually highly deprecated and not really used any more, along with a fair bit of other similar code. I haven't gotten around to removing it mostly because it hasn't impacted my compilation at all. Would it help for me to remove those parts?
    ckie
    @ckie:ckie.dev
    [m]
    it probably would, yeah
    also i have to say i'm curious, did you write that with your voice?
    David Zurow
    @daanzu
    yep, I wrote the earliest versions of KaldiAG using the WSR backend of dragonfly
    ckie
    @ckie:ckie.dev
    [m]
    I meant the message you just sent but that's cool too :P
    David Zurow
    @daanzu
    but now KaldiAG is effectively "bootstrapped" with itself for me
    ha, no problem!
    ckie
    @ckie:ckie.dev
    [m]
    ...are not even close to matching
    David Zurow
    @daanzu
    ah, looks like I don't have it included in the Makefile: OBJFILES = base-nnet3.o active-base-nnet3.o agf-sub-nnet3.o plain-sub-nnet3.o laf-sub-nnet3.o fst-export.o md5.o
    ckie
    @ckie:ckie.dev
    [m]
    ah
    also, i just pushed my WIP stuff if you wanna take a look: NixOS/nixpkgs@ca4691f
    David Zurow
    @daanzu
    cool, thanks, I will!
    ckie
    @ckie:ckie.dev
    [m]
    most other things i've packaged for nix have been nicer so don't treat this as canonical
    (nicer to package that is, damn tired brain!)
    ckie
    @ckie:ckie.dev
    [m]
    daanzu-5b9241cbd73408ce4fa73ab2: i think i got it building! now just need to hook it up to the python part
    ckie
    @ckie:ckie.dev
    [m]
    daanzu-5b9241cbd73408ce4fa73ab2: and it runs with kaldi-grammar-simple! only problem is i don't know where to find a cheat sheet or something
    David Zurow
    @daanzu
    @ckie:ckie.dev Great! Good question about the cheat sheet. One doesn't come to mind; we could probably use one. The best is probably poking around https://dragonfly2.readthedocs.io/en/stable/introduction.html
    ckie
    @ckie:ckie.dev
    [m]
    daanzu-5b9241cbd73408ce4fa73ab2: i've finally bothered with the PR! NixOS/nixpkgs#131526
    David Zurow
    @daanzu
    @ckie:ckie.dev Thanks!
    LexiconCode
    @LexiconCode
    Do we have access if part of an utterance is part of dictation element with results in a observer? An engine recognition results object. https://github.com/dictation-toolbox/dragonfly/blob/7dbcb636c5c05ca025bdb27e52bc47b8b87dd8e8/dragonfly/grammar/recobs.py#L90 on_recognition(self, words, results)
    David Zurow
    @daanzu
    I think so. Check the results object, specifically for something called words_are_dictation_mask (I haven't checked myself yet)
    @LexiconCode
    LexiconCode
    @LexiconCode
    @daanzu thank you, that's exactly what I needed!
    David Zurow
    @daanzu
    @LexiconCode :+1:
    LexiconCode
    @LexiconCode

    on startup

    INFO:kaldi.model:generating lexicon files
    INFO:kaldi:<kaldi_active_grammar.utils.FSTFileCache object at 0x000001FF477562E0>: invalidating all file entries in cache
    FATAL: StringWeight::Plus: Unequal arguments (non-functional FST?) w1 = 168711 w2 = 168712

    David Zurow
    @daanzu
    @LexiconCode hmm, I don't recall seeing that error much. try deleting the cache files, and/or running with full debugging logging enabled?