Skip to content

Commit 56f5fa4

Browse files
Google APIscopybara-github
authored andcommitted
feat: add multi-speaker markup, which allows generating dialogue between multiple speakers
PiperOrigin-RevId: 689444598
1 parent 9e7a2e5 commit 56f5fa4

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

google/cloud/texttospeech/v1beta1/cloud_tts.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,22 @@ message CustomPronunciations {
222222
repeated CustomPronunciationParams pronunciations = 1;
223223
}
224224

225+
// A collection of turns for multi-speaker synthesis.
226+
message MultiSpeakerMarkup {
227+
// A Multi-speaker turn.
228+
message Turn {
229+
// Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer
230+
// to documentation for available speakers.
231+
string speaker = 1 [(google.api.field_behavior) = REQUIRED];
232+
233+
// Required. The text to speak.
234+
string text = 2 [(google.api.field_behavior) = REQUIRED];
235+
}
236+
237+
// Required. Speaker turns.
238+
repeated Turn turns = 1 [(google.api.field_behavior) = REQUIRED];
239+
}
240+
225241
// Contains text input to be synthesized. Either `text` or `ssml` must be
226242
// supplied. Supplying both or neither returns
227243
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The
@@ -238,6 +254,10 @@ message SynthesisInput {
238254
// more information, see
239255
// [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
240256
string ssml = 2;
257+
258+
// The multi-speaker input to be synthesized. Only applicable for
259+
// multi-speaker synthesis.
260+
MultiSpeakerMarkup multi_speaker_markup = 4;
241261
}
242262

243263
// Optional. The pronunciation customizations to be applied to the input. If

0 commit comments

Comments
 (0)