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

Phonetisaurus Fix #411

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions plugins/stt/pocketsphinx-stt/sphinxplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
'pip', 'install', 'phonetisaurus'
]
completedprocess = run_command(cmd)
if completedprocess.returncode != 0:
if completedprocess.returncode == 0:
if importlib.util.find_spec("phonetisaurus"):
from . import sphinxvocab
from .g2p import PhonetisaurusG2P
else:
raise Exception("Phonetisaurus install failed")
else:
# check what architecture we are on
architecture = platform.machine()
phonetisaurus_url = ""
Expand Down Expand Up @@ -189,7 +195,7 @@ def settings(self):
if (not hmm_dir):
# Make a list of possible paths to check
hmm_dir_paths = [
paths.sub("pocketsphinx", "standard")
paths.sub("pocketsphinx", "standard", language)
]
# see if any of these paths exist
for path in hmm_dir_paths:
Expand Down
Loading