Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -161,18 +161,85 @@ message Voice {

// Used for advanced voice options.
message AdvancedVoiceOptions {
// Safety setting for a single harm category.
message SafetySetting {
// The harm category to apply the safety setting to.
HarmCategory category = 1;

// The harm block threshold for the safety setting.
HarmBlockThreshold threshold = 2;
}

// Safety settings for the request.
message SafetySettings {
// The safety settings for the request.
repeated SafetySetting settings = 1;
}

// Harm categories that will block the content.
enum HarmCategory {
// Default value. This value is unused.
HARM_CATEGORY_UNSPECIFIED = 0;

// Content that promotes violence or incites hatred against individuals or
// groups based on certain attributes.
HARM_CATEGORY_HATE_SPEECH = 1;

// Content that promotes, facilitates, or enables dangerous activities.
HARM_CATEGORY_DANGEROUS_CONTENT = 2;

// Abusive, threatening, or content intended to bully, torment, or ridicule.
HARM_CATEGORY_HARASSMENT = 3;

// Content that contains sexually explicit material.
HARM_CATEGORY_SEXUALLY_EXPLICIT = 4;
}

// Harm block thresholds for the safety settings.
enum HarmBlockThreshold {
// The harm block threshold is unspecified.
HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0;

// Block content with a low harm probability or higher.
BLOCK_LOW_AND_ABOVE = 1;

// Block content with a medium harm probability or higher.
BLOCK_MEDIUM_AND_ABOVE = 2;

// Block content with a high harm probability.
BLOCK_ONLY_HIGH = 3;

// Do not block any content, regardless of its harm probability.
BLOCK_NONE = 4;

// Turn off the safety filter entirely.
OFF = 5;
}

// Only for Journey voices. If false, the synthesis is context aware
// and has a higher latency.
optional bool low_latency_journey_synthesis = 1;

// Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
// supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
// Otherwise, will return result
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
// Optional. Input only. Deprecated, use safety_settings instead.
// If true, relaxes safety filters for Gemini TTS.
bool relax_safety_filters = 8 [
deprecated = true,
(google.api.field_behavior) = INPUT_ONLY,
(google.api.field_behavior) = OPTIONAL
];

// Optional. Input only. This applies to Gemini TTS only. If set, the category
// specified in the safety setting will be blocked if the harm probability is
// above the threshold. Otherwise, the safety filter will be disabled by
// default.
SafetySettings safety_settings = 9 [
(google.api.field_behavior) = INPUT_ONLY,
(google.api.field_behavior) = OPTIONAL
];

// Optional. If true, textnorm will be applied to text input. This feature is
// enabled by default. Only applies for Gemini TTS.
optional bool enable_textnorm = 2 [(google.api.field_behavior) = OPTIONAL];
}

// The top-level message sent by the client for the `SynthesizeSpeech` method.
Expand All @@ -186,8 +253,9 @@ message SynthesizeSpeechRequest {
// Required. The configuration of the synthesized audio.
AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED];

// Advanced voice options.
optional AdvancedVoiceOptions advanced_voice_options = 8;
// Optional. Advanced voice options.
optional AdvancedVoiceOptions advanced_voice_options = 8
[(google.api.field_behavior) = OPTIONAL];
}

// Pronunciation customization for a phrase.
Expand Down Expand Up @@ -296,8 +364,8 @@ message SynthesisInput {
// The raw text to be synthesized.
string text = 1;

// Markup for HD voices specifically. This field may not be used with any
// other voices.
// Markup for Chirp 3: HD voices specifically. This field may not be used
// with any other voices.
string markup = 5;

// The SSML document to be synthesized. The SSML document must be valid
Expand Down Expand Up @@ -522,6 +590,10 @@ message StreamingSynthesizeConfig {
// be inside a phoneme tag.
CustomPronunciations custom_pronunciations = 5
[(google.api.field_behavior) = OPTIONAL];

// Optional. Advanced voice options.
optional AdvancedVoiceOptions advanced_voice_options = 7
[(google.api.field_behavior) = OPTIONAL];
}

// Input to be synthesized.
Expand All @@ -532,8 +604,8 @@ message StreamingSynthesisInput {
// in the output audio.
string text = 1;

// Markup for HD voices specifically. This field may not be used with any
// other voices.
// Markup for Chirp 3: HD voices specifically. This field may not be used
// with any other voices.
string markup = 5;

// Multi-speaker markup for Gemini TTS. This field may not
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -164,18 +164,85 @@ message Voice {

// Used for advanced voice options.
message AdvancedVoiceOptions {
// Safety setting for a single harm category.
message SafetySetting {
// The harm category to apply the safety setting to.
HarmCategory category = 1;

// The harm block threshold for the safety setting.
HarmBlockThreshold threshold = 2;
}

// Safety settings for the request.
message SafetySettings {
// The safety settings for the request.
repeated SafetySetting settings = 1;
}

// Harm categories that will block the content.
enum HarmCategory {
// Default value. This value is unused.
HARM_CATEGORY_UNSPECIFIED = 0;

// Content that promotes violence or incites hatred against individuals or
// groups based on certain attributes.
HARM_CATEGORY_HATE_SPEECH = 1;

// Content that promotes, facilitates, or enables dangerous activities.
HARM_CATEGORY_DANGEROUS_CONTENT = 2;

// Abusive, threatening, or content intended to bully, torment, or ridicule.
HARM_CATEGORY_HARASSMENT = 3;

// Content that contains sexually explicit material.
HARM_CATEGORY_SEXUALLY_EXPLICIT = 4;
}

// Harm block thresholds for the safety settings.
enum HarmBlockThreshold {
// The harm block threshold is unspecified.
HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0;

// Block content with a low harm probability or higher.
BLOCK_LOW_AND_ABOVE = 1;

// Block content with a medium harm probability or higher.
BLOCK_MEDIUM_AND_ABOVE = 2;

// Block content with a high harm probability.
BLOCK_ONLY_HIGH = 3;

// Do not block any content, regardless of its harm probability.
BLOCK_NONE = 4;

// Turn off the safety filter entirely.
OFF = 5;
}

// Only for Journey voices. If false, the synthesis is context aware
// and has a higher latency.
optional bool low_latency_journey_synthesis = 1;

// Optional. Input only. If true, relaxes safety filters for Gemini TTS. Only
// supported for accounts linked to Invoiced (Offline) Cloud billing accounts.
// Otherwise, will return result
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
// Optional. Input only. Deprecated, use safety_settings instead.
// If true, relaxes safety filters for Gemini TTS.
bool relax_safety_filters = 8 [
deprecated = true,
(google.api.field_behavior) = INPUT_ONLY,
(google.api.field_behavior) = OPTIONAL
];

// Optional. Input only. This applies to Gemini TTS only. If set, the category
// specified in the safety setting will be blocked if the harm probability is
// above the threshold. Otherwise, the safety filter will be disabled by
// default.
SafetySettings safety_settings = 9 [
(google.api.field_behavior) = INPUT_ONLY,
(google.api.field_behavior) = OPTIONAL
];

// Optional. If true, textnorm will be applied to text input. This feature is
// enabled by default. Only applies for Gemini TTS.
optional bool enable_textnorm = 2 [(google.api.field_behavior) = OPTIONAL];
}

// The top-level message sent by the client for the `SynthesizeSpeech` method.
Expand All @@ -201,8 +268,9 @@ message SynthesizeSpeechRequest {
// Whether and what timepoints are returned in the response.
repeated TimepointType enable_time_pointing = 4;

// Advanced voice options.
optional AdvancedVoiceOptions advanced_voice_options = 8;
// Optional. Advanced voice options.
optional AdvancedVoiceOptions advanced_voice_options = 8
[(google.api.field_behavior) = OPTIONAL];
}

// Pronunciation customization for a phrase.
Expand Down Expand Up @@ -311,8 +379,8 @@ message SynthesisInput {
// The raw text to be synthesized.
string text = 1;

// Markup for HD voices specifically. This field may not be used with any
// other voices.
// Markup for Chirp 3: HD voices specifically. This field may not be used
// with any other voices.
string markup = 5;

// The SSML document to be synthesized. The SSML document must be valid
Expand Down Expand Up @@ -554,6 +622,10 @@ message StreamingSynthesizeConfig {
// be inside a phoneme tag.
CustomPronunciations custom_pronunciations = 5
[(google.api.field_behavior) = OPTIONAL];

// Optional. Advanced voice options.
optional AdvancedVoiceOptions advanced_voice_options = 7
[(google.api.field_behavior) = OPTIONAL];
}

// Input to be synthesized.
Expand All @@ -564,8 +636,8 @@ message StreamingSynthesisInput {
// in the output audio.
string text = 1;

// Markup for HD voices specifically. This field may not be used with any
// other voices.
// Markup for Chirp 3: HD voices specifically. This field may not be used
// with any other voices.
string markup = 5;

// Multi-speaker markup for Gemini TTS. This field may not
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading
Loading