cmusphinx / pocketsphinx

A small speech recognizer
Other
3.93k stars 717 forks source link

Vade retro sphinxbase #295

Closed dhdaines closed 2 years ago

dhdaines commented 2 years ago

Big, huge, dramatic API change (as promised, vaguely). SphinxBase is no more, and the configuration API has changed quite a bit - options are no longer "command-line arguments" and thus are no longer prefixed with dashes when calling ps_config_* functions. This will break your code (unless it is in Python, in which case you should be okay).

This came from a desire to repatriate the configuration API into <pocketsphinx.h> and also make it a proper ABI instead of some random macros. It became obvious that there was no way to do this without pulling in a lot of headers that, to put it charitably, have seen better days. There was a huge mess of cross-inclusion and lots of functions and structures that really shouldn't exist, but certainly shouldn't be made public.

Some of the other SphinxBase APIs have also been repatriated, namely the LM and FSG. I have only exposed functions that don't depend on internal implementation details. The Python bindings have privileged access to internal stuff, but it should be possible to write reasonable $OTHER_LANGUAGE bindings using the public headers - one of the goals here is to make it easier to use FFI or, yes, that other thing that starts with S and ends with G.