Menu

Questing about adding/switching word lists while running

2022-10-26
2022-10-31
  • Ken Schafer

    Ken Schafer - 2022-10-26

    Okay, I've done some searching on these forums and have found some similar questions, but nothing exactly like what I'm looking for.

    Here's my situation: I want to voice control our app and I have built a language model corpus and used the LMTOOL to compile it.

    I am adding the dictionary with the AddNgramSearch function and then setting the Active Search to the specified ngram, and it all works reasonably well, with good recognition of the corpus words. However, there are a number of radically different views in our application, and I want to be able to switch among several different language model corpuses depending on what the user is doing within the application, to limit matches with keywords which aren't current relevant, and I couldn't seem to get this to work.

    Do I need to completely unload the recognizer in order to switch corpuses?

    Secondly, the user is able to give certain nicknames to objects within our program and I'd really love to be able to add these nicknames so the user could identify things by their specific nickname.

    I tried adding them to an on-the-fly generated FSG file and use the AddGrammarSearchFile but it seems like I would then have to switch from the compiled corpus to the FSG file by setting the ActiveSearch to that when what I need is for them both to be active together.

    Any help as to how to go about implementing these two issues would be gratefully appreciated.

     
    • Alex Rudnicky

      Alex Rudnicky - 2022-10-31

      CMUSphinx has dynamic language models. It also has class language models.

      Your different contexts can use dynamic lms; you have to precompile them..
      The class language models can have tokens that expand to a word list (think
      [cityname] -> Tokyo, London,...). But the words have to already be in your
      global dict.

      On Wed, Oct 26, 2022, 02:05 Ken Schafer byteplayer@users.sourceforge.net
      wrote:

      Okay, I've done some searching on these forums and have found some similar
      questions, but nothing exactly like what I'm looking for.

      Here's my situation: I want to voice control our app and I have built a
      language model corpus and used the LMTOOL to compile it.

      I am adding the dictionary with the AddNgramSearch function and then
      setting the Active Search to the specified ngram, and it all works
      reasonably well, with good recognition of the corpus words. However, there
      are a number of radically different views in our application, and I want to
      be able to switch among several different language model corpuses depending
      on what the user is doing within the application, to limit matches with
      keywords which aren't current relevant, and I couldn't seem to get this to
      work.

      Do I need to completely unload the recognizer in order to switch corpuses?

      Secondly, the user is able to give certain nicknames to objects within our
      program and I'd really love to be able to add these nicknames so the user
      could identify things by their specific nickname.

      I tried adding them to an on-the-fly generated FSG file and use the
      AddGrammarSearchFile but it seems like I would then have to switch from the
      compiled corpus to the FSG file by setting the ActiveSearch to that when
      what I need is for them both to be active together.

      Any help as to how to go about implementing these two issues would be
      gratefully appreciated.


      Questing about adding/switching word lists while running
      https://sourceforge.net/p/cmusphinx/discussion/sphinx4/thread/72018bf4bf/?limit=25#cd4e


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cmusphinx/discussion/sphinx4/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.