Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
JarbasAl and coderabbitai[bot] authored Jan 16, 2025
1 parent 88ca19d commit 67cb740
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ovos_dinkum_listener/voice_loop/voice_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,15 +713,17 @@ def _get_tx(self, stt_context: dict) -> (str, dict):
# get text and trigger callback
try:
utts = self.stt.transcribe(lang=lang) or []
except:
except Exception as e:
LOG.exception(f"Primary STT transcription failed: {str(e)}")
LOG.exception("STT failed")
utts = []

if not utts and self.fallback_stt is not None:
LOG.info("Attempting fallback STT plugin")
try:
utts = self.fallback_stt.transcribe(lang=lang) or []
except:
except Exception as e:
LOG.exception(f"Fallback STT transcription failed: {str(e)}")
LOG.exception("Fallback STT failed")

if not utts:
Expand Down

0 comments on commit 67cb740

Please sign in to comment.