Well, it turns out that people were using
pocketsphinx_continuous,
at least sort of. As I expected, they weren’t really using the actual
pocketsphinx_continuous binary for anything useful other than
recognizing from files. But, well, the code did claim to be example
code, and so obviously people were using it … as example code.
…which is a perfectly sensible thing to do, and unfortunately in removing the audio support from PocketSphinx, it became considerably less useful as an example of how to do recognition from a microphone, particularly if the solution of running SoX in a subprocess isn’t an appealing one (as on Windows, for instance).
The sensible solution to this is to bring back something like
pocketsphinx_continuous but explicitly in the form of example code.
Adding cross-platform audio support to the library is absolutely
something I will not do, but there are some other options,
PortAudio foremost among them. So, here is
an example of using PortAudio
That said, wrangling external dependencies on Windows is very annoying. To use the above example may require a certain amount of path and environment wrangling to get CMake/VSCode/Visual Studio to find PortAudio. For this reason there is also now an example of using the Win32 Waveform Audio API directly
Note that in both cases you may have quite bad results when running a “Debug” build, because Windows is very slow, and Visual C++ outputs extremely slow code when debugging is enabled.
These examples are included in the upcoming 5.0.1 release in the
examples directory.
There is also an updated release of SphinxTrain, and the acoustic modeling tutorial has been updated to reflect the new and simplified usage. Still working on the other tutorials, sorry.
To quote the release notes, this release fixes a few long-standing bugs in SphinxTrain and makes the package (hopefully) easier to use. Among other things:
sphinx3_align is included)-remove_silence option has been disabled by default (unlike in PocketSphinx you can still turn it on if you really want to, it might save you a bit of time in training)You can download it from the release page
Or clone it (shallowly) with git:
git clone --depth 1 --branch v5.0.0 https://github.com/cmusphinx/sphinxtrain
Pull requests and bug reports and such are welcome via https://github.com/cmusphinx/sphinxbase.
It is finally here, PocketSphinx 5.0.0
Download source from GitHub or PyPI. Yes, these are not exactly the same file.
Install binaries for Python:
pip3 install pocketsphinx
Read the API documentation for C and for Python3
Pull requests and bug reports and such are welcome via https://github.com/cmusphinx/pocketsphinx.
Executive Summary: Please try this one, there won’t be another.
Yes, it’s that time of week again, time for another release candidate You can also download it from PyPI.
There are a lot of changes so I suggest you look at the release notes
at the link above. Python code should continue to work as before,
though you may get some deprecated warnings when you try to use the
inappropriately named set_{fsg,lm,kws} methods. Don’t use them,
they have the wrong names, use add_* instead. The names were
changed because they don’t set anything and you have to actually
activate the search module afterwards. Now you use
ps_activate_search() to do that, and not ps_set_search(), because
this, too, is a much better name.
That’s actually the least of it. The big news is that force-alignment and subword alignment are now quite doable, from the command-line, from the C API, and from Python. There are some tests and examples for you to look at.
The last known portability issue (which was actually, like, a bug) is fixed and you won’t get unpredictable and bad results on MIPS systems. There are surely others, though. Ideally our CI testing would run things on various emulators, but it’s slow and unwieldy to do that.
The JSGF compiler is back to producing unreasonable numbers of epsilon transitions (“null” transitions for the less FST-aware), but it produces correct output now.
Pull requests and bug reports and such are welcome via https://github.com/cmusphinx/pocketsphinx.