Remove unnecessary _model ivar from Hathora TTS and STT services, using _settings.model instead.
This commit is contained in:
@@ -101,8 +101,6 @@ class HathoraSTTService(SegmentedSTTService):
|
|||||||
),
|
),
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._model = model
|
|
||||||
self._api_key = api_key or os.getenv("HATHORA_API_KEY")
|
self._api_key = api_key or os.getenv("HATHORA_API_KEY")
|
||||||
self._base_url = base_url
|
self._base_url = base_url
|
||||||
|
|
||||||
@@ -136,7 +134,7 @@ class HathoraSTTService(SegmentedSTTService):
|
|||||||
url = f"{self._base_url}"
|
url = f"{self._base_url}"
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
"model": self._model,
|
"model": self._settings.model,
|
||||||
}
|
}
|
||||||
|
|
||||||
if self._settings.language is not None:
|
if self._settings.language is not None:
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ class HathoraTTSService(TTSService):
|
|||||||
),
|
),
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
self._model = model
|
|
||||||
self._api_key = api_key or os.getenv("HATHORA_API_KEY")
|
self._api_key = api_key or os.getenv("HATHORA_API_KEY")
|
||||||
self._base_url = base_url
|
self._base_url = base_url
|
||||||
|
|
||||||
@@ -149,7 +148,7 @@ class HathoraTTSService(TTSService):
|
|||||||
|
|
||||||
url = f"{self._base_url}"
|
url = f"{self._base_url}"
|
||||||
|
|
||||||
payload = {"model": self._model, "text": text}
|
payload = {"model": self._settings.model, "text": text}
|
||||||
|
|
||||||
if self._settings.voice is not None:
|
if self._settings.voice is not None:
|
||||||
payload["voice"] = self._settings.voice
|
payload["voice"] = self._settings.voice
|
||||||
|
|||||||
Reference in New Issue
Block a user