Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make STT warnings less dramatic #519

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def _process_audio(self) -> None:
# Get audio chunk and status from queue
chunk, status = self._audio_queue.get(timeout=0.1)
if status:
logging.warning(f"Processing audio error: {status}")
logging.log(23, f"STT WARNING: Processing audio error: {status}")
continue

with self._lock:
Expand Down Expand Up @@ -378,7 +378,7 @@ def _process_audio(self) -> None:
logging.debug('Queue is empty')
continue
except Exception as e:
logging.warning(f'Error processing mic input: {str(e)}')
logging.log(23, f'STT WAARNING: Error processing mic input: {str(e)}')
self._reset_state()
time.sleep(0.1)

Expand All @@ -398,7 +398,7 @@ def _create_input_callback(self, q: queue.Queue):
"""Create callback for audio input stream."""
def input_callback(indata, frames, time, status):
if status:
logging.warning(f"Audio input error: {status}")
logging.log(23, f"STT WARNING: Audio input error: {status}")
# Store both data and status in queue
q.put((indata.copy().flatten(), status))
return input_callback
Expand Down