Skip to content

Commit

Permalink
witai-stt: small fix to check if result is empty
Browse files Browse the repository at this point in the history
Fixes a rare condition when Wit.ai returns a NoneType. Resolves jasperproject#327.
  • Loading branch information
Holzhaus committed Apr 29, 2015
1 parent b71f4e2 commit a692cbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,9 @@ def transcribe(self, fp):
exc_info=True)
return []
else:
transcribed = [text.upper()]
transcribed = []
if text:
transcribed.append(text.upper())
self._logger.info('Transcribed: %r', transcribed)
return transcribed

Expand Down

0 comments on commit a692cbb

Please sign in to comment.