Make clearer the distinction between "storage-mode" and "delta-mode" usage of *Settings objects

- Storage mode: for use in `self._settings`. All fields should be specified, i.e. should not be `NOT_GIVEN`.
- Delta mode: for use in `*UpdateSettingsFrame`.

In service of this, this commit:
- Adds a runtime check that all fields are specified in storage mode
- Updates all services to specify all fields in stored settings
- Updates all services to no longer check for `is_given` in stored settings (not necessary anymore)
- Updates relevant docstrings
- Renames `update` to `delta` in `*UpdateSettingsFrame`
- Updates community integrations guide
This commit is contained in:
Paul Kompfner
2026-02-24 10:52:05 -05:00
parent 57d25c564c
commit bcc2b4def4
145 changed files with 732 additions and 587 deletions

View File

@@ -206,16 +206,16 @@ class LmntTTSService(InterruptibleTTSService):
await self._disconnect_websocket()
async def _update_settings(self, update: TTSSettings) -> dict[str, Any]:
"""Apply a settings update.
async def _update_settings(self, delta: TTSSettings) -> dict[str, Any]:
"""Apply a settings delta.
Args:
update: A :class:`TTSSettings` (or ``LmntTTSSettings``) delta.
delta: A :class:`TTSSettings` (or ``LmntTTSSettings``) delta.
Returns:
Dict mapping changed field names to their previous values.
"""
changed = await super()._update_settings(update)
changed = await super()._update_settings(delta)
if changed:
await self._disconnect()