Skip to content

Google speech support - #6884

Closed
OreOreDa wants to merge 3 commits into
spring-projects:mainfrom
OreOreDa:GH-6879
Closed

OreOreDa wants to merge 3 commits into
spring-projects:mainfrom
OreOreDa:GH-6879

Conversation

@OreOreDa

Copy link
Copy Markdown

Closes GH-6879

Signed-off-by: Olivier Le Quellec olivier.le-quellec@live.fr

Thanks !

@ilayaperumalg

Copy link
Copy Markdown
Member

@ddobrin Could you review the changes? Thanks!

@OreOreDa

OreOreDa commented Oct 6, 2026

Copy link
Copy Markdown
Author

@ddobrin tested on my project with gemini-2.5-flash-tts and gemini-2.5-pro-tts, with different voices and turns
thanks !

@ilayaperumalg ilayaperumalg self-assigned this Oct 7, 2026
@ilayaperumalg ilayaperumalg added this to the 2.1.0-RC1 milestone Oct 7, 2026
@ilayaperumalg

Copy link
Copy Markdown
Member

@OreOreDa Thanks for the PR! Could you rebase and squash all the changes into a single commit?

Signed-off-by: olivier.le-quellec <olivier.le-quellec@renault.com>
@OreOreDa

OreOreDa commented Oct 9, 2026

Copy link
Copy Markdown
Author

@OreOreDa Thanks for the PR! Could you rebase and squash all the changes into a single commit?

Done

: toWav(pcmAudio);

final TextToSpeechResponseMetadata metadata = new TextToSpeechResponseMetadata();
metadata.setUsage(new DefaultUsage(text.length(), audioContent.length));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This needs to be changed to use usage metadata.

@ConfigurationProperties(GoogleGenAiTextToSpeechConnectionProperties.CONFIG_PREFIX)
public class GoogleGenAiTextToSpeechConnectionProperties {

public static final String CONFIG_PREFIX = "spring.ai.google.genai.tts";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For consistency, we need to use spring.ai.google.genai as the prefix.

@ilayaperumalg ilayaperumalg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@OreOreDa Thanks for the PR! Will address the review comments when merging.

@ilayaperumalg

Copy link
Copy Markdown
Member

Rebased and merged via a49699c along with some polishing via f881706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Text to Speech Gemini models

3 participants