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:
@@ -110,13 +110,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
await asyncio.sleep(10)
|
||||
logger.info("Updating Speechmatics STT settings: language=es")
|
||||
await task.queue_frame(
|
||||
STTUpdateSettingsFrame(update=SpeechmaticsSTTSettings(language=Language.ES))
|
||||
STTUpdateSettingsFrame(delta=SpeechmaticsSTTSettings(language=Language.ES))
|
||||
)
|
||||
|
||||
await asyncio.sleep(10)
|
||||
logger.info("Updating Speechmatics STT settings: focus_speakers=['S1']")
|
||||
await task.queue_frame(
|
||||
STTUpdateSettingsFrame(update=SpeechmaticsSTTSettings(focus_speakers=["S1"]))
|
||||
STTUpdateSettingsFrame(delta=SpeechmaticsSTTSettings(focus_speakers=["S1"]))
|
||||
)
|
||||
|
||||
await asyncio.sleep(10)
|
||||
@@ -125,7 +125,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
)
|
||||
await task.queue_frame(
|
||||
STTUpdateSettingsFrame(
|
||||
update=SpeechmaticsSTTSettings(
|
||||
delta=SpeechmaticsSTTSettings(
|
||||
speaker_active_format="<SPEAKER_{speaker_id}>{text}</SPEAKER_{speaker_id}>"
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user