I am writing an interactive program in which it takes speech input from the user for a specific list of commands.
The list of commands will be stored locally in a graph and based on the usage their weight will be modified.
The speech input is taken and processed into text and then it's executed by bash scripts.
I am thinking what I should use to interact (synchronize) between the speech recognition engine and then the list and the bash program.
I am using C++ and Bash on a Unix system.
I thought of
mutex but the problem is what if the user gives multiple inputs then I'll have to buffer it and then process it sequentially and that will make the system slower.
The bash script is used to call the system utility commands as requested by the user. Should I only use C++ or Bash too?
I am thinking of storing the graph in a binary format. Is this the best way to store the graph?
Please suggest alternatives.