Skip to content

Feat: add support for multi speakers in AI logic voice config#1476

Merged
AustinBenoit merged 6 commits into
mainfrom
speechConfig
Jun 15, 2026
Merged

Feat: add support for multi speakers in AI logic voice config#1476
AustinBenoit merged 6 commits into
mainfrom
speechConfig

Conversation

@AustinBenoit

Copy link
Copy Markdown
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.

Firebase AI: Add support for advanced speech configurations, enabling multi-speaker setup and language code preferences in text-to-speech generation.


Testing

Describe how you've tested these changes.

Tested manually in play mode in unity.
Test with gemini and Vertex back ends for models
gemini-2.5-pro-preview-tts
gemini-2.5-flash-preview-tts
gemini-3.1-flash-tts-preview

Added a test for the serialization of the config data.

image

Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

@AustinBenoit AustinBenoit requested a review from a-maurice June 11, 2026 14:10

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for advanced speech configurations in Firebase AI, including multi-speaker setups and language code preferences in text-to-speech generation. It adds the necessary fields, structs, and serialization logic to GenerationConfig and LiveGenerationConfig, along with corresponding automated tests. The feedback suggests adding validation to prevent invalid serialization of default structs and ensuring that speaker and voice parameters are not null or empty to avoid bad API requests.

Comment thread firebaseai/src/LiveGenerationConfig.cs Outdated
Comment thread firebaseai/src/LiveGenerationConfig.cs
Comment thread firebaseai/src/LiveGenerationConfig.cs
Comment thread firebaseai/src/LiveGenerationConfig.cs

@milaGGL milaGGL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AustinBenoit AustinBenoit merged commit b8b814c into main Jun 15, 2026
4 checks passed
@AustinBenoit AustinBenoit deleted the speechConfig branch June 17, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants