Feat: add support for multi speakers in AI logic voice config#1476
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
5b89d80 to
46fc433
Compare
milaGGL
reviewed
Jun 11, 2026
a-maurice
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Firebase AI: Add support for advanced speech configurations, enabling multi-speaker setup and language code preferences in text-to-speech generation.
Testing
Tested manually in play mode in unity.
Test with gemini and Vertex back ends for models
gemini-2.5-pro-preview-ttsgemini-2.5-flash-preview-ttsgemini-3.1-flash-tts-previewAdded a test for the serialization of the config data.
Type of Change
Place an
xthe applicable box: