From 9cf33f640618e9490b29b9297157a613033bff02 Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 4 Dec 2014 17:10:41 +0100 Subject: No more prints in STT engines, log them with info instead --- client/stt.py | 16 ++++++---------- 1 file 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, -- cgit v1.3.1