Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated the pocketsphinx installation Using APT and PyPI packages instead of building from source. Switched from cmuclmtk to KenLM. * Moved KenLM info Moved the KenLM directory info out of Pocketsphinx and into its own section since it is quite likely that KenLM will be needed for other STT engines. * Remove STT installers Remove openfst, mitlm, cmuclmtk, Phonetisaurus, sphinxbase, pocketsphinx, and the pocketsphinx python module because they are now installed via apt or pip repositories (at least on debian type systems) which is way faster. * Fixing unit tests The test_g2p tests were using a mock object to replace a call to subprocess with a custom object. Since I'm using the phonetisaurus package directly now, this was replacing the wrong object and causing errors. I replaced the results of the predict method from phonetisaurus instead. * Fix phonetisaurus install For some reason, sometimes the phonetisaurus python package can only be installed using the `pip install phonetisaurus` command for x86_64 platform users. If you are running on a Raspberry Pi, then sometimes you have to download the binary from GitHub. * Add python3-dev as apt requirement Python3-dev is not installed by default on Armbian * Reinit Pocketsphinx vocabularies I am working on a Libre ROC-RK3328-CC Renegade computer as my main development board for Naomi. I am suddenly getting this error after using "expect" (in the joke plugin): ERROR:naomi.mic:Passive transcription failed! Traceback (most recent call last): File "/home/naomi/Naomi/naomi/mic.py", line 318, in wait_for_keyword transcribed = [word.upper() for word in self.passive_stt_engine.transcribe(f)] File "/home/naomi/Naomi/plugins/stt/pocketsphinx-stt/sphinxplugin.py", line 417, in transcribe self._decoder.process_raw(data, False, True) File "_pocketsphinx.pyx", line 960, in _pocketsphinx.Decoder.process_raw IndexError: Out of bounds on buffer access (axis 0) I'm not sure what this error means. It always seems to affect the passive listening engine. Usually I use the pocketsphinx_kws plugin for passive listening, so this may have been happening for a while and I just didn't notice. Re-initializing the engine seems to work fine, so I'm just keeping an eye on it. The biggest problem with re-initializing is that with our current audio system, Naomi tends to stutter when the re-initialization happens. This is one reason for wanting to move to a multi-threaded approach and see if that helps. * Remove the fst file setting The fst file is now generated inside the pocketsphinx hmm dir from the cmudict.txt file. This means I can eliminate the fst_model setting in addition to the phonetisaurus_executable setting. This leaves only the hmm_dir setting. * Fix G2P word translations Fixed error in NaomiSTTTrainer.py when transcribing the last available record. Put words fed to g2pconverter.translate into a list. Otherwise, words get translated letter by letter which causes long words to match just about any noise. * Fix "Too many open files" error Recently, I am getting a "Too many open files" error. This appears to be because a file handle is opened to /dev/null so STDERR can be redirected to it before performing some operations in Pocketsphinx, but never getting closed. This gives the io.open method context so it will close automatically when it goes out of scope. Also fixed an issue reported by CodeQL where a user-provided path is being used to serve content. * 2nd attempt to control wavfile path CodeQL still didn't like my solution, I think because the path check is disconnected from the use. 2nd attempt.
- Loading branch information
1 parent
e2d3707
commit 7272c31
Showing
15 changed files
with
481 additions
and
794 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
BE | ||
BEING | ||
BUT | ||
DID | ||
FIRST | ||
HEY | ||
IN | ||
IS | ||
IT | ||
NOW | ||
OF | ||
ON | ||
NO | ||
OKAY | ||
OOPS | ||
PLEASE | ||
RIGHT | ||
SAY | ||
WHAT | ||
WHICH | ||
WITH | ||
WORK | ||
SO | ||
THANK | ||
WHOOPS | ||
YOU |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.