diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-04 17:10:41 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-04 17:21:03 +0100 |
| commit | 9cf33f640618e9490b29b9297157a613033bff02 (patch) | |
| tree | 2b46776f7cdc9228c1fc1a119bd3a74a1cd93b98 | |
| parent | 87bdc5e4b5a788547764e1c222008a6c7c54232a (diff) | |
| download | jasper-client-9cf33f640618e9490b29b9297157a613033bff02.tar.gz jasper-client-9cf33f640618e9490b29b9297157a613033bff02.zip | |
No more prints in STT engines, log them with info instead
| -rw-r--r-- | client/stt.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/client/stt.py b/client/stt.py index 9eb07e7..86cc83b 100644 --- a/client/stt.py +++ b/client/stt.py @@ -139,11 +139,7 @@ class PocketSphinxSTT(AbstractSTTEngine): f.truncate() transcribed = [result[0]] - - print("===================") - print("JASPER: %r" % transcribed) - print("===================") - + self._logger.info('Transcribed: %r', transcribed) return transcribed @classmethod @@ -398,11 +394,11 @@ class AttSTT(AbstractSTTEngine): exc_info=True) return [] else: - results = [x[0].upper() for x in sorted(results, - key=lambda x: x[1], - reverse=True)] - self._logger.info('Recognized: %r', results) - return results + transcribed = [x[0].upper() for x in sorted(results, + key=lambda x: x[1], + reverse=True)] + self._logger.info('Transcribed: %r', transcribed) + return transcribed def _get_response(self, data): headers = {'authorization': 'Bearer %s' % self.token, |
