Looks like the Deepgram Sagemaker TTS services aren't able yet to successfully disconnect/reconnect to apply runtime settings updates. For now, marking them as not yet supporting runtime settings updates.
This commit is contained in:
@@ -204,8 +204,13 @@ class DeepgramSageMakerSTTService(STTService):
|
|||||||
elif "live_options" in changed and self._settings.live_options.language is not None:
|
elif "live_options" in changed and self._settings.live_options.language is not None:
|
||||||
self._settings.language = self._settings.live_options.language
|
self._settings.language = self._settings.live_options.language
|
||||||
|
|
||||||
await self._disconnect()
|
# TODO: someday we could reconnect here to apply updated settings.
|
||||||
await self._connect()
|
# Code might look something like the below:
|
||||||
|
# await self._disconnect()
|
||||||
|
# await self._connect()
|
||||||
|
|
||||||
|
self._warn_unhandled_updated_settings(changed)
|
||||||
|
|
||||||
return changed
|
return changed
|
||||||
|
|
||||||
async def start(self, frame: StartFrame):
|
async def start(self, frame: StartFrame):
|
||||||
|
|||||||
@@ -228,14 +228,20 @@ class DeepgramSageMakerTTSService(TTSService):
|
|||||||
"""
|
"""
|
||||||
changed = await super()._update_settings(update)
|
changed = await super()._update_settings(update)
|
||||||
|
|
||||||
|
if not changed:
|
||||||
|
return changed
|
||||||
|
|
||||||
# Deepgram uses voice as the model, so keep them in sync for metrics
|
# Deepgram uses voice as the model, so keep them in sync for metrics
|
||||||
if "voice" in changed:
|
if "voice" in changed:
|
||||||
self._settings.model = self._settings.voice
|
self._settings.model = self._settings.voice
|
||||||
self._sync_model_name_to_metrics()
|
self._sync_model_name_to_metrics()
|
||||||
|
|
||||||
if changed:
|
# TODO: someday we could reconnect here to apply updated settings.
|
||||||
await self._disconnect()
|
# Code might look something like the below:
|
||||||
await self._connect()
|
# await self._disconnect()
|
||||||
|
# await self._connect()
|
||||||
|
|
||||||
|
self._warn_unhandled_updated_settings(changed)
|
||||||
|
|
||||||
return changed
|
return changed
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user