Skip to content
Merged
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
Expand Up @@ -39,6 +39,7 @@
CustomVoiceParams,
ListVoicesRequest,
ListVoicesResponse,
MultiSpeakerMarkup,
SsmlVoiceGender,
StreamingSynthesisInput,
StreamingSynthesizeConfig,
Expand Down Expand Up @@ -69,6 +70,7 @@
"CustomVoiceParams",
"ListVoicesRequest",
"ListVoicesResponse",
"MultiSpeakerMarkup",
"StreamingSynthesisInput",
"StreamingSynthesizeConfig",
"StreamingSynthesizeRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.20.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
CustomVoiceParams,
ListVoicesRequest,
ListVoicesResponse,
MultiSpeakerMarkup,
SsmlVoiceGender,
StreamingSynthesisInput,
StreamingSynthesizeConfig,
Expand Down Expand Up @@ -61,6 +62,7 @@
"CustomVoiceParams",
"ListVoicesRequest",
"ListVoicesResponse",
"MultiSpeakerMarkup",
"SsmlVoiceGender",
"StreamingSynthesisInput",
"StreamingSynthesizeConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.20.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
CustomVoiceParams,
ListVoicesRequest,
ListVoicesResponse,
MultiSpeakerMarkup,
SsmlVoiceGender,
StreamingSynthesisInput,
StreamingSynthesizeConfig,
Expand All @@ -48,6 +49,7 @@
"CustomVoiceParams",
"ListVoicesRequest",
"ListVoicesResponse",
"MultiSpeakerMarkup",
"StreamingSynthesisInput",
"StreamingSynthesizeConfig",
"StreamingSynthesizeRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"SynthesizeSpeechRequest",
"CustomPronunciationParams",
"CustomPronunciations",
"MultiSpeakerMarkup",
"SynthesisInput",
"VoiceSelectionParams",
"AudioConfig",
Expand Down Expand Up @@ -328,6 +329,42 @@ class CustomPronunciations(proto.Message):
)


class MultiSpeakerMarkup(proto.Message):
r"""A collection of turns for multi-speaker synthesis.

Attributes:
turns (MutableSequence[google.cloud.texttospeech_v1.types.MultiSpeakerMarkup.Turn]):
Required. Speaker turns.
"""

class Turn(proto.Message):
r"""A Multi-speaker turn.

Attributes:
speaker (str):
Required. The speaker of the turn, for
example, 'O' or 'Q'. Please refer to
documentation for available speakers.
text (str):
Required. The text to speak.
"""

speaker: str = proto.Field(
proto.STRING,
number=1,
)
text: str = proto.Field(
proto.STRING,
number=2,
)

turns: MutableSequence[Turn] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=Turn,
)


class SynthesisInput(proto.Message):
r"""Contains text input to be synthesized. Either ``text`` or ``ssml``
must be supplied. Supplying both or neither returns
Expand All @@ -354,6 +391,11 @@ class SynthesisInput(proto.Message):
For more information, see
`SSML <https://cloud.google.com/text-to-speech/docs/ssml>`__.

This field is a member of `oneof`_ ``input_source``.
multi_speaker_markup (google.cloud.texttospeech_v1.types.MultiSpeakerMarkup):
The multi-speaker input to be synthesized.
Only applicable for multi-speaker synthesis.

This field is a member of `oneof`_ ``input_source``.
custom_pronunciations (google.cloud.texttospeech_v1.types.CustomPronunciations):
Optional. The pronunciation customizations to
Expand Down Expand Up @@ -383,6 +425,12 @@ class SynthesisInput(proto.Message):
number=2,
oneof="input_source",
)
multi_speaker_markup: "MultiSpeakerMarkup" = proto.Field(
proto.MESSAGE,
number=4,
oneof="input_source",
message="MultiSpeakerMarkup",
)
custom_pronunciations: "CustomPronunciations" = proto.Field(
proto.MESSAGE,
number=3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.20.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-texttospeech",
"version": "2.20.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-texttospeech",
"version": "2.20.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down