Variables
SsmlVoiceGender_name, SsmlVoiceGender_value
var (
SsmlVoiceGender_name = map[int32]string{
0: "SSML_VOICE_GENDER_UNSPECIFIED",
1: "MALE",
2: "FEMALE",
3: "NEUTRAL",
}
SsmlVoiceGender_value = map[string]int32{
"SSML_VOICE_GENDER_UNSPECIFIED": 0,
"MALE": 1,
"FEMALE": 2,
"NEUTRAL": 3,
}
)
Enum value maps for SsmlVoiceGender.
AudioEncoding_name, AudioEncoding_value
var (
AudioEncoding_name = map[int32]string{
0: "AUDIO_ENCODING_UNSPECIFIED",
1: "LINEAR16",
2: "MP3",
3: "OGG_OPUS",
5: "MULAW",
6: "ALAW",
}
AudioEncoding_value = map[string]int32{
"AUDIO_ENCODING_UNSPECIFIED": 0,
"LINEAR16": 1,
"MP3": 2,
"OGG_OPUS": 3,
"MULAW": 5,
"ALAW": 6,
}
)
Enum value maps for AudioEncoding.
CustomPronunciationParams_PhoneticEncoding_name, CustomPronunciationParams_PhoneticEncoding_value
var (
CustomPronunciationParams_PhoneticEncoding_name = map[int32]string{
0: "PHONETIC_ENCODING_UNSPECIFIED",
1: "PHONETIC_ENCODING_IPA",
2: "PHONETIC_ENCODING_X_SAMPA",
}
CustomPronunciationParams_PhoneticEncoding_value = map[string]int32{
"PHONETIC_ENCODING_UNSPECIFIED": 0,
"PHONETIC_ENCODING_IPA": 1,
"PHONETIC_ENCODING_X_SAMPA": 2,
}
)
Enum value maps for CustomPronunciationParams_PhoneticEncoding.
CustomVoiceParams_ReportedUsage_name, CustomVoiceParams_ReportedUsage_value
var (
CustomVoiceParams_ReportedUsage_name = map[int32]string{
0: "REPORTED_USAGE_UNSPECIFIED",
1: "REALTIME",
2: "OFFLINE",
}
CustomVoiceParams_ReportedUsage_value = map[string]int32{
"REPORTED_USAGE_UNSPECIFIED": 0,
"REALTIME": 1,
"OFFLINE": 2,
}
)
Enum value maps for CustomVoiceParams_ReportedUsage.
File_google_cloud_texttospeech_v1_cloud_tts_lrs_proto
var File_google_cloud_texttospeech_v1_cloud_tts_lrs_proto protoreflect.FileDescriptor
File_google_cloud_texttospeech_v1_cloud_tts_proto
var File_google_cloud_texttospeech_v1_cloud_tts_proto protoreflect.FileDescriptor
Functions
func RegisterTextToSpeechLongAudioSynthesizeServer
func RegisterTextToSpeechLongAudioSynthesizeServer(s *grpc.Server, srv TextToSpeechLongAudioSynthesizeServer)
func RegisterTextToSpeechServer
func RegisterTextToSpeechServer(s *grpc.Server, srv TextToSpeechServer)
AdvancedVoiceOptions
type AdvancedVoiceOptions struct {
LowLatencyJourneySynthesis *bool "" /* 150 byte string literal not displayed */
}
Used for advanced voice options.
func (*AdvancedVoiceOptions) Descriptor
func (*AdvancedVoiceOptions) Descriptor() ([]byte, []int)
Deprecated: Use AdvancedVoiceOptions.ProtoReflect.Descriptor instead.
func (*AdvancedVoiceOptions) GetLowLatencyJourneySynthesis
func (x *AdvancedVoiceOptions) GetLowLatencyJourneySynthesis() bool
func (*AdvancedVoiceOptions) ProtoMessage
func (*AdvancedVoiceOptions) ProtoMessage()
func (*AdvancedVoiceOptions) ProtoReflect
func (x *AdvancedVoiceOptions) ProtoReflect() protoreflect.Message
func (*AdvancedVoiceOptions) Reset
func (x *AdvancedVoiceOptions) Reset()
func (*AdvancedVoiceOptions) String
func (x *AdvancedVoiceOptions) String() string
AudioConfig
type AudioConfig struct {
AudioEncoding AudioEncoding "" /* 149 byte string literal not displayed */
SpeakingRate float64 `protobuf:"fixed64,2,opt,name=speaking_rate,json=speakingRate,proto3" json:"speaking_rate,omitempty"`
Pitch float64 `protobuf:"fixed64,3,opt,name=pitch,proto3" json:"pitch,omitempty"`
VolumeGainDb float64 `protobuf:"fixed64,4,opt,name=volume_gain_db,json=volumeGainDb,proto3" json:"volume_gain_db,omitempty"`
SampleRateHertz int32 `protobuf:"varint,5,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"`
EffectsProfileId []string `protobuf:"bytes,6,rep,name=effects_profile_id,json=effectsProfileId,proto3" json:"effects_profile_id,omitempty"`
}
Description of audio data to be synthesized.
func (*AudioConfig) Descriptor
func (*AudioConfig) Descriptor() ([]byte, []int)
Deprecated: Use AudioConfig.ProtoReflect.Descriptor instead.
func (*AudioConfig) GetAudioEncoding
func (x *AudioConfig) GetAudioEncoding() AudioEncoding
func (*AudioConfig) GetEffectsProfileId
func (x *AudioConfig) GetEffectsProfileId() []string
func (*AudioConfig) GetPitch
func (x *AudioConfig) GetPitch() float64
func (*AudioConfig) GetSampleRateHertz
func (x *AudioConfig) GetSampleRateHertz() int32
func (*AudioConfig) GetSpeakingRate
func (x *AudioConfig) GetSpeakingRate() float64
func (*AudioConfig) GetVolumeGainDb
func (x *AudioConfig) GetVolumeGainDb() float64
func (*AudioConfig) ProtoMessage
func (*AudioConfig) ProtoMessage()
func (*AudioConfig) ProtoReflect
func (x *AudioConfig) ProtoReflect() protoreflect.Message
func (*AudioConfig) Reset
func (x *AudioConfig) Reset()
func (*AudioConfig) String
func (x *AudioConfig) String() string
AudioEncoding
type AudioEncoding int32
Configuration to set up audio encoder. The encoding determines the output audio format that we'd like.
AudioEncoding_AUDIO_ENCODING_UNSPECIFIED, AudioEncoding_LINEAR16, AudioEncoding_MP3, AudioEncoding_OGG_OPUS, AudioEncoding_MULAW, AudioEncoding_ALAW
const (
// Not specified. Will return result
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
AudioEncoding_AUDIO_ENCODING_UNSPECIFIED AudioEncoding = 0
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
// Audio content returned as LINEAR16 also contains a WAV header.
AudioEncoding_LINEAR16 AudioEncoding = 1
// MP3 audio at 32kbps.
AudioEncoding_MP3 AudioEncoding = 2
// Opus encoded audio wrapped in an ogg container. The result will be a
// file which can be played natively on Android, and in browsers (at least
// Chrome and Firefox). The quality of the encoding is considerably higher
// than MP3 while using approximately the same bitrate.
AudioEncoding_OGG_OPUS AudioEncoding = 3
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
// Audio content returned as MULAW also contains a WAV header.
AudioEncoding_MULAW AudioEncoding = 5
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
// Audio content returned as ALAW also contains a WAV header.
AudioEncoding_ALAW AudioEncoding = 6
)
func (AudioEncoding) Descriptor
func (AudioEncoding) Descriptor() protoreflect.EnumDescriptor
func (AudioEncoding) Enum
func (x AudioEncoding) Enum() *AudioEncoding
func (AudioEncoding) EnumDescriptor
func (AudioEncoding) EnumDescriptor() ([]byte, []int)
Deprecated: Use AudioEncoding.Descriptor instead.
func (AudioEncoding) Number
func (x AudioEncoding) Number() protoreflect.EnumNumber
func (AudioEncoding) String
func (x AudioEncoding) String() string
func (AudioEncoding) Type
func (AudioEncoding) Type() protoreflect.EnumType
CustomPronunciationParams
type CustomPronunciationParams struct {
Phrase *string `protobuf:"bytes,1,opt,name=phrase,proto3,oneof" json:"phrase,omitempty"`
PhoneticEncoding *CustomPronunciationParams_PhoneticEncoding "" /* 193 byte string literal not displayed */
Pronunciation *string `protobuf:"bytes,3,opt,name=pronunciation,proto3,oneof" json:"pronunciation,omitempty"`
}
Pronunciation customization for a phrase.
func (*CustomPronunciationParams) Descriptor
func (*CustomPronunciationParams) Descriptor() ([]byte, []int)
Deprecated: Use CustomPronunciationParams.ProtoReflect.Descriptor instead.
func (*CustomPronunciationParams) GetPhoneticEncoding
func (x *CustomPronunciationParams) GetPhoneticEncoding() CustomPronunciationParams_PhoneticEncoding
func (*CustomPronunciationParams) GetPhrase
func (x *CustomPronunciationParams) GetPhrase() string
func (*CustomPronunciationParams) GetPronunciation
func (x *CustomPronunciationParams) GetPronunciation() string
func (*CustomPronunciationParams) ProtoMessage
func (*CustomPronunciationParams) ProtoMessage()
func (*CustomPronunciationParams) ProtoReflect
func (x *CustomPronunciationParams) ProtoReflect() protoreflect.Message
func (*CustomPronunciationParams) Reset
func (x *CustomPronunciationParams) Reset()
func (*CustomPronunciationParams) String
func (x *CustomPronunciationParams) String() string
CustomPronunciationParams_PhoneticEncoding
type CustomPronunciationParams_PhoneticEncoding int32
The phonetic encoding of the phrase.
CustomPronunciationParams_PHONETIC_ENCODING_UNSPECIFIED, CustomPronunciationParams_PHONETIC_ENCODING_IPA, CustomPronunciationParams_PHONETIC_ENCODING_X_SAMPA
const (
// Not specified.
CustomPronunciationParams_PHONETIC_ENCODING_UNSPECIFIED CustomPronunciationParams_PhoneticEncoding = 0
// IPA. (e.g. apple -> ˈæpəl )
// https://en.wikipedia.org/wiki/International_Phonetic_Alphabet
CustomPronunciationParams_PHONETIC_ENCODING_IPA CustomPronunciationParams_PhoneticEncoding = 1
// X-SAMPA (e.g. apple -> "{p@l" )
// https://en.wikipedia.org/wiki/X-SAMPA
CustomPronunciationParams_PHONETIC_ENCODING_X_SAMPA CustomPronunciationParams_PhoneticEncoding = 2
)
func (CustomPronunciationParams_PhoneticEncoding) Descriptor
func (CustomPronunciationParams_PhoneticEncoding) Descriptor() protoreflect.EnumDescriptor
func (CustomPronunciationParams_PhoneticEncoding) Enum
func (x CustomPronunciationParams_PhoneticEncoding) Enum() *CustomPronunciationParams_PhoneticEncoding
func (CustomPronunciationParams_PhoneticEncoding) EnumDescriptor
func (CustomPronunciationParams_PhoneticEncoding) EnumDescriptor() ([]byte, []int)
Deprecated: Use CustomPronunciationParams_PhoneticEncoding.Descriptor instead.
func (CustomPronunciationParams_PhoneticEncoding) Number
func (x CustomPronunciationParams_PhoneticEncoding) Number() protoreflect.EnumNumber
func (CustomPronunciationParams_PhoneticEncoding) String
func (x CustomPronunciationParams_PhoneticEncoding) String() string
func (CustomPronunciationParams_PhoneticEncoding) Type
func (CustomPronunciationParams_PhoneticEncoding) Type() protoreflect.EnumType
CustomPronunciations
type CustomPronunciations struct {
// The pronunciation customizations to be applied.
Pronunciations []*CustomPronunciationParams `protobuf:"bytes,1,rep,name=pronunciations,proto3" json:"pronunciations,omitempty"`
// contains filtered or unexported fields
}
A collection of pronunciation customizations.
func (*CustomPronunciations) Descriptor
func (*CustomPronunciations) Descriptor() ([]byte, []int)
Deprecated: Use CustomPronunciations.ProtoReflect.Descriptor instead.
func (*CustomPronunciations) GetPronunciations
func (x *CustomPronunciations) GetPronunciations() []*CustomPronunciationParams
func (*CustomPronunciations) ProtoMessage
func (*CustomPronunciations) ProtoMessage()
func (*CustomPronunciations) ProtoReflect
func (x *CustomPronunciations) ProtoReflect() protoreflect.Message
func (*CustomPronunciations) Reset
func (x *CustomPronunciations) Reset()
func (*CustomPronunciations) String
func (x *CustomPronunciations) String() string
CustomVoiceParams
type CustomVoiceParams struct {
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
ReportedUsage CustomVoiceParams_ReportedUsage "" /* 167 byte string literal not displayed */
}
Description of the custom voice to be synthesized.
func (*CustomVoiceParams) Descriptor
func (*CustomVoiceParams) Descriptor() ([]byte, []int)
Deprecated: Use CustomVoiceParams.ProtoReflect.Descriptor instead.
func (*CustomVoiceParams) GetModel
func (x *CustomVoiceParams) GetModel() string
func (*CustomVoiceParams) GetReportedUsage
func (x *CustomVoiceParams) GetReportedUsage() CustomVoiceParams_ReportedUsage
Deprecated: Marked as deprecated in google/cloud/texttospeech/v1/cloud_tts.proto.
func (*CustomVoiceParams) ProtoMessage
func (*CustomVoiceParams) ProtoMessage()
func (*CustomVoiceParams) ProtoReflect
func (x *CustomVoiceParams) ProtoReflect() protoreflect.Message
func (*CustomVoiceParams) Reset
func (x *CustomVoiceParams) Reset()
func (*CustomVoiceParams) String
func (x *CustomVoiceParams) String() string
CustomVoiceParams_ReportedUsage
type CustomVoiceParams_ReportedUsage int32
Deprecated. The usage of the synthesized audio. Usage does not affect billing.
CustomVoiceParams_REPORTED_USAGE_UNSPECIFIED, CustomVoiceParams_REALTIME, CustomVoiceParams_OFFLINE
const (
// Request with reported usage unspecified will be rejected.
CustomVoiceParams_REPORTED_USAGE_UNSPECIFIED CustomVoiceParams_ReportedUsage = 0
// For scenarios where the synthesized audio is not downloadable and can
// only be used once. For example, real-time request in IVR system.
CustomVoiceParams_REALTIME CustomVoiceParams_ReportedUsage = 1
// For scenarios where the synthesized audio is downloadable and can be
// reused. For example, the synthesized audio is downloaded, stored in
// customer service system and played repeatedly.
CustomVoiceParams_OFFLINE CustomVoiceParams_ReportedUsage = 2
)
func (CustomVoiceParams_ReportedUsage) Descriptor
func (CustomVoiceParams_ReportedUsage) Descriptor() protoreflect.EnumDescriptor
func (CustomVoiceParams_ReportedUsage) Enum
func (x CustomVoiceParams_ReportedUsage) Enum() *CustomVoiceParams_ReportedUsage
func (CustomVoiceParams_ReportedUsage) EnumDescriptor
func (CustomVoiceParams_ReportedUsage) EnumDescriptor() ([]byte, []int)
Deprecated: Use CustomVoiceParams_ReportedUsage.Descriptor instead.
func (CustomVoiceParams_ReportedUsage) Number
func (x CustomVoiceParams_ReportedUsage) Number() protoreflect.EnumNumber
func (CustomVoiceParams_ReportedUsage) String
func (x CustomVoiceParams_ReportedUsage) String() string
func (CustomVoiceParams_ReportedUsage) Type
func (CustomVoiceParams_ReportedUsage) Type() protoreflect.EnumType
ListVoicesRequest
type ListVoicesRequest struct {
// Optional. Recommended.
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
// If not specified, the API will return all supported voices.
// If specified, the ListVoices call will only return voices that can be used
// to synthesize this language_code. For example, if you specify `"en-NZ"`,
// all `"en-NZ"` voices will be returned. If you specify `"no"`, both
// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
// returned.
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// contains filtered or unexported fields
}
The top-level message sent by the client for the ListVoices
method.
func (*ListVoicesRequest) Descriptor
func (*ListVoicesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListVoicesRequest.ProtoReflect.Descriptor instead.
func (*ListVoicesRequest) GetLanguageCode
func (x *ListVoicesRequest) GetLanguageCode() string
func (*ListVoicesRequest) ProtoMessage
func (*ListVoicesRequest) ProtoMessage()
func (*ListVoicesRequest) ProtoReflect
func (x *ListVoicesRequest) ProtoReflect() protoreflect.Message
func (*ListVoicesRequest) Reset
func (x *ListVoicesRequest) Reset()
func (*ListVoicesRequest) String
func (x *ListVoicesRequest) String() string
ListVoicesResponse
type ListVoicesResponse struct {
// The list of voices.
Voices []*Voice `protobuf:"bytes,1,rep,name=voices,proto3" json:"voices,omitempty"`
// contains filtered or unexported fields
}
The message returned to the client by the ListVoices
method.
func (*ListVoicesResponse) Descriptor
func (*ListVoicesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListVoicesResponse.ProtoReflect.Descriptor instead.
func (*ListVoicesResponse) GetVoices
func (x *ListVoicesResponse) GetVoices() []*Voice
func (*ListVoicesResponse) ProtoMessage
func (*ListVoicesResponse) ProtoMessage()
func (*ListVoicesResponse) ProtoReflect
func (x *ListVoicesResponse) ProtoReflect() protoreflect.Message
func (*ListVoicesResponse) Reset
func (x *ListVoicesResponse) Reset()
func (*ListVoicesResponse) String
func (x *ListVoicesResponse) String() string
SsmlVoiceGender
type SsmlVoiceGender int32
Gender of the voice as described in SSML voice element.
SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED, SsmlVoiceGender_MALE, SsmlVoiceGender_FEMALE, SsmlVoiceGender_NEUTRAL
const (
// An unspecified gender.
// In VoiceSelectionParams, this means that the client doesn't care which
// gender the selected voice will have. In the Voice field of
// ListVoicesResponse, this may mean that the voice doesn't fit any of the
// other categories in this enum, or that the gender of the voice isn't known.
SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED SsmlVoiceGender = 0
// A male voice.
SsmlVoiceGender_MALE SsmlVoiceGender = 1
// A female voice.
SsmlVoiceGender_FEMALE SsmlVoiceGender = 2
// A gender-neutral voice. This voice is not yet supported.
SsmlVoiceGender_NEUTRAL SsmlVoiceGender = 3
)
func (SsmlVoiceGender) Descriptor
func (SsmlVoiceGender) Descriptor() protoreflect.EnumDescriptor
func (SsmlVoiceGender) Enum
func (x SsmlVoiceGender) Enum() *SsmlVoiceGender
func (SsmlVoiceGender) EnumDescriptor
func (SsmlVoiceGender) EnumDescriptor() ([]byte, []int)
Deprecated: Use SsmlVoiceGender.Descriptor instead.
func (SsmlVoiceGender) Number
func (x SsmlVoiceGender) Number() protoreflect.EnumNumber
func (SsmlVoiceGender) String
func (x SsmlVoiceGender) String() string
func (SsmlVoiceGender) Type
func (SsmlVoiceGender) Type() protoreflect.EnumType
StreamingSynthesisInput
type StreamingSynthesisInput struct {
// Types that are assignable to InputSource:
//
// *StreamingSynthesisInput_Text
InputSource isStreamingSynthesisInput_InputSource `protobuf_oneof:"input_source"`
// contains filtered or unexported fields
}
Input to be synthesized.
func (*StreamingSynthesisInput) Descriptor
func (*StreamingSynthesisInput) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSynthesisInput.ProtoReflect.Descriptor instead.
func (*StreamingSynthesisInput) GetInputSource
func (m *StreamingSynthesisInput) GetInputSource() isStreamingSynthesisInput_InputSource
func (*StreamingSynthesisInput) GetText
func (x *StreamingSynthesisInput) GetText() string
func (*StreamingSynthesisInput) ProtoMessage
func (*StreamingSynthesisInput) ProtoMessage()
func (*StreamingSynthesisInput) ProtoReflect
func (x *StreamingSynthesisInput) ProtoReflect() protoreflect.Message
func (*StreamingSynthesisInput) Reset
func (x *StreamingSynthesisInput) Reset()
func (*StreamingSynthesisInput) String
func (x *StreamingSynthesisInput) String() string
StreamingSynthesisInput_Text
type StreamingSynthesisInput_Text struct {
// The raw text to be synthesized. It is recommended that each input
// contains complete, terminating sentences, as this will likely result in
// better prosody in the output audio. That being said, users are free to
// input text however they please.
Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}
StreamingSynthesizeConfig
type StreamingSynthesizeConfig struct {
// Required. The desired voice of the synthesized audio.
Voice *VoiceSelectionParams `protobuf:"bytes,1,opt,name=voice,proto3" json:"voice,omitempty"`
// contains filtered or unexported fields
}
Provides configuration information for the StreamingSynthesize request.
func (*StreamingSynthesizeConfig) Descriptor
func (*StreamingSynthesizeConfig) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSynthesizeConfig.ProtoReflect.Descriptor instead.
func (*StreamingSynthesizeConfig) GetVoice
func (x *StreamingSynthesizeConfig) GetVoice() *VoiceSelectionParams
func (*StreamingSynthesizeConfig) ProtoMessage
func (*StreamingSynthesizeConfig) ProtoMessage()
func (*StreamingSynthesizeConfig) ProtoReflect
func (x *StreamingSynthesizeConfig) ProtoReflect() protoreflect.Message
func (*StreamingSynthesizeConfig) Reset
func (x *StreamingSynthesizeConfig) Reset()
func (*StreamingSynthesizeConfig) String
func (x *StreamingSynthesizeConfig) String() string
StreamingSynthesizeRequest
type StreamingSynthesizeRequest struct {
// The request to be sent, either a StreamingSynthesizeConfig or
// StreamingSynthesisInput.
//
// Types that are assignable to StreamingRequest:
//
// *StreamingSynthesizeRequest_StreamingConfig
// *StreamingSynthesizeRequest_Input
StreamingRequest isStreamingSynthesizeRequest_StreamingRequest `protobuf_oneof:"streaming_request"`
// contains filtered or unexported fields
}
Request message for the StreamingSynthesize
method. Multiple
StreamingSynthesizeRequest
messages are sent in one call.
The first message must contain a streaming_config
that
fully specifies the request configuration and must not contain input
. All
subsequent messages must only have input
set.
func (*StreamingSynthesizeRequest) Descriptor
func (*StreamingSynthesizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSynthesizeRequest.ProtoReflect.Descriptor instead.
func (*StreamingSynthesizeRequest) GetInput
func (x *StreamingSynthesizeRequest) GetInput() *StreamingSynthesisInput
func (*StreamingSynthesizeRequest) GetStreamingConfig
func (x *StreamingSynthesizeRequest) GetStreamingConfig() *StreamingSynthesizeConfig
func (*StreamingSynthesizeRequest) GetStreamingRequest
func (m *StreamingSynthesizeRequest) GetStreamingRequest() isStreamingSynthesizeRequest_StreamingRequest
func (*StreamingSynthesizeRequest) ProtoMessage
func (*StreamingSynthesizeRequest) ProtoMessage()
func (*StreamingSynthesizeRequest) ProtoReflect
func (x *StreamingSynthesizeRequest) ProtoReflect() protoreflect.Message
func (*StreamingSynthesizeRequest) Reset
func (x *StreamingSynthesizeRequest) Reset()
func (*StreamingSynthesizeRequest) String
func (x *StreamingSynthesizeRequest) String() string
StreamingSynthesizeRequest_Input
type StreamingSynthesizeRequest_Input struct {
// Input to synthesize. Specified in all messages but the first in a
// `StreamingSynthesize` call.
Input *StreamingSynthesisInput `protobuf:"bytes,2,opt,name=input,proto3,oneof"`
}
StreamingSynthesizeRequest_StreamingConfig
type StreamingSynthesizeRequest_StreamingConfig struct {
// StreamingSynthesizeConfig to be used in this streaming attempt. Only
// specified in the first message sent in a `StreamingSynthesize` call.
StreamingConfig *StreamingSynthesizeConfig `protobuf:"bytes,1,opt,name=streaming_config,json=streamingConfig,proto3,oneof"`
}
StreamingSynthesizeResponse
type StreamingSynthesizeResponse struct {
// The audio data bytes encoded as specified in the request. This is
// headerless LINEAR16 audio with a sample rate of 24000.
AudioContent []byte `protobuf:"bytes,1,opt,name=audio_content,json=audioContent,proto3" json:"audio_content,omitempty"`
// contains filtered or unexported fields
}
StreamingSynthesizeResponse
is the only message returned to the
client by StreamingSynthesize
method. A series of zero or more
StreamingSynthesizeResponse
messages are streamed back to the client.
func (*StreamingSynthesizeResponse) Descriptor
func (*StreamingSynthesizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSynthesizeResponse.ProtoReflect.Descriptor instead.
func (*StreamingSynthesizeResponse) GetAudioContent
func (x *StreamingSynthesizeResponse) GetAudioContent() []byte
func (*StreamingSynthesizeResponse) ProtoMessage
func (*StreamingSynthesizeResponse) ProtoMessage()
func (*StreamingSynthesizeResponse) ProtoReflect
func (x *StreamingSynthesizeResponse) ProtoReflect() protoreflect.Message
func (*StreamingSynthesizeResponse) Reset
func (x *StreamingSynthesizeResponse) Reset()
func (*StreamingSynthesizeResponse) String
func (x *StreamingSynthesizeResponse) String() string
SynthesisInput
type SynthesisInput struct {
// The input source, which is either plain text or SSML.
//
// Types that are assignable to InputSource:
//
// *SynthesisInput_Text
// *SynthesisInput_Ssml
InputSource isSynthesisInput_InputSource `protobuf_oneof:"input_source"`
// Optional. The pronunciation customizations to be applied to the input. If
// this is set, the input will be synthesized using the given pronunciation
// customizations.
//
// The initial support will be for EFIGS (English, French,
// Italian, German, Spanish) languages, as provided in
// VoiceSelectionParams. Journey and Instant Clone voices are
// not supported yet.
//
// In order to customize the pronunciation of a phrase, there must be an exact
// match of the phrase in the input types. If using SSML, the phrase must not
// be inside a phoneme tag (entirely or partially).
CustomPronunciations *CustomPronunciations `protobuf:"bytes,3,opt,name=custom_pronunciations,json=customPronunciations,proto3" json:"custom_pronunciations,omitempty"`
// contains filtered or unexported fields
}
Contains text input to be synthesized. Either text
or ssml
must be
supplied. Supplying both or neither returns
[google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The
input size is limited to 5000 bytes.
func (*SynthesisInput) Descriptor
func (*SynthesisInput) Descriptor() ([]byte, []int)
Deprecated: Use SynthesisInput.ProtoReflect.Descriptor instead.
func (*SynthesisInput) GetCustomPronunciations
func (x *SynthesisInput) GetCustomPronunciations() *CustomPronunciations
func (*SynthesisInput) GetInputSource
func (m *SynthesisInput) GetInputSource() isSynthesisInput_InputSource
func (*SynthesisInput) GetSsml
func (x *SynthesisInput) GetSsml() string
func (*SynthesisInput) GetText
func (x *SynthesisInput) GetText() string
func (*SynthesisInput) ProtoMessage
func (*SynthesisInput) ProtoMessage()
func (*SynthesisInput) ProtoReflect
func (x *SynthesisInput) ProtoReflect() protoreflect.Message
func (*SynthesisInput) Reset
func (x *SynthesisInput) Reset()
func (*SynthesisInput) String
func (x *SynthesisInput) String() string
SynthesisInput_Ssml
type SynthesisInput_Ssml struct {
// The SSML document to be synthesized. The SSML document must be valid
// and well-formed. Otherwise the RPC will fail and return
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For
// more information, see
// [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
Ssml string `protobuf:"bytes,2,opt,name=ssml,proto3,oneof"`
}
SynthesisInput_Text
type SynthesisInput_Text struct {
// The raw text to be synthesized.
Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}
SynthesizeLongAudioMetadata
type SynthesizeLongAudioMetadata struct {
// Time when the request was received.
StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// Deprecated. Do not use.
//
// Deprecated: Marked as deprecated in google/cloud/texttospeech/v1/cloud_tts_lrs.proto.
LastUpdateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"`
// The progress of the most recent processing update in percentage, ie. 70.0%.
ProgressPercentage float64 `protobuf:"fixed64,3,opt,name=progress_percentage,json=progressPercentage,proto3" json:"progress_percentage,omitempty"`
// contains filtered or unexported fields
}
Metadata for response returned by the SynthesizeLongAudio
method.
func (*SynthesizeLongAudioMetadata) Descriptor
func (*SynthesizeLongAudioMetadata) Descriptor() ([]byte, []int)
Deprecated: Use SynthesizeLongAudioMetadata.ProtoReflect.Descriptor instead.
func (*SynthesizeLongAudioMetadata) GetLastUpdateTime
func (x *SynthesizeLongAudioMetadata) GetLastUpdateTime() *timestamppb.Timestamp
Deprecated: Marked as deprecated in google/cloud/texttospeech/v1/cloud_tts_lrs.proto.
func (*SynthesizeLongAudioMetadata) GetProgressPercentage
func (x *SynthesizeLongAudioMetadata) GetProgressPercentage() float64
func (*SynthesizeLongAudioMetadata) GetStartTime
func (x *SynthesizeLongAudioMetadata) GetStartTime() *timestamppb.Timestamp
func (*SynthesizeLongAudioMetadata) ProtoMessage
func (*SynthesizeLongAudioMetadata) ProtoMessage()
func (*SynthesizeLongAudioMetadata) ProtoReflect
func (x *SynthesizeLongAudioMetadata) ProtoReflect() protoreflect.Message
func (*SynthesizeLongAudioMetadata) Reset
func (x *SynthesizeLongAudioMetadata) Reset()
func (*SynthesizeLongAudioMetadata) String
func (x *SynthesizeLongAudioMetadata) String() string
SynthesizeLongAudioRequest
type SynthesizeLongAudioRequest struct {
// The resource states of the request in the form of
// `projects/*/locations/*`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The Synthesizer requires either plain text or SSML as input.
Input *SynthesisInput `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
// Required. The configuration of the synthesized audio.
AudioConfig *AudioConfig `protobuf:"bytes,3,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"`
// Required. Specifies a Cloud Storage URI for the synthesis results. Must be
// specified in the format: `gs://bucket_name/object_name`, and the bucket
// must already exist.
OutputGcsUri string `protobuf:"bytes,4,opt,name=output_gcs_uri,json=outputGcsUri,proto3" json:"output_gcs_uri,omitempty"`
// Required. The desired voice of the synthesized audio.
Voice *VoiceSelectionParams `protobuf:"bytes,5,opt,name=voice,proto3" json:"voice,omitempty"`
// contains filtered or unexported fields
}
The top-level message sent by the client for the
SynthesizeLongAudio
method.
func (*SynthesizeLongAudioRequest) Descriptor
func (*SynthesizeLongAudioRequest) Descriptor() ([]byte, []int)
Deprecated: Use SynthesizeLongAudioRequest.ProtoReflect.Descriptor instead.
func (*SynthesizeLongAudioRequest) GetAudioConfig
func (x *SynthesizeLongAudioRequest) GetAudioConfig() *AudioConfig
func (*SynthesizeLongAudioRequest) GetInput
func (x *SynthesizeLongAudioRequest) GetInput() *SynthesisInput
func (*SynthesizeLongAudioRequest) GetOutputGcsUri
func (x *SynthesizeLongAudioRequest) GetOutputGcsUri() string
func (*SynthesizeLongAudioRequest) GetParent
func (x *SynthesizeLongAudioRequest) GetParent() string
func (*SynthesizeLongAudioRequest) GetVoice
func (x *SynthesizeLongAudioRequest) GetVoice() *VoiceSelectionParams
func (*SynthesizeLongAudioRequest) ProtoMessage
func (*SynthesizeLongAudioRequest) ProtoMessage()
func (*SynthesizeLongAudioRequest) ProtoReflect
func (x *SynthesizeLongAudioRequest) ProtoReflect() protoreflect.Message
func (*SynthesizeLongAudioRequest) Reset
func (x *SynthesizeLongAudioRequest) Reset()
func (*SynthesizeLongAudioRequest) String
func (x *SynthesizeLongAudioRequest) String() string
SynthesizeLongAudioResponse
type SynthesizeLongAudioResponse struct {
// contains filtered or unexported fields
}
The message returned to the client by the SynthesizeLongAudio
method.
func (*SynthesizeLongAudioResponse) Descriptor
func (*SynthesizeLongAudioResponse) Descriptor() ([]byte, []int)
Deprecated: Use SynthesizeLongAudioResponse.ProtoReflect.Descriptor instead.
func (*SynthesizeLongAudioResponse) ProtoMessage
func (*SynthesizeLongAudioResponse) ProtoMessage()
func (*SynthesizeLongAudioResponse) ProtoReflect
func (x *SynthesizeLongAudioResponse) ProtoReflect() protoreflect.Message
func (*SynthesizeLongAudioResponse) Reset
func (x *SynthesizeLongAudioResponse) Reset()
func (*SynthesizeLongAudioResponse) String
func (x *SynthesizeLongAudioResponse) String() string
SynthesizeSpeechRequest
type SynthesizeSpeechRequest struct {
Input *SynthesisInput `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
Voice *VoiceSelectionParams `protobuf:"bytes,2,opt,name=voice,proto3" json:"voice,omitempty"`
AudioConfig *AudioConfig `protobuf:"bytes,3,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"`
AdvancedVoiceOptions *AdvancedVoiceOptions "" /* 129 byte string literal not displayed */
}
The top-level message sent by the client for the SynthesizeSpeech
method.
func (*SynthesizeSpeechRequest) Descriptor
func (*SynthesizeSpeechRequest) Descriptor() ([]byte, []int)
Deprecated: Use SynthesizeSpeechRequest.ProtoReflect.Descriptor instead.
func (*SynthesizeSpeechRequest) GetAdvancedVoiceOptions
func (x *SynthesizeSpeechRequest) GetAdvancedVoiceOptions() *AdvancedVoiceOptions
func (*SynthesizeSpeechRequest) GetAudioConfig
func (x *SynthesizeSpeechRequest) GetAudioConfig() *AudioConfig
func (*SynthesizeSpeechRequest) GetInput
func (x *SynthesizeSpeechRequest) GetInput() *SynthesisInput
func (*SynthesizeSpeechRequest) GetVoice
func (x *SynthesizeSpeechRequest) GetVoice() *VoiceSelectionParams
func (*SynthesizeSpeechRequest) ProtoMessage
func (*SynthesizeSpeechRequest) ProtoMessage()
func (*SynthesizeSpeechRequest) ProtoReflect
func (x *SynthesizeSpeechRequest) ProtoReflect() protoreflect.Message
func (*SynthesizeSpeechRequest) Reset
func (x *SynthesizeSpeechRequest) Reset()
func (*SynthesizeSpeechRequest) String
func (x *SynthesizeSpeechRequest) String() string
SynthesizeSpeechResponse
type SynthesizeSpeechResponse struct {
// The audio data bytes encoded as specified in the request, including the
// header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).
// For LINEAR16 audio, we include the WAV header. Note: as
// with all bytes fields, protobuffers use a pure binary representation,
// whereas JSON representations use base64.
AudioContent []byte `protobuf:"bytes,1,opt,name=audio_content,json=audioContent,proto3" json:"audio_content,omitempty"`
// contains filtered or unexported fields
}
The message returned to the client by the SynthesizeSpeech
method.
func (*SynthesizeSpeechResponse) Descriptor
func (*SynthesizeSpeechResponse) Descriptor() ([]byte, []int)
Deprecated: Use SynthesizeSpeechResponse.ProtoReflect.Descriptor instead.
func (*SynthesizeSpeechResponse) GetAudioContent
func (x *SynthesizeSpeechResponse) GetAudioContent() []byte
func (*SynthesizeSpeechResponse) ProtoMessage
func (*SynthesizeSpeechResponse) ProtoMessage()
func (*SynthesizeSpeechResponse) ProtoReflect
func (x *SynthesizeSpeechResponse) ProtoReflect() protoreflect.Message
func (*SynthesizeSpeechResponse) Reset
func (x *SynthesizeSpeechResponse) Reset()
func (*SynthesizeSpeechResponse) String
func (x *SynthesizeSpeechResponse) String() string
TextToSpeechClient
type TextToSpeechClient interface {
// Returns a list of Voice supported for synthesis.
ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponse, error)
// Synthesizes speech synchronously: receive results after all text input
// has been processed.
SynthesizeSpeech(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error)
// Performs bidirectional streaming speech synthesis: receive audio while
// sending text.
StreamingSynthesize(ctx context.Context, opts ...grpc.CallOption) (TextToSpeech_StreamingSynthesizeClient, error)
}
TextToSpeechClient is the client API for TextToSpeech service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTextToSpeechClient
func NewTextToSpeechClient(cc grpc.ClientConnInterface) TextToSpeechClient
TextToSpeechLongAudioSynthesizeClient
type TextToSpeechLongAudioSynthesizeClient interface {
// Synthesizes long form text asynchronously.
SynthesizeLongAudio(ctx context.Context, in *SynthesizeLongAudioRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
}
TextToSpeechLongAudioSynthesizeClient is the client API for TextToSpeechLongAudioSynthesize service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTextToSpeechLongAudioSynthesizeClient
func NewTextToSpeechLongAudioSynthesizeClient(cc grpc.ClientConnInterface) TextToSpeechLongAudioSynthesizeClient
TextToSpeechLongAudioSynthesizeServer
type TextToSpeechLongAudioSynthesizeServer interface {
// Synthesizes long form text asynchronously.
SynthesizeLongAudio(context.Context, *SynthesizeLongAudioRequest) (*longrunningpb.Operation, error)
}
TextToSpeechLongAudioSynthesizeServer is the server API for TextToSpeechLongAudioSynthesize service.
TextToSpeechServer
type TextToSpeechServer interface {
// Returns a list of Voice supported for synthesis.
ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponse, error)
// Synthesizes speech synchronously: receive results after all text input
// has been processed.
SynthesizeSpeech(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error)
// Performs bidirectional streaming speech synthesis: receive audio while
// sending text.
StreamingSynthesize(TextToSpeech_StreamingSynthesizeServer) error
}
TextToSpeechServer is the server API for TextToSpeech service.
TextToSpeech_StreamingSynthesizeClient
type TextToSpeech_StreamingSynthesizeClient interface {
Send(*StreamingSynthesizeRequest) error
Recv() (*StreamingSynthesizeResponse, error)
grpc.ClientStream
}
TextToSpeech_StreamingSynthesizeServer
type TextToSpeech_StreamingSynthesizeServer interface {
Send(*StreamingSynthesizeResponse) error
Recv() (*StreamingSynthesizeRequest, error)
grpc.ServerStream
}
UnimplementedTextToSpeechLongAudioSynthesizeServer
type UnimplementedTextToSpeechLongAudioSynthesizeServer struct {
}
UnimplementedTextToSpeechLongAudioSynthesizeServer can be embedded to have forward compatible implementations.
func (*UnimplementedTextToSpeechLongAudioSynthesizeServer) SynthesizeLongAudio
func (*UnimplementedTextToSpeechLongAudioSynthesizeServer) SynthesizeLongAudio(context.Context, *SynthesizeLongAudioRequest) (*longrunningpb.Operation, error)
UnimplementedTextToSpeechServer
type UnimplementedTextToSpeechServer struct {
}
UnimplementedTextToSpeechServer can be embedded to have forward compatible implementations.
func (*UnimplementedTextToSpeechServer) ListVoices
func (*UnimplementedTextToSpeechServer) ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponse, error)
func (*UnimplementedTextToSpeechServer) StreamingSynthesize
func (*UnimplementedTextToSpeechServer) StreamingSynthesize(TextToSpeech_StreamingSynthesizeServer) error
func (*UnimplementedTextToSpeechServer) SynthesizeSpeech
func (*UnimplementedTextToSpeechServer) SynthesizeSpeech(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error)
Voice
type Voice struct {
LanguageCodes []string `protobuf:"bytes,1,rep,name=language_codes,json=languageCodes,proto3" json:"language_codes,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
SsmlGender SsmlVoiceGender "" /* 142 byte string literal not displayed */
NaturalSampleRateHertz int32 "" /* 132 byte string literal not displayed */
}
Description of a voice supported by the TTS service.
func (*Voice) Descriptor
Deprecated: Use Voice.ProtoReflect.Descriptor instead.
func (*Voice) GetLanguageCodes
func (*Voice) GetName
func (*Voice) GetNaturalSampleRateHertz
func (*Voice) GetSsmlGender
func (x *Voice) GetSsmlGender() SsmlVoiceGender
func (*Voice) ProtoMessage
func (*Voice) ProtoMessage()
func (*Voice) ProtoReflect
func (x *Voice) ProtoReflect() protoreflect.Message
func (*Voice) Reset
func (x *Voice) Reset()
func (*Voice) String
VoiceCloneParams
type VoiceCloneParams struct {
// Required. Created by GenerateVoiceCloningKey.
VoiceCloningKey string `protobuf:"bytes,1,opt,name=voice_cloning_key,json=voiceCloningKey,proto3" json:"voice_cloning_key,omitempty"`
// contains filtered or unexported fields
}
The configuration of Voice Clone feature.
func (*VoiceCloneParams) Descriptor
func (*VoiceCloneParams) Descriptor() ([]byte, []int)
Deprecated: Use VoiceCloneParams.ProtoReflect.Descriptor instead.
func (*VoiceCloneParams) GetVoiceCloningKey
func (x *VoiceCloneParams) GetVoiceCloningKey() string
func (*VoiceCloneParams) ProtoMessage
func (*VoiceCloneParams) ProtoMessage()
func (*VoiceCloneParams) ProtoReflect
func (x *VoiceCloneParams) ProtoReflect() protoreflect.Message
func (*VoiceCloneParams) Reset
func (x *VoiceCloneParams) Reset()
func (*VoiceCloneParams) String
func (x *VoiceCloneParams) String() string
VoiceSelectionParams
type VoiceSelectionParams struct {
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
SsmlGender SsmlVoiceGender "" /* 142 byte string literal not displayed */
CustomVoice *CustomVoiceParams `protobuf:"bytes,4,opt,name=custom_voice,json=customVoice,proto3" json:"custom_voice,omitempty"`
VoiceClone *VoiceCloneParams `protobuf:"bytes,5,opt,name=voice_clone,json=voiceClone,proto3" json:"voice_clone,omitempty"`
}
Description of which voice to use for a synthesis request.
func (*VoiceSelectionParams) Descriptor
func (*VoiceSelectionParams) Descriptor() ([]byte, []int)
Deprecated: Use VoiceSelectionParams.ProtoReflect.Descriptor instead.
func (*VoiceSelectionParams) GetCustomVoice
func (x *VoiceSelectionParams) GetCustomVoice() *CustomVoiceParams
func (*VoiceSelectionParams) GetLanguageCode
func (x *VoiceSelectionParams) GetLanguageCode() string
func (*VoiceSelectionParams) GetName
func (x *VoiceSelectionParams) GetName() string
func (*VoiceSelectionParams) GetSsmlGender
func (x *VoiceSelectionParams) GetSsmlGender() SsmlVoiceGender
func (*VoiceSelectionParams) GetVoiceClone
func (x *VoiceSelectionParams) GetVoiceClone() *VoiceCloneParams
func (*VoiceSelectionParams) ProtoMessage
func (*VoiceSelectionParams) ProtoMessage()
func (*VoiceSelectionParams) ProtoReflect
func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message
func (*VoiceSelectionParams) Reset
func (x *VoiceSelectionParams) Reset()
func (*VoiceSelectionParams) String
func (x *VoiceSelectionParams) String() string