tts

package
v0.0.0-...-5fa7aab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Synthesizer_UtteranceSynthesis_FullMethodName = "/speechkit.tts.v3.Synthesizer/UtteranceSynthesis"
)

Variables

View Source
var (
	RawAudio_AudioEncoding_name = map[int32]string{
		0: "AUDIO_ENCODING_UNSPECIFIED",
		1: "LINEAR16_PCM",
	}
	RawAudio_AudioEncoding_value = map[string]int32{
		"AUDIO_ENCODING_UNSPECIFIED": 0,
		"LINEAR16_PCM":               1,
	}
)

Enum value maps for RawAudio_AudioEncoding.

View Source
var (
	ContainerAudio_ContainerAudioType_name = map[int32]string{
		0: "CONTAINER_AUDIO_TYPE_UNSPECIFIED",
		1: "WAV",
		2: "OGG_OPUS",
		3: "MP3",
	}
	ContainerAudio_ContainerAudioType_value = map[string]int32{
		"CONTAINER_AUDIO_TYPE_UNSPECIFIED": 0,
		"WAV":                              1,
		"OGG_OPUS":                         2,
		"MP3":                              3,
	}
)

Enum value maps for ContainerAudio_ContainerAudioType.

View Source
var (
	DurationHint_DurationHintPolicy_name = map[int32]string{
		0: "DURATION_HINT_POLICY_UNSPECIFIED",
		1: "EXACT_DURATION",
		2: "MIN_DURATION",
		3: "MAX_DURATION",
	}
	DurationHint_DurationHintPolicy_value = map[string]int32{
		"DURATION_HINT_POLICY_UNSPECIFIED": 0,
		"EXACT_DURATION":                   1,
		"MIN_DURATION":                     2,
		"MAX_DURATION":                     3,
	}
)

Enum value maps for DurationHint_DurationHintPolicy.

View Source
var (
	UtteranceSynthesisRequest_LoudnessNormalizationType_name = map[int32]string{
		0: "LOUDNESS_NORMALIZATION_TYPE_UNSPECIFIED",
		1: "MAX_PEAK",
		2: "LUFS",
	}
	UtteranceSynthesisRequest_LoudnessNormalizationType_value = map[string]int32{
		"LOUDNESS_NORMALIZATION_TYPE_UNSPECIFIED": 0,
		"MAX_PEAK": 1,
		"LUFS":     2,
	}
)

Enum value maps for UtteranceSynthesisRequest_LoudnessNormalizationType.

View Source
var File_yandex_cloud_ai_tts_v3_tts_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_tts_v3_tts_service_proto protoreflect.FileDescriptor
View Source
var Synthesizer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "speechkit.tts.v3.Synthesizer",
	HandlerType: (*SynthesizerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "UtteranceSynthesis",
			Handler:       _Synthesizer_UtteranceSynthesis_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "yandex/cloud/ai/tts/v3/tts_service.proto",
}

Synthesizer_ServiceDesc is the grpc.ServiceDesc for Synthesizer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSynthesizerServer

func RegisterSynthesizerServer(s grpc.ServiceRegistrar, srv SynthesizerServer)

Types

type AudioChunk

type AudioChunk struct {

	// Sequence of bytes of the synthesized audio in format specified in output_audio_spec.
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*AudioChunk) Descriptor deprecated

func (*AudioChunk) Descriptor() ([]byte, []int)

Deprecated: Use AudioChunk.ProtoReflect.Descriptor instead.

func (*AudioChunk) GetData

func (x *AudioChunk) GetData() []byte

func (*AudioChunk) ProtoMessage

func (*AudioChunk) ProtoMessage()

func (*AudioChunk) ProtoReflect

func (x *AudioChunk) ProtoReflect() protoreflect.Message

func (*AudioChunk) Reset

func (x *AudioChunk) Reset()

func (*AudioChunk) SetData

func (m *AudioChunk) SetData(v []byte)

func (*AudioChunk) String

func (x *AudioChunk) String() string

type AudioContent

type AudioContent struct {

	// The audio source to read the data from.
	//
	// Types that are assignable to AudioSource:
	//
	//	*AudioContent_Content
	AudioSource isAudioContent_AudioSource `protobuf_oneof:"AudioSource"`
	// Description of the audio format.
	AudioSpec *AudioFormatOptions `protobuf:"bytes,2,opt,name=audio_spec,json=audioSpec,proto3" json:"audio_spec,omitempty"`
	// contains filtered or unexported fields
}

func (*AudioContent) Descriptor deprecated

func (*AudioContent) Descriptor() ([]byte, []int)

Deprecated: Use AudioContent.ProtoReflect.Descriptor instead.

func (*AudioContent) GetAudioSource

func (m *AudioContent) GetAudioSource() isAudioContent_AudioSource

func (*AudioContent) GetAudioSpec

func (x *AudioContent) GetAudioSpec() *AudioFormatOptions

func (*AudioContent) GetContent

func (x *AudioContent) GetContent() []byte

func (*AudioContent) ProtoMessage

func (*AudioContent) ProtoMessage()

func (*AudioContent) ProtoReflect

func (x *AudioContent) ProtoReflect() protoreflect.Message

func (*AudioContent) Reset

func (x *AudioContent) Reset()

func (*AudioContent) SetAudioSource

func (m *AudioContent) SetAudioSource(v AudioContent_AudioSource)

func (*AudioContent) SetAudioSpec

func (m *AudioContent) SetAudioSpec(v *AudioFormatOptions)

func (*AudioContent) SetContent

func (m *AudioContent) SetContent(v []byte)

func (*AudioContent) String

func (x *AudioContent) String() string

type AudioContent_AudioSource

type AudioContent_AudioSource = isAudioContent_AudioSource

type AudioContent_Content

type AudioContent_Content struct {
	// Bytes with audio data.
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3,oneof"`
}

type AudioFormatOptions

type AudioFormatOptions struct {

	// Types that are assignable to AudioFormat:
	//
	//	*AudioFormatOptions_RawAudio
	//	*AudioFormatOptions_ContainerAudio
	AudioFormat isAudioFormatOptions_AudioFormat `protobuf_oneof:"AudioFormat"`
	// contains filtered or unexported fields
}

func (*AudioFormatOptions) Descriptor deprecated

func (*AudioFormatOptions) Descriptor() ([]byte, []int)

Deprecated: Use AudioFormatOptions.ProtoReflect.Descriptor instead.

func (*AudioFormatOptions) GetAudioFormat

func (m *AudioFormatOptions) GetAudioFormat() isAudioFormatOptions_AudioFormat

func (*AudioFormatOptions) GetContainerAudio

func (x *AudioFormatOptions) GetContainerAudio() *ContainerAudio

func (*AudioFormatOptions) GetRawAudio

func (x *AudioFormatOptions) GetRawAudio() *RawAudio

func (*AudioFormatOptions) ProtoMessage

func (*AudioFormatOptions) ProtoMessage()

func (*AudioFormatOptions) ProtoReflect

func (x *AudioFormatOptions) ProtoReflect() protoreflect.Message

func (*AudioFormatOptions) Reset

func (x *AudioFormatOptions) Reset()

func (*AudioFormatOptions) SetAudioFormat

func (*AudioFormatOptions) SetContainerAudio

func (m *AudioFormatOptions) SetContainerAudio(v *ContainerAudio)

func (*AudioFormatOptions) SetRawAudio

func (m *AudioFormatOptions) SetRawAudio(v *RawAudio)

func (*AudioFormatOptions) String

func (x *AudioFormatOptions) String() string

type AudioFormatOptions_AudioFormat

type AudioFormatOptions_AudioFormat = isAudioFormatOptions_AudioFormat

type AudioFormatOptions_ContainerAudio

type AudioFormatOptions_ContainerAudio struct {
	// The audio format specified inside the container metadata.
	ContainerAudio *ContainerAudio `protobuf:"bytes,2,opt,name=container_audio,json=containerAudio,proto3,oneof"`
}

type AudioFormatOptions_RawAudio

type AudioFormatOptions_RawAudio struct {
	// The audio format specified in request parameters.
	RawAudio *RawAudio `protobuf:"bytes,1,opt,name=raw_audio,json=rawAudio,proto3,oneof"`
}

type AudioTemplate

type AudioTemplate struct {

	// Audio file.
	Audio *AudioContent `protobuf:"bytes,1,opt,name=audio,proto3" json:"audio,omitempty"`
	// Template and description of its variables.
	TextTemplate *TextTemplate `protobuf:"bytes,2,opt,name=text_template,json=textTemplate,proto3" json:"text_template,omitempty"`
	// Describing variables in audio.
	Variables []*AudioVariable `protobuf:"bytes,3,rep,name=variables,proto3" json:"variables,omitempty"`
	// contains filtered or unexported fields
}

func (*AudioTemplate) Descriptor deprecated

func (*AudioTemplate) Descriptor() ([]byte, []int)

Deprecated: Use AudioTemplate.ProtoReflect.Descriptor instead.

func (*AudioTemplate) GetAudio

func (x *AudioTemplate) GetAudio() *AudioContent

func (*AudioTemplate) GetTextTemplate

func (x *AudioTemplate) GetTextTemplate() *TextTemplate

func (*AudioTemplate) GetVariables

func (x *AudioTemplate) GetVariables() []*AudioVariable

func (*AudioTemplate) ProtoMessage

func (*AudioTemplate) ProtoMessage()

func (*AudioTemplate) ProtoReflect

func (x *AudioTemplate) ProtoReflect() protoreflect.Message

func (*AudioTemplate) Reset

func (x *AudioTemplate) Reset()

func (*AudioTemplate) SetAudio

func (m *AudioTemplate) SetAudio(v *AudioContent)

func (*AudioTemplate) SetTextTemplate

func (m *AudioTemplate) SetTextTemplate(v *TextTemplate)

func (*AudioTemplate) SetVariables

func (m *AudioTemplate) SetVariables(v []*AudioVariable)

func (*AudioTemplate) String

func (x *AudioTemplate) String() string

type AudioVariable

type AudioVariable struct {

	// The name of the variable.
	VariableName string `protobuf:"bytes,1,opt,name=variable_name,json=variableName,proto3" json:"variable_name,omitempty"`
	// Start time of the variable in milliseconds.
	VariableStartMs int64 `protobuf:"varint,2,opt,name=variable_start_ms,json=variableStartMs,proto3" json:"variable_start_ms,omitempty"`
	// Length of the variable in milliseconds.
	VariableLengthMs int64 `protobuf:"varint,3,opt,name=variable_length_ms,json=variableLengthMs,proto3" json:"variable_length_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*AudioVariable) Descriptor deprecated

func (*AudioVariable) Descriptor() ([]byte, []int)

Deprecated: Use AudioVariable.ProtoReflect.Descriptor instead.

func (*AudioVariable) GetVariableLengthMs

func (x *AudioVariable) GetVariableLengthMs() int64

func (*AudioVariable) GetVariableName

func (x *AudioVariable) GetVariableName() string

func (*AudioVariable) GetVariableStartMs

func (x *AudioVariable) GetVariableStartMs() int64

func (*AudioVariable) ProtoMessage

func (*AudioVariable) ProtoMessage()

func (*AudioVariable) ProtoReflect

func (x *AudioVariable) ProtoReflect() protoreflect.Message

func (*AudioVariable) Reset

func (x *AudioVariable) Reset()

func (*AudioVariable) SetVariableLengthMs

func (m *AudioVariable) SetVariableLengthMs(v int64)

func (*AudioVariable) SetVariableName

func (m *AudioVariable) SetVariableName(v string)

func (*AudioVariable) SetVariableStartMs

func (m *AudioVariable) SetVariableStartMs(v int64)

func (*AudioVariable) String

func (x *AudioVariable) String() string

type ContainerAudio

type ContainerAudio struct {
	ContainerAudioType ContainerAudio_ContainerAudioType `` /* 174-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ContainerAudio) Descriptor deprecated

func (*ContainerAudio) Descriptor() ([]byte, []int)

Deprecated: Use ContainerAudio.ProtoReflect.Descriptor instead.

func (*ContainerAudio) GetContainerAudioType

func (x *ContainerAudio) GetContainerAudioType() ContainerAudio_ContainerAudioType

func (*ContainerAudio) ProtoMessage

func (*ContainerAudio) ProtoMessage()

func (*ContainerAudio) ProtoReflect

func (x *ContainerAudio) ProtoReflect() protoreflect.Message

func (*ContainerAudio) Reset

func (x *ContainerAudio) Reset()

func (*ContainerAudio) SetContainerAudioType

func (m *ContainerAudio) SetContainerAudioType(v ContainerAudio_ContainerAudioType)

func (*ContainerAudio) String

func (x *ContainerAudio) String() string

type ContainerAudio_ContainerAudioType

type ContainerAudio_ContainerAudioType int32
const (
	ContainerAudio_CONTAINER_AUDIO_TYPE_UNSPECIFIED ContainerAudio_ContainerAudioType = 0
	// Audio bit depth 16-bit signed little-endian (Linear PCM).
	ContainerAudio_WAV ContainerAudio_ContainerAudioType = 1
	// Data is encoded using the OPUS audio codec and compressed using the OGG container format.
	ContainerAudio_OGG_OPUS ContainerAudio_ContainerAudioType = 2
	// Data is encoded using MPEG-1/2 Layer III and compressed using the MP3 container format.
	ContainerAudio_MP3 ContainerAudio_ContainerAudioType = 3
)

func (ContainerAudio_ContainerAudioType) Descriptor

func (ContainerAudio_ContainerAudioType) Enum

func (ContainerAudio_ContainerAudioType) EnumDescriptor deprecated

func (ContainerAudio_ContainerAudioType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ContainerAudio_ContainerAudioType.Descriptor instead.

func (ContainerAudio_ContainerAudioType) Number

func (ContainerAudio_ContainerAudioType) String

func (ContainerAudio_ContainerAudioType) Type

type DurationHint

type DurationHint struct {

	// Type of duration constraint.
	Policy DurationHint_DurationHintPolicy `protobuf:"varint,1,opt,name=policy,proto3,enum=speechkit.tts.v3.DurationHint_DurationHintPolicy" json:"policy,omitempty"`
	// Constraint on audio duration in milliseconds.
	DurationMs int64 `protobuf:"varint,2,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*DurationHint) Descriptor deprecated

func (*DurationHint) Descriptor() ([]byte, []int)

Deprecated: Use DurationHint.ProtoReflect.Descriptor instead.

func (*DurationHint) GetDurationMs

func (x *DurationHint) GetDurationMs() int64

func (*DurationHint) GetPolicy

func (*DurationHint) ProtoMessage

func (*DurationHint) ProtoMessage()

func (*DurationHint) ProtoReflect

func (x *DurationHint) ProtoReflect() protoreflect.Message

func (*DurationHint) Reset

func (x *DurationHint) Reset()

func (*DurationHint) SetDurationMs

func (m *DurationHint) SetDurationMs(v int64)

func (*DurationHint) SetPolicy

func (*DurationHint) String

func (x *DurationHint) String() string

type DurationHint_DurationHintPolicy

type DurationHint_DurationHintPolicy int32
const (
	DurationHint_DURATION_HINT_POLICY_UNSPECIFIED DurationHint_DurationHintPolicy = 0
	// Limit audio duration to exact value.
	DurationHint_EXACT_DURATION DurationHint_DurationHintPolicy = 1
	// Limit the minimum audio duration.
	DurationHint_MIN_DURATION DurationHint_DurationHintPolicy = 2
	// Limit the maximum audio duration.
	DurationHint_MAX_DURATION DurationHint_DurationHintPolicy = 3
)

func (DurationHint_DurationHintPolicy) Descriptor

func (DurationHint_DurationHintPolicy) Enum

func (DurationHint_DurationHintPolicy) EnumDescriptor deprecated

func (DurationHint_DurationHintPolicy) EnumDescriptor() ([]byte, []int)

Deprecated: Use DurationHint_DurationHintPolicy.Descriptor instead.

func (DurationHint_DurationHintPolicy) Number

func (DurationHint_DurationHintPolicy) String

func (DurationHint_DurationHintPolicy) Type

type Hints

type Hints struct {

	// The hint for TTS engine to specify synthesised audio characteristics.
	//
	// Types that are assignable to Hint:
	//
	//	*Hints_Voice
	//	*Hints_AudioTemplate
	//	*Hints_Speed
	//	*Hints_Volume
	//	*Hints_Role
	//	*Hints_PitchShift
	//	*Hints_Duration
	Hint isHints_Hint `protobuf_oneof:"Hint"`
	// contains filtered or unexported fields
}

func (*Hints) Descriptor deprecated

func (*Hints) Descriptor() ([]byte, []int)

Deprecated: Use Hints.ProtoReflect.Descriptor instead.

func (*Hints) GetAudioTemplate

func (x *Hints) GetAudioTemplate() *AudioTemplate

func (*Hints) GetDuration

func (x *Hints) GetDuration() *DurationHint

func (*Hints) GetHint

func (m *Hints) GetHint() isHints_Hint

func (*Hints) GetPitchShift

func (x *Hints) GetPitchShift() float64

func (*Hints) GetRole

func (x *Hints) GetRole() string

func (*Hints) GetSpeed

func (x *Hints) GetSpeed() float64

func (*Hints) GetVoice

func (x *Hints) GetVoice() string

func (*Hints) GetVolume

func (x *Hints) GetVolume() float64

func (*Hints) ProtoMessage

func (*Hints) ProtoMessage()

func (*Hints) ProtoReflect

func (x *Hints) ProtoReflect() protoreflect.Message

func (*Hints) Reset

func (x *Hints) Reset()

func (*Hints) SetAudioTemplate

func (m *Hints) SetAudioTemplate(v *AudioTemplate)

func (*Hints) SetDuration

func (m *Hints) SetDuration(v *DurationHint)

func (*Hints) SetHint

func (m *Hints) SetHint(v Hints_Hint)

func (*Hints) SetPitchShift

func (m *Hints) SetPitchShift(v float64)

func (*Hints) SetRole

func (m *Hints) SetRole(v string)

func (*Hints) SetSpeed

func (m *Hints) SetSpeed(v float64)

func (*Hints) SetVoice

func (m *Hints) SetVoice(v string)

func (*Hints) SetVolume

func (m *Hints) SetVolume(v float64)

func (*Hints) String

func (x *Hints) String() string

type Hints_AudioTemplate

type Hints_AudioTemplate struct {
	// Template for synthesizing.
	AudioTemplate *AudioTemplate `protobuf:"bytes,2,opt,name=audio_template,json=audioTemplate,proto3,oneof"`
}

type Hints_Duration

type Hints_Duration struct {
	// Hint to limit both minimum and maximum audio duration.
	Duration *DurationHint `protobuf:"bytes,7,opt,name=duration,proto3,oneof"`
}

type Hints_Hint

type Hints_Hint = isHints_Hint

type Hints_PitchShift

type Hints_PitchShift struct {
	// Hint to increase (or decrease) speaker's pitch, measured in Hz. Valid values are in range [-1000;1000], default value is 0.
	PitchShift float64 `protobuf:"fixed64,6,opt,name=pitch_shift,json=pitchShift,proto3,oneof"`
}

type Hints_Role

type Hints_Role struct {
	// Hint to specify pronunciation character for the speaker.
	Role string `protobuf:"bytes,5,opt,name=role,proto3,oneof"`
}

type Hints_Speed

type Hints_Speed struct {
	// Hint to change speed.
	Speed float64 `protobuf:"fixed64,3,opt,name=speed,proto3,oneof"`
}

type Hints_Voice

type Hints_Voice struct {
	// Name of speaker to use.
	Voice string `protobuf:"bytes,1,opt,name=voice,proto3,oneof"`
}

type Hints_Volume

type Hints_Volume struct {
	// Hint to regulate normalization level.
	// * For `MAX_PEAK` loudness_normalization_type: volume changes in a range (0;1], default value is 0.7.
	// * For `LUFS` loudness_normalization_type: volume changes in a range [-145;0), default value is -19.
	Volume float64 `protobuf:"fixed64,4,opt,name=volume,proto3,oneof"`
}

type RawAudio

type RawAudio struct {

	// Encoding type.
	AudioEncoding RawAudio_AudioEncoding `` /* 146-byte string literal not displayed */
	// Sampling frequency of the signal.
	SampleRateHertz int64 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"`
	// contains filtered or unexported fields
}

func (*RawAudio) Descriptor deprecated

func (*RawAudio) Descriptor() ([]byte, []int)

Deprecated: Use RawAudio.ProtoReflect.Descriptor instead.

func (*RawAudio) GetAudioEncoding

func (x *RawAudio) GetAudioEncoding() RawAudio_AudioEncoding

func (*RawAudio) GetSampleRateHertz

func (x *RawAudio) GetSampleRateHertz() int64

func (*RawAudio) ProtoMessage

func (*RawAudio) ProtoMessage()

func (*RawAudio) ProtoReflect

func (x *RawAudio) ProtoReflect() protoreflect.Message

func (*RawAudio) Reset

func (x *RawAudio) Reset()

func (*RawAudio) SetAudioEncoding

func (m *RawAudio) SetAudioEncoding(v RawAudio_AudioEncoding)

func (*RawAudio) SetSampleRateHertz

func (m *RawAudio) SetSampleRateHertz(v int64)

func (*RawAudio) String

func (x *RawAudio) String() string

type RawAudio_AudioEncoding

type RawAudio_AudioEncoding int32
const (
	RawAudio_AUDIO_ENCODING_UNSPECIFIED RawAudio_AudioEncoding = 0
	// Audio bit depth 16-bit signed little-endian (Linear PCM).
	RawAudio_LINEAR16_PCM RawAudio_AudioEncoding = 1
)

func (RawAudio_AudioEncoding) Descriptor

func (RawAudio_AudioEncoding) Enum

func (RawAudio_AudioEncoding) EnumDescriptor deprecated

func (RawAudio_AudioEncoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use RawAudio_AudioEncoding.Descriptor instead.

func (RawAudio_AudioEncoding) Number

func (RawAudio_AudioEncoding) String

func (x RawAudio_AudioEncoding) String() string

func (RawAudio_AudioEncoding) Type

type SynthesizerClient

type SynthesizerClient interface {
	// Synthesizing text into speech.
	UtteranceSynthesis(ctx context.Context, in *UtteranceSynthesisRequest, opts ...grpc.CallOption) (Synthesizer_UtteranceSynthesisClient, error)
}

SynthesizerClient is the client API for Synthesizer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type SynthesizerServer

type SynthesizerServer interface {
	// Synthesizing text into speech.
	UtteranceSynthesis(*UtteranceSynthesisRequest, Synthesizer_UtteranceSynthesisServer) error
}

SynthesizerServer is the server API for Synthesizer service. All implementations should embed UnimplementedSynthesizerServer for forward compatibility

type Synthesizer_UtteranceSynthesisClient

type Synthesizer_UtteranceSynthesisClient interface {
	Recv() (*UtteranceSynthesisResponse, error)
	grpc.ClientStream
}

type Synthesizer_UtteranceSynthesisServer

type Synthesizer_UtteranceSynthesisServer interface {
	Send(*UtteranceSynthesisResponse) error
	grpc.ServerStream
}

type TextChunk

type TextChunk struct {

	// Synthesized text.
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*TextChunk) Descriptor deprecated

func (*TextChunk) Descriptor() ([]byte, []int)

Deprecated: Use TextChunk.ProtoReflect.Descriptor instead.

func (*TextChunk) GetText

func (x *TextChunk) GetText() string

func (*TextChunk) ProtoMessage

func (*TextChunk) ProtoMessage()

func (*TextChunk) ProtoReflect

func (x *TextChunk) ProtoReflect() protoreflect.Message

func (*TextChunk) Reset

func (x *TextChunk) Reset()

func (*TextChunk) SetText

func (m *TextChunk) SetText(v string)

func (*TextChunk) String

func (x *TextChunk) String() string

type TextTemplate

type TextTemplate struct {

	// Template text.
	//
	// Sample:`The {animal} goes to the {place}.`
	TextTemplate string `protobuf:"bytes,1,opt,name=text_template,json=textTemplate,proto3" json:"text_template,omitempty"`
	// Defining variables in template text.
	//
	// Sample: `{animal: cat, place: forest}`
	Variables []*TextVariable `protobuf:"bytes,2,rep,name=variables,proto3" json:"variables,omitempty"`
	// contains filtered or unexported fields
}

func (*TextTemplate) Descriptor deprecated

func (*TextTemplate) Descriptor() ([]byte, []int)

Deprecated: Use TextTemplate.ProtoReflect.Descriptor instead.

func (*TextTemplate) GetTextTemplate

func (x *TextTemplate) GetTextTemplate() string

func (*TextTemplate) GetVariables

func (x *TextTemplate) GetVariables() []*TextVariable

func (*TextTemplate) ProtoMessage

func (*TextTemplate) ProtoMessage()

func (*TextTemplate) ProtoReflect

func (x *TextTemplate) ProtoReflect() protoreflect.Message

func (*TextTemplate) Reset

func (x *TextTemplate) Reset()

func (*TextTemplate) SetTextTemplate

func (m *TextTemplate) SetTextTemplate(v string)

func (*TextTemplate) SetVariables

func (m *TextTemplate) SetVariables(v []*TextVariable)

func (*TextTemplate) String

func (x *TextTemplate) String() string

type TextVariable

type TextVariable struct {

	// The name of the variable.
	VariableName string `protobuf:"bytes,1,opt,name=variable_name,json=variableName,proto3" json:"variable_name,omitempty"`
	// The text of the variable.
	VariableValue string `protobuf:"bytes,2,opt,name=variable_value,json=variableValue,proto3" json:"variable_value,omitempty"`
	// contains filtered or unexported fields
}

func (*TextVariable) Descriptor deprecated

func (*TextVariable) Descriptor() ([]byte, []int)

Deprecated: Use TextVariable.ProtoReflect.Descriptor instead.

func (*TextVariable) GetVariableName

func (x *TextVariable) GetVariableName() string

func (*TextVariable) GetVariableValue

func (x *TextVariable) GetVariableValue() string

func (*TextVariable) ProtoMessage

func (*TextVariable) ProtoMessage()

func (*TextVariable) ProtoReflect

func (x *TextVariable) ProtoReflect() protoreflect.Message

func (*TextVariable) Reset

func (x *TextVariable) Reset()

func (*TextVariable) SetVariableName

func (m *TextVariable) SetVariableName(v string)

func (*TextVariable) SetVariableValue

func (m *TextVariable) SetVariableValue(v string)

func (*TextVariable) String

func (x *TextVariable) String() string

type UnimplementedSynthesizerServer

type UnimplementedSynthesizerServer struct {
}

UnimplementedSynthesizerServer should be embedded to have forward compatible implementations.

type UnsafeSynthesizerServer

type UnsafeSynthesizerServer interface {
	// contains filtered or unexported methods
}

UnsafeSynthesizerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SynthesizerServer will result in compilation errors.

type UtteranceSynthesisRequest

type UtteranceSynthesisRequest struct {

	// The name of the model.
	// Specifies basic synthesis functionality. Currently should be empty. Do not use it.
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Text to synthesis, one of text synthesis markups.
	//
	// Types that are assignable to Utterance:
	//
	//	*UtteranceSynthesisRequest_Text
	//	*UtteranceSynthesisRequest_TextTemplate
	Utterance isUtteranceSynthesisRequest_Utterance `protobuf_oneof:"Utterance"`
	// Optional hints for synthesis.
	Hints []*Hints `protobuf:"bytes,4,rep,name=hints,proto3" json:"hints,omitempty"`
	// Optional. Default: 22050 Hz, linear 16-bit signed little-endian PCM, with WAV header
	OutputAudioSpec *AudioFormatOptions `protobuf:"bytes,5,opt,name=output_audio_spec,json=outputAudioSpec,proto3" json:"output_audio_spec,omitempty"`
	// Specifies type of loudness normalization.
	// Optional. Default: `LUFS`.
	LoudnessNormalizationType UtteranceSynthesisRequest_LoudnessNormalizationType `` /* 213-byte string literal not displayed */
	// Optional. Automatically split long text to several utterances and bill accordingly. Some degradation in service quality is possible.
	UnsafeMode bool `protobuf:"varint,7,opt,name=unsafe_mode,json=unsafeMode,proto3" json:"unsafe_mode,omitempty"`
	// contains filtered or unexported fields
}

func (*UtteranceSynthesisRequest) Descriptor deprecated

func (*UtteranceSynthesisRequest) Descriptor() ([]byte, []int)

Deprecated: Use UtteranceSynthesisRequest.ProtoReflect.Descriptor instead.

func (*UtteranceSynthesisRequest) GetHints

func (x *UtteranceSynthesisRequest) GetHints() []*Hints

func (*UtteranceSynthesisRequest) GetLoudnessNormalizationType

func (*UtteranceSynthesisRequest) GetModel

func (x *UtteranceSynthesisRequest) GetModel() string

func (*UtteranceSynthesisRequest) GetOutputAudioSpec

func (x *UtteranceSynthesisRequest) GetOutputAudioSpec() *AudioFormatOptions

func (*UtteranceSynthesisRequest) GetText

func (x *UtteranceSynthesisRequest) GetText() string

func (*UtteranceSynthesisRequest) GetTextTemplate

func (x *UtteranceSynthesisRequest) GetTextTemplate() *TextTemplate

func (*UtteranceSynthesisRequest) GetUnsafeMode

func (x *UtteranceSynthesisRequest) GetUnsafeMode() bool

func (*UtteranceSynthesisRequest) GetUtterance

func (m *UtteranceSynthesisRequest) GetUtterance() isUtteranceSynthesisRequest_Utterance

func (*UtteranceSynthesisRequest) ProtoMessage

func (*UtteranceSynthesisRequest) ProtoMessage()

func (*UtteranceSynthesisRequest) ProtoReflect

func (*UtteranceSynthesisRequest) Reset

func (x *UtteranceSynthesisRequest) Reset()

func (*UtteranceSynthesisRequest) SetHints

func (m *UtteranceSynthesisRequest) SetHints(v []*Hints)

func (*UtteranceSynthesisRequest) SetLoudnessNormalizationType

func (*UtteranceSynthesisRequest) SetModel

func (m *UtteranceSynthesisRequest) SetModel(v string)

func (*UtteranceSynthesisRequest) SetOutputAudioSpec

func (m *UtteranceSynthesisRequest) SetOutputAudioSpec(v *AudioFormatOptions)

func (*UtteranceSynthesisRequest) SetText

func (m *UtteranceSynthesisRequest) SetText(v string)

func (*UtteranceSynthesisRequest) SetTextTemplate

func (m *UtteranceSynthesisRequest) SetTextTemplate(v *TextTemplate)

func (*UtteranceSynthesisRequest) SetUnsafeMode

func (m *UtteranceSynthesisRequest) SetUnsafeMode(v bool)

func (*UtteranceSynthesisRequest) SetUtterance

func (*UtteranceSynthesisRequest) String

func (x *UtteranceSynthesisRequest) String() string

type UtteranceSynthesisRequest_LoudnessNormalizationType

type UtteranceSynthesisRequest_LoudnessNormalizationType int32
const (
	UtteranceSynthesisRequest_LOUDNESS_NORMALIZATION_TYPE_UNSPECIFIED UtteranceSynthesisRequest_LoudnessNormalizationType = 0
	// The type of normalization, wherein the gain is changed to bring the highest PCM sample value or analog signal peak to a given level.
	UtteranceSynthesisRequest_MAX_PEAK UtteranceSynthesisRequest_LoudnessNormalizationType = 1
	// The type of normalization based on EBU R 128 recommendation.
	UtteranceSynthesisRequest_LUFS UtteranceSynthesisRequest_LoudnessNormalizationType = 2
)

func (UtteranceSynthesisRequest_LoudnessNormalizationType) Descriptor

func (UtteranceSynthesisRequest_LoudnessNormalizationType) Enum

func (UtteranceSynthesisRequest_LoudnessNormalizationType) EnumDescriptor deprecated

Deprecated: Use UtteranceSynthesisRequest_LoudnessNormalizationType.Descriptor instead.

func (UtteranceSynthesisRequest_LoudnessNormalizationType) Number

func (UtteranceSynthesisRequest_LoudnessNormalizationType) String

func (UtteranceSynthesisRequest_LoudnessNormalizationType) Type

type UtteranceSynthesisRequest_Text

type UtteranceSynthesisRequest_Text struct {
	// Raw text (e.g. "Hello, Alice").
	Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}

type UtteranceSynthesisRequest_TextTemplate

type UtteranceSynthesisRequest_TextTemplate struct {
	// Text template instance, e.g. `{"Hello, {username}" with username="Alice"}`.
	TextTemplate *TextTemplate `protobuf:"bytes,3,opt,name=text_template,json=textTemplate,proto3,oneof"`
}

type UtteranceSynthesisRequest_Utterance

type UtteranceSynthesisRequest_Utterance = isUtteranceSynthesisRequest_Utterance

type UtteranceSynthesisResponse

type UtteranceSynthesisResponse struct {

	// Part of synthesized audio.
	AudioChunk *AudioChunk `protobuf:"bytes,1,opt,name=audio_chunk,json=audioChunk,proto3" json:"audio_chunk,omitempty"`
	// Part of synthesized text.
	TextChunk *TextChunk `protobuf:"bytes,2,opt,name=text_chunk,json=textChunk,proto3" json:"text_chunk,omitempty"`
	// Start time of the audio chunk in milliseconds.
	StartMs int64 `protobuf:"varint,3,opt,name=start_ms,json=startMs,proto3" json:"start_ms,omitempty"`
	// Length of the audio chunk in milliseconds.
	LengthMs int64 `protobuf:"varint,4,opt,name=length_ms,json=lengthMs,proto3" json:"length_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*UtteranceSynthesisResponse) Descriptor deprecated

func (*UtteranceSynthesisResponse) Descriptor() ([]byte, []int)

Deprecated: Use UtteranceSynthesisResponse.ProtoReflect.Descriptor instead.

func (*UtteranceSynthesisResponse) GetAudioChunk

func (x *UtteranceSynthesisResponse) GetAudioChunk() *AudioChunk

func (*UtteranceSynthesisResponse) GetLengthMs

func (x *UtteranceSynthesisResponse) GetLengthMs() int64

func (*UtteranceSynthesisResponse) GetStartMs

func (x *UtteranceSynthesisResponse) GetStartMs() int64

func (*UtteranceSynthesisResponse) GetTextChunk

func (x *UtteranceSynthesisResponse) GetTextChunk() *TextChunk

func (*UtteranceSynthesisResponse) ProtoMessage

func (*UtteranceSynthesisResponse) ProtoMessage()

func (*UtteranceSynthesisResponse) ProtoReflect

func (*UtteranceSynthesisResponse) Reset

func (x *UtteranceSynthesisResponse) Reset()

func (*UtteranceSynthesisResponse) SetAudioChunk

func (m *UtteranceSynthesisResponse) SetAudioChunk(v *AudioChunk)

func (*UtteranceSynthesisResponse) SetLengthMs

func (m *UtteranceSynthesisResponse) SetLengthMs(v int64)

func (*UtteranceSynthesisResponse) SetStartMs

func (m *UtteranceSynthesisResponse) SetStartMs(v int64)

func (*UtteranceSynthesisResponse) SetTextChunk

func (m *UtteranceSynthesisResponse) SetTextChunk(v *TextChunk)

func (*UtteranceSynthesisResponse) String

func (x *UtteranceSynthesisResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL