diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-01 19:10:45 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-06 18:18:06 +0200 |
| commit | 304420fe97fe0d377e7afcb525fffecc619f7c02 (patch) | |
| tree | 341acdfbc6dc6a9b911255d850554cad752bb936 /client/stt.py | |
| parent | 7dc4f3022d1843063dce621ca09c80bb64cdb8c1 (diff) | |
| download | jasper-client-304420fe97fe0d377e7afcb525fffecc619f7c02.tar.gz jasper-client-304420fe97fe0d377e7afcb525fffecc619f7c02.zip | |
Use diagnose module in stt.py and tts.py
Diffstat (limited to 'client/stt.py')
| -rw-r--r-- | client/stt.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/stt.py b/client/stt.py index cfaced6..485f5d9 100644 --- a/client/stt.py +++ b/client/stt.py @@ -5,12 +5,12 @@ import traceback import wave import json import tempfile -import pkgutil import logging from abc import ABCMeta, abstractmethod import requests import yaml import jasperpath +import diagnose """ The default Speech-to-Text implementation which relies on PocketSphinx. @@ -171,7 +171,7 @@ class PocketSphinxSTT(AbstractSTTEngine): @classmethod def is_available(cls): - return (pkgutil.get_loader('pocketsphinx') is not None) + return diagnose.check_python_import('pocketsphinx') """ Speech-To-Text implementation which relies on the Google Speech API. @@ -274,7 +274,7 @@ class GoogleSTT(AbstractSTTEngine): @classmethod def is_available(cls): - return True + return diagnose.check_network_connection() """ Returns a Speech-To-Text engine. |
