Update AIService.set_model_name to AIService._sync_model_name_to_metrics to:
- indicate clearly that it's not meant for public use - make it clear the `self._settings` is the single source of truth for model information - set the stage for an upcoming change where `AIService` subclasses won't have to ever worry about explicitly calling an `AIService` method to sync model name to metrics Across all services, switch from accessing `self._model_name` or `self.model_name` in favor of `self._settings.model`.
This commit is contained in:
@@ -122,13 +122,13 @@ class LmntTTSService(InterruptibleTTSService):
|
||||
)
|
||||
|
||||
self._api_key = api_key
|
||||
self.set_model_name(model)
|
||||
self._settings = LmntTTSSettings(
|
||||
model=model,
|
||||
voice=voice_id,
|
||||
language=self.language_to_service_language(language),
|
||||
format="raw",
|
||||
)
|
||||
self._sync_model_name_to_metrics()
|
||||
self._receive_task = None
|
||||
self._context_id: Optional[str] = None
|
||||
|
||||
@@ -238,7 +238,7 @@ class LmntTTSService(InterruptibleTTSService):
|
||||
"format": self._settings.format,
|
||||
"sample_rate": self.sample_rate,
|
||||
"language": self._settings.language,
|
||||
"model": self.model_name,
|
||||
"model": self._settings.model,
|
||||
}
|
||||
|
||||
# Connect to LMNT's websocket directly
|
||||
|
||||
Reference in New Issue
Block a user