ciyidogan commited on
Commit
e78a451
Β·
verified Β·
1 Parent(s): 87c557a

Update stt_google.py

Browse files
Files changed (1) hide show
  1. stt_google.py +9 -1
stt_google.py CHANGED
@@ -131,7 +131,15 @@ class GoogleCloudSTT(STTInterface):
131
  log_debug(f"πŸ“ STT result: {result.alternatives[0].transcript}, final: {result.is_final}")
132
 
133
  except Exception as e:
134
- log_error(f"❌ Google STT stream error", error=str(e))
 
 
 
 
 
 
 
 
135
  finally:
136
  log_info("🎀 Google STT stream thread ended")
137
 
 
131
  log_debug(f"πŸ“ STT result: {result.alternatives[0].transcript}, final: {result.is_final}")
132
 
133
  except Exception as e:
134
+ error_msg = str(e)
135
+ log_error(f"❌ Google STT stream error", error=error_msg)
136
+
137
+ # Send error to responses queue
138
+ if "Bad language code" in error_msg:
139
+ log_error(f"❌ Invalid language code in STT config. Check locale settings.")
140
+ elif "invalid_argument" in error_msg:
141
+ log_error(f"❌ Invalid STT configuration. Check encoding and sample rate.")
142
+
143
  finally:
144
  log_info("🎀 Google STT stream thread ended")
145