speech config updates#8100
Conversation
…support - Add , , and types. - Update to include . - Add tests for new configuration in .
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
|
The public api surface has changed for the subproject ai-logic_firebase-ai: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
|
/gemini review |
|
Hi @milaGGL, thanks for reaching out. I have reviewed the pull request and have a few observations regarding the API changes and testing. API ChangesIt looks like you've introduced Code Review Observations
Suggestions
Overall, the implementation looks solid and well-tested. Once the |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for SpeechConfig within GenerationConfig, allowing users to specify voice and language settings for model responses, and adds MultiSpeakerVoiceConfig and SpeakerVoiceConfig to support multi-speaker configurations. Additionally, the TemplateImagenModel is deprecated, test utilities in AIModels.kt are refactored for better initialization, and extensive tests are added to verify the new speech features. The reviewer suggested converting the Voice class to a data class to improve consistency and leverage auto-generated methods.
| public class Voice public constructor(public val voiceName: String) { | ||
|
|
||
| @Serializable internal data class Internal(@SerialName("voice_name") val voiceName: String) | ||
|
|
||
| internal fun toInternal(): Internal { | ||
| return Internal(this.voiceName) | ||
| internal fun toInternal(): PrebuiltVoiceInternal { | ||
| return PrebuiltVoiceInternal(this.voiceName) | ||
| } | ||
| } |
There was a problem hiding this comment.
For consistency with other model classes like SpeakerVoiceConfig and to benefit from auto-generated equals, hashCode, and toString methods, consider converting Voice to a data class.
public data class Voice(val voiceName: String) {
internal fun toInternal(): PrebuiltVoiceInternal {
return PrebuiltVoiceInternal(voiceName)
}
}
No description provided.