Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with pocketsphinx 5 #109

Open
sthibaul opened this issue Aug 13, 2023 · 0 comments
Open

Fails to build with pocketsphinx 5 #109

sthibaul opened this issue Aug 13, 2023 · 0 comments

Comments

@sthibaul
Copy link

Installation and version

How did you install Parlatype?

  • From git? If yes, please paste the output of git log -1 --pretty=oneline

15bbf78 (HEAD -> main, origin/main, origin/HEAD) Translated using Weblate (Basque)
16:55@begin /var/tmp/parlatype (git)-[main] €

Issue

  • What is not working as expected?

After having installed pocketsphinx version 5.0.2 (from https://github.com/cmusphinx/pocketsphinx/), parlatype fails to build:

../libparlatype/src/gst/gstparlasphinx.h:68:5: error: unknown type name ‘cmd_ln_t’
   68 |     cmd_ln_t *config;
      |     ^~~~~~~~

This is apparently an intentional API break of pocketsphinx: from pocketsphinx.h:

 * @section faq_sec Frequently Asked Questions
 *
 * @subsection faq_api My code no longer compiles! Why?
 *
 * Some APIs were intentionally broken by the 5.0.0 release.  The most
 * likely culprit here is the configuration API, where the old
 * "options" which started with a `-` are now "parameters" which do
 * not, and instead of a `cmd_ln_t` it is now a `ps_config_t`.  There
 * is no backward compatibility, you have to change your code
 * manually.  This is straightforward for the most part.  For example,
 * instead of writing:
 *
 *     cmdln = cmd_ln_init(NULL, "-samprate", "16000", NULL);
 *     cmd_ln_set_int32_r(NULL, "-maxwpf", 40);
 *
 * You should write:
 *
 *     config = ps_config_init(NULL);
 *     ps_config_set_int(config, "samprate", 16000);
 *     ps_config_set_int(config, "maxwpf", 40);

So this needs to be done in parlatype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant