Peter Michael Gits Claude commited on
Commit ·
f2e8ec0
1
Parent(s): 7d32abe
fix: Improve MCP fallback logic for STT service connection
Browse files- Fix HTTP fallback to properly return valid transcription results
- Remove immediate error return when ImportError occurs in MCP client
- Ensure WebSocket/HTTP STT services work when MCP is unavailable
- Addresses "ERROR: MCP STT service failed - no demo mode" issue
- Enables proper unmute.sh methodology with external STT services
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
core/mcp_audio_handler.py
CHANGED
|
@@ -369,7 +369,9 @@ class MCPAudioHandler:
|
|
| 369 |
|
| 370 |
# Try HTTP fallback
|
| 371 |
if hasattr(self, 'stt_http_url') and self.stt_http_url:
|
| 372 |
-
|
|
|
|
|
|
|
| 373 |
|
| 374 |
# Return error - no simulation
|
| 375 |
return "ERROR: No STT services available"
|
|
|
|
| 369 |
|
| 370 |
# Try HTTP fallback
|
| 371 |
if hasattr(self, 'stt_http_url') and self.stt_http_url:
|
| 372 |
+
result = await self._call_http_stt_service(audio_file_path)
|
| 373 |
+
if result and not result.startswith("Error"):
|
| 374 |
+
return result
|
| 375 |
|
| 376 |
# Return error - no simulation
|
| 377 |
return "ERROR: No STT services available"
|