FirebaseAILogic Framework Reference

MultiSpeakerVoiceConfig

public struct MultiSpeakerVoiceConfig : Sendable

[Public Preview] Configuration for a multi-speaker audio generation setup.

Warning

This API is a public preview and may be subject to change.

Enables the model to generate audio containing multiple distinct speakers, alternating voices dynamically based on the speaker specified in each turn's SpeechMetadata.

For more details, see the multi-speaker guide.

  • Creates a multi-speaker voice configuration.

    Declaration

    Swift

    public init(speakerVoiceConfigs: [SpeakerVoiceConfig])

    Parameters

    speakerVoiceConfigs

    A list of voice configurations for the participating speakers. Currently, the backend requires exactly two speaker voice configurations.