Menu

Best algotiyhm to use of pocketsphinx for command-control system?

Help
rezaee
2016-11-26
2016-11-28
  • rezaee

    rezaee - 2016-11-26

    Hi
    Let's consider we have a system with 100 commands and we want the system doing something inorder to each command. so we want to assign some action to each command. but how can we do it? the first and simplest idea is using nested if-elseif statement:

    if (strcmp(hyp, "command1")==0)
    action 1;
    elseif (strcmp(hyp,"command2")==0)
    action 2;
    .
    .
    .
    

    But what if our commands are more than 1000 or 10,000? or our system is a dictation system? how can we assing some actions to some commands in fastest way?

     
    • Nickolay V. Shmyrev

      Big sequence of ifs is a good approach if your actions are irregular (some open application, others query web). If actions are more regular, you can use a hash table, you first look for an action in hash table, then execute command based on the key value.

      More advanced NLP is also possible, like in openephyra.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.