Spaces:
Runtime error
Runtime error
Commit
·
c626b26
1
Parent(s):
1283e10
Fix all hardcoded Kyutai model identifiers across codebase
Browse files- Update speech_processor.py default model from kyutai/stt-2.6b-en_fr-trfs to kyutai/stt-2.6b-en-trfs
- Update communication.py fallback model identifiers
- Update performance_optimizer.py speech model default
- Ensures consistent use of correct Kyutai model identifier throughout application
- Fixes speech model loading errors in HuggingFace Spaces deployment
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
digipal/ai/communication.py
CHANGED
@@ -55,7 +55,7 @@ class AICommunication:
|
|
55 |
self._model_loaded = False
|
56 |
|
57 |
# Initialize speech processor
|
58 |
-
speech_model_id = self.kyutai_config.get('model_id', 'kyutai/stt-2.6b-
|
59 |
speech_device = self.kyutai_config.get('device', None)
|
60 |
self.speech_processor = SpeechProcessor(speech_model_id, speech_device)
|
61 |
self._speech_model_loaded = False
|
@@ -294,7 +294,7 @@ class AICommunication:
|
|
294 |
return self.speech_processor.get_model_info()
|
295 |
else:
|
296 |
return {
|
297 |
-
'model_id': self.kyutai_config.get('model_id', 'kyutai/stt-2.6b-
|
298 |
'loaded': False
|
299 |
}
|
300 |
|
|
|
55 |
self._model_loaded = False
|
56 |
|
57 |
# Initialize speech processor
|
58 |
+
speech_model_id = self.kyutai_config.get('model_id', 'kyutai/stt-2.6b-en-trfs')
|
59 |
speech_device = self.kyutai_config.get('device', None)
|
60 |
self.speech_processor = SpeechProcessor(speech_model_id, speech_device)
|
61 |
self._speech_model_loaded = False
|
|
|
294 |
return self.speech_processor.get_model_info()
|
295 |
else:
|
296 |
return {
|
297 |
+
'model_id': self.kyutai_config.get('model_id', 'kyutai/stt-2.6b-en-trfs'),
|
298 |
'loaded': False
|
299 |
}
|
300 |
|
digipal/ai/speech_processor.py
CHANGED
@@ -259,7 +259,7 @@ class SpeechProcessor:
|
|
259 |
Main speech processing class using Kyutai speech-to-text models.
|
260 |
"""
|
261 |
|
262 |
-
def __init__(self, model_id: str = "kyutai/stt-2.6b-
|
263 |
"""
|
264 |
Initialize speech processor with Kyutai model.
|
265 |
|
|
|
259 |
Main speech processing class using Kyutai speech-to-text models.
|
260 |
"""
|
261 |
|
262 |
+
def __init__(self, model_id: str = "kyutai/stt-2.6b-en-trfs", device: Optional[str] = None):
|
263 |
"""
|
264 |
Initialize speech processor with Kyutai model.
|
265 |
|
digipal/core/performance_optimizer.py
CHANGED
@@ -121,7 +121,7 @@ class LazyModelLoader:
|
|
121 |
# Direct loading without caching
|
122 |
return self._load_language_model(model_name)
|
123 |
|
124 |
-
def get_speech_model(self, model_name: str = "kyutai/stt-2.6b-
|
125 |
"""
|
126 |
Get speech model with lazy loading.
|
127 |
|
|
|
121 |
# Direct loading without caching
|
122 |
return self._load_language_model(model_name)
|
123 |
|
124 |
+
def get_speech_model(self, model_name: str = "kyutai/stt-2.6b-en-trfs") -> Tuple[Any, Any]:
|
125 |
"""
|
126 |
Get speech model with lazy loading.
|
127 |
|