# Developpers informations.
# 2020 Bruno ANSELME <be.root@free.fr>
######################################

NoComprendo use Pocketsphinx Version 5prealpha from Carnegie Mellon University.
https://cmusphinx.github.io/wiki/download/

When I started coding this application, this library was not available in each major Linux distributions.
Libraries libsphinxbase.a et libpocketsphinx.a are statically linked in the application.

The file psphinx-make-targets.pri contains qmake directives for the Makefile to build the librairies and copy acoustics models.

NoComprendo's archive (tar.gz) contains packages for building Sphinx, PocketSphinx,
  acoutics models for english and french, dictionaries for english and french.

To build application, proceed this way :
$ qmake
$ make            # Build static libs, application, unpack acoustics models.
$ qmake           # VERY IMPORTANT, update 'install' target in the Makefile with the unpacked acoustics models.

The Makefile compile the two libraries (printing some warnings), unpack the acoustics models, and compile the application.
Don't use parallels jobs (ex: make -j4) because the libraries must be compiled first and sequentially.

Installation, login as root :
$ make install

Application directories :
  Dictionaries                : /usr/share/nocomprendo.
  Acoustics models            : /usr/share/nocomprendo/pocketsphinx.
  User parameters             : /home/{user}/.config/BeRoot/NoComprendo.conf
  Vocabulary, "Language model"
       and user commands sets : /home/{user}/.config/nocomprendo/

For a NoComprendo full reset, delete the above file and directory.
--------------------
At the moment NoComprendo needs X.org and xdotools to interact with the environment.
The interface with libxdo is located in the guicontrol.cpp file.
If adaptation to Wayland is possible one day, it should be sufficient to modify this file.
The interface with espeak is located in the speak.cpp file.
