Peter Michael Gits Claude commited on
Commit
b7f09ec
Β·
1 Parent(s): eb099f7

fix: Configure STT/TTS service URLs and improve audio client logging v0.3.23

Browse files

- Update STT service URL from placeholder to pgits/stt-gpu-service
- Update TTS service URL from placeholder to pgits/tts-gpu-service
- Add detailed logging for audio client initialization debugging
- This should resolve the "Could not fetch config" errors

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (3) hide show
  1. core/audio_handler.py +9 -3
  2. core/config.py +2 -2
  3. version.py +1 -1
core/audio_handler.py CHANGED
@@ -31,20 +31,26 @@ class AudioHandler:
31
  try:
32
  # Initialize STT client
33
  if config.stt_service_url and "YOUR_USERNAME" not in config.stt_service_url:
 
34
  self.stt_client = Client(config.stt_service_url)
35
- logger.info(f"🎀 Connected to STT service: {config.stt_service_url}")
 
 
36
 
37
  # Initialize TTS client
38
  if config.tts_service_url and "YOUR_USERNAME" not in config.tts_service_url:
 
39
  self.tts_client = Client(config.tts_service_url)
40
- logger.info(f"πŸ”Š Connected to TTS service: {config.tts_service_url}")
 
 
41
 
42
  # Check if we're still in demo mode
43
  if self.stt_client and self.tts_client:
44
  self.demo_mode = False
45
  logger.info("🎡 Audio services fully initialized")
46
  else:
47
- logger.warning("🎡 Running in audio demo mode - no actual STT/TTS processing")
48
 
49
  except Exception as e:
50
  logger.error(f"Failed to initialize audio clients: {e}")
 
31
  try:
32
  # Initialize STT client
33
  if config.stt_service_url and "YOUR_USERNAME" not in config.stt_service_url:
34
+ logger.info(f"🎀 Attempting to connect to STT service: {config.stt_service_url}")
35
  self.stt_client = Client(config.stt_service_url)
36
+ logger.info(f"🎀 Successfully connected to STT service")
37
+ else:
38
+ logger.warning(f"🎀 STT service URL not configured properly: {config.stt_service_url}")
39
 
40
  # Initialize TTS client
41
  if config.tts_service_url and "YOUR_USERNAME" not in config.tts_service_url:
42
+ logger.info(f"πŸ”Š Attempting to connect to TTS service: {config.tts_service_url}")
43
  self.tts_client = Client(config.tts_service_url)
44
+ logger.info(f"πŸ”Š Successfully connected to TTS service")
45
+ else:
46
+ logger.warning(f"πŸ”Š TTS service URL not configured properly: {config.tts_service_url}")
47
 
48
  # Check if we're still in demo mode
49
  if self.stt_client and self.tts_client:
50
  self.demo_mode = False
51
  logger.info("🎡 Audio services fully initialized")
52
  else:
53
+ logger.warning("🎡 Running in audio demo mode - some services unavailable")
54
 
55
  except Exception as e:
56
  logger.error(f"Failed to initialize audio clients: {e}")
core/config.py CHANGED
@@ -58,11 +58,11 @@ class Config(BaseSettings):
58
 
59
  # Audio Services Configuration (Hugging Face spaces)
60
  stt_service_url: str = Field(
61
- default="https://huggingface.co/spaces/YOUR_USERNAME/stt-gpu-service",
62
  env="STT_SERVICE_URL"
63
  )
64
  tts_service_url: str = Field(
65
- default="https://huggingface.co/spaces/YOUR_USERNAME/tts-gpu-service",
66
  env="TTS_SERVICE_URL"
67
  )
68
 
 
58
 
59
  # Audio Services Configuration (Hugging Face spaces)
60
  stt_service_url: str = Field(
61
+ default="https://huggingface.co/spaces/pgits/stt-gpu-service",
62
  env="STT_SERVICE_URL"
63
  )
64
  tts_service_url: str = Field(
65
+ default="https://huggingface.co/spaces/pgits/tts-gpu-service",
66
  env="TTS_SERVICE_URL"
67
  )
68
 
version.py CHANGED
@@ -2,7 +2,7 @@
2
  Version information for ChatCal Voice-Enabled AI Assistant
3
  """
4
 
5
- __version__ = "0.3.22"
6
  __build_date__ = "2025-08-19T15:27:00"
7
  __description__ = "Voice-Enabled ChatCal AI Assistant with Hugging Face deployment"
8
 
 
2
  Version information for ChatCal Voice-Enabled AI Assistant
3
  """
4
 
5
+ __version__ = "0.3.23"
6
  __build_date__ = "2025-08-19T15:27:00"
7
  __description__ = "Voice-Enabled ChatCal AI Assistant with Hugging Face deployment"
8