Fix Inworld TTS settings updating

This commit is contained in:
Paul Kompfner
2026-02-18 15:19:57 -05:00
parent 0fa51811ea
commit b00d454842
2 changed files with 17 additions and 21 deletions

View File

@@ -184,25 +184,6 @@ class InworldHttpTTSService(WordTTSService):
"""
return True
async def _update_settings(self, update: TTSSettings) -> dict[str, Any]:
"""Apply a settings update.
Settings are stored but not applied to the active connection.
"""
changed = await super()._update_settings(update)
if not changed:
return changed
# TODO: someday we could reconnect here to apply updated settings.
# Code might look something like the below:
# await self._disconnect()
# await self._connect()
self._warn_unhandled_updated_settings(changed)
return changed
async def start(self, frame: StartFrame):
"""Start the Inworld TTS service.
@@ -756,6 +737,21 @@ class InworldTTSService(AudioContextWordTTSService):
await self._disconnect_websocket()
async def _update_settings(self, update: TTSSettings) -> dict[str, Any]:
"""Apply a settings update.
Settings are stored but not applied to the active connection.
"""
changed = await super()._update_settings(update)
if not changed:
return changed
await self._disconnect()
await self._connect()
return changed
async def _connect_websocket(self):
"""Connect to the Inworld WebSocket TTS service.