Skip to content

iter_list_speakers

iter_list_speakers(
    domain_id: DomainId,
    *,
    config_overrides: Optional[VoiceIDClientConfig] = None,
    max_results: Optional[MaxResultsForList] = None,
    next_token: Optional[NextToken] = None,
) -> Iterator[SpeakerSummary]
Source code in docs_src/capo_voice_id/_services/voice_id.py
def iter_list_speakers(
    self,
    domain_id: "capo_voice_id.types.domain_id.DomainId",
    *,
    config_overrides: Optional[VoiceIDClientConfig] = None,
    max_results: Optional[
        "capo_voice_id.types.max_results_for_list.MaxResultsForList"
    ] = None,
    next_token: Optional["capo_voice_id.types.next_token.NextToken"] = None,
) -> "Iterator[capo_voice_id.types.speaker_summary.SpeakerSummary]":
    _token = next_token
    while True:
        _response = self.list_speakers(
            domain_id,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("speaker_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break