Skip to content

How to use search module API? #314

Closed

Description

@roccopersico99

I am having some trouble updating my old keyphrase search implementation to work with PocketSphinx5. I applied the changes mentioned in the FAQ such as swapping 'ps_set_search' -> 'ps_activate_search' and swapping 'ps_set_keyphrase' -> 'ps_add_keyphrase' but both functions always seem to return < 0. I even tried using the ps_add_kws and passing in a path to a keyphrases.list file that contains the keyphrases needed to be detected but both methods seem to fail. Is there any more info or examples that can be offered on how to use the search API as the documentation around it is very minimal with no examples. Thanks!

Activity

  1. roccopersico99 commented on Oct 17, 2022

    @roccopersico99
    Author

    Here is the mentioned keyphrases.list file and the dictionary im using (both changed to .txt so they could be uploaded here)
    keyphrases.txt
    cmudict-en-us.txt

  2. roccopersico99 commented on Oct 17, 2022

    @roccopersico99
    Author

    I think the issue more boils down to needing an example of using the Keyword mode in general, as live.c and simple.c do not use this mode.

  3. dhdaines commented on Oct 19, 2022

    @dhdaines
    Contributor

    Hi! Yes, I think there is lacking documentation there indeed. There is something of an example in the unit tests (both in C and Python) but it needs to be brought into the actual documentation:

    https://github.com/cmusphinx/pocketsphinx/blob/master/test/unit/test_keyphrase.c
    https://github.com/cmusphinx/pocketsphinx/blob/master/cython/test/kws_test.py

    This also doesn't really describe the API for doing it other than from a file.

  4. locked and limited conversation to collaborators on Jul 20, 2023
  5. converted this issue into a discussion #360 on Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions