Documentation
¶
Index ¶
- Variables
- func RegisterTextToSpeechServer(s *grpc.Server, srv TextToSpeechServer)
- type AudioConfig
- func (*AudioConfig) Descriptor() ([]byte, []int)deprecated
- func (x *AudioConfig) GetAudioEncoding() AudioEncoding
- func (x *AudioConfig) GetSampleRateHertz() int32
- func (*AudioConfig) ProtoMessage()
- func (x *AudioConfig) ProtoReflect() protoreflect.Message
- func (x *AudioConfig) Reset()
- func (x *AudioConfig) String() string
- type AudioEncoding
- func (AudioEncoding) Descriptor() protoreflect.EnumDescriptor
- func (x AudioEncoding) Enum() *AudioEncoding
- func (AudioEncoding) EnumDescriptor() ([]byte, []int)deprecated
- func (x AudioEncoding) Number() protoreflect.EnumNumber
- func (x AudioEncoding) String() string
- func (AudioEncoding) Type() protoreflect.EnumType
- type ListVoicesRequest
- type ListVoicesResponses
- func (*ListVoicesResponses) Descriptor() ([]byte, []int)deprecated
- func (x *ListVoicesResponses) GetVoices() []*Voice
- func (*ListVoicesResponses) ProtoMessage()
- func (x *ListVoicesResponses) ProtoReflect() protoreflect.Message
- func (x *ListVoicesResponses) Reset()
- func (x *ListVoicesResponses) String() string
- type StreamingSynthesizeSpeechResponse
- func (*StreamingSynthesizeSpeechResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingSynthesizeSpeechResponse) GetAudioChunk() []byte
- func (*StreamingSynthesizeSpeechResponse) ProtoMessage()
- func (x *StreamingSynthesizeSpeechResponse) ProtoReflect() protoreflect.Message
- func (x *StreamingSynthesizeSpeechResponse) Reset()
- func (x *StreamingSynthesizeSpeechResponse) String() string
- type SynthesisInput
- func (*SynthesisInput) Descriptor() ([]byte, []int)deprecated
- func (x *SynthesisInput) GetSsml() string
- func (x *SynthesisInput) GetText() string
- func (*SynthesisInput) ProtoMessage()
- func (x *SynthesisInput) ProtoReflect() protoreflect.Message
- func (x *SynthesisInput) Reset()
- func (x *SynthesisInput) String() string
- type SynthesizeSpeechRequest
- func (*SynthesizeSpeechRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SynthesizeSpeechRequest) GetAudioConfig() *AudioConfig
- func (x *SynthesizeSpeechRequest) GetInput() *SynthesisInput
- func (x *SynthesizeSpeechRequest) GetVoice() *VoiceSelectionParams
- func (*SynthesizeSpeechRequest) ProtoMessage()
- func (x *SynthesizeSpeechRequest) ProtoReflect() protoreflect.Message
- func (x *SynthesizeSpeechRequest) Reset()
- func (x *SynthesizeSpeechRequest) String() string
- type SynthesizeSpeechResponse
- func (*SynthesizeSpeechResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SynthesizeSpeechResponse) GetAudioContent() []byte
- func (*SynthesizeSpeechResponse) ProtoMessage()
- func (x *SynthesizeSpeechResponse) ProtoReflect() protoreflect.Message
- func (x *SynthesizeSpeechResponse) Reset()
- func (x *SynthesizeSpeechResponse) String() string
- type TextToSpeechClient
- type TextToSpeechServer
- type TextToSpeech_StreamingSynthesizeClient
- type TextToSpeech_StreamingSynthesizeServer
- type UnimplementedTextToSpeechServer
- func (*UnimplementedTextToSpeechServer) ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponses, error)
- func (*UnimplementedTextToSpeechServer) StreamingSynthesize(*SynthesizeSpeechRequest, TextToSpeech_StreamingSynthesizeServer) error
- func (*UnimplementedTextToSpeechServer) Synthesize(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error)
- type Voice
- type VoiceSelectionParams
- func (*VoiceSelectionParams) Descriptor() ([]byte, []int)deprecated
- func (x *VoiceSelectionParams) GetName() string
- func (*VoiceSelectionParams) ProtoMessage()
- func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message
- func (x *VoiceSelectionParams) Reset()
- func (x *VoiceSelectionParams) String() string
Constants ¶
This section is empty.
Variables ¶
var ( AudioEncoding_name = map[int32]string{ 0: "ENCODING_UNSPECIFIED", 1: "LINEAR16", 8: "ALAW", 11: "RAW_OPUS", } AudioEncoding_value = map[string]int32{ "ENCODING_UNSPECIFIED": 0, "LINEAR16": 1, "ALAW": 8, "RAW_OPUS": 11, } )
Enum value maps for AudioEncoding.
var File_tinkoff_cloud_tts_v1_tts_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTextToSpeechServer ¶
func RegisterTextToSpeechServer(s *grpc.Server, srv TextToSpeechServer)
Types ¶
type AudioConfig ¶
type AudioConfig struct { AudioEncoding AudioEncoding `` // Audio encoding. Specifies both container and codec. Must be specified explicitly. /* 141-byte string literal not displayed */ SampleRateHertz int32 `protobuf:"varint,5,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` // Sample rate of generated audio in Hertz. Must be specified explicitly. // contains filtered or unexported fields }
func (*AudioConfig) Descriptor
deprecated
func (*AudioConfig) Descriptor() ([]byte, []int)
Deprecated: Use AudioConfig.ProtoReflect.Descriptor instead.
func (*AudioConfig) GetAudioEncoding ¶
func (x *AudioConfig) GetAudioEncoding() AudioEncoding
func (*AudioConfig) GetSampleRateHertz ¶
func (x *AudioConfig) GetSampleRateHertz() int32
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
type AudioEncoding ¶
type AudioEncoding int32
const ( AudioEncoding_ENCODING_UNSPECIFIED AudioEncoding = 0 // <i>Unspecified - invalid value.</i> Used as default value to avoid accidental errors. AudioEncoding_LINEAR16 AudioEncoding = 1 // Raw PCM with signed integer 16-bit linear audio samples. AudioEncoding_ALAW AudioEncoding = 8 // Raw PCM with A-law mapped 8-bit audio samples (aka PCMA). AudioEncoding_RAW_OPUS AudioEncoding = 11 // Opus frames packed into Protobuf messages.<br/><b>NOTE</b>: each Opus frame is packed into separate message with `audio_content` field. I. e., you can't just concatenate encoded Opus frames and push it as a single chunk into Opus decoder. Also although Opus is sample rate agnostic, estimated duration of synthesized audio is calculated in samples of specified sample rate.<br/><b>NOTE</b>: Not supported in the Synthesize method. )
func (AudioEncoding) Descriptor ¶
func (AudioEncoding) Descriptor() protoreflect.EnumDescriptor
func (AudioEncoding) Enum ¶
func (x AudioEncoding) Enum() *AudioEncoding
func (AudioEncoding) EnumDescriptor
deprecated
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
type ListVoicesRequest ¶
type ListVoicesRequest struct {
// contains filtered or unexported fields
}
func (*ListVoicesRequest) Descriptor
deprecated
func (*ListVoicesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListVoicesRequest.ProtoReflect.Descriptor instead.
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
type ListVoicesResponses ¶
type ListVoicesResponses struct { Voices []*Voice `protobuf:"bytes,1,rep,name=voices,proto3" json:"voices,omitempty"` // Array of voices. // contains filtered or unexported fields }
func (*ListVoicesResponses) Descriptor
deprecated
func (*ListVoicesResponses) Descriptor() ([]byte, []int)
Deprecated: Use ListVoicesResponses.ProtoReflect.Descriptor instead.
func (*ListVoicesResponses) GetVoices ¶
func (x *ListVoicesResponses) GetVoices() []*Voice
func (*ListVoicesResponses) ProtoMessage ¶
func (*ListVoicesResponses) ProtoMessage()
func (*ListVoicesResponses) ProtoReflect ¶
func (x *ListVoicesResponses) ProtoReflect() protoreflect.Message
func (*ListVoicesResponses) Reset ¶
func (x *ListVoicesResponses) Reset()
func (*ListVoicesResponses) String ¶
func (x *ListVoicesResponses) String() string
type StreamingSynthesizeSpeechResponse ¶
type StreamingSynthesizeSpeechResponse struct { AudioChunk []byte `protobuf:"bytes,1,opt,name=audio_chunk,json=audioChunk,proto3" json:"audio_chunk,omitempty"` // Chunk of synthesized audio: either samples for `LINEAR16` or single frame for `RAW_OPUS`. // contains filtered or unexported fields }
func (*StreamingSynthesizeSpeechResponse) Descriptor
deprecated
func (*StreamingSynthesizeSpeechResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSynthesizeSpeechResponse.ProtoReflect.Descriptor instead.
func (*StreamingSynthesizeSpeechResponse) GetAudioChunk ¶
func (x *StreamingSynthesizeSpeechResponse) GetAudioChunk() []byte
func (*StreamingSynthesizeSpeechResponse) ProtoMessage ¶
func (*StreamingSynthesizeSpeechResponse) ProtoMessage()
func (*StreamingSynthesizeSpeechResponse) ProtoReflect ¶
func (x *StreamingSynthesizeSpeechResponse) ProtoReflect() protoreflect.Message
func (*StreamingSynthesizeSpeechResponse) Reset ¶
func (x *StreamingSynthesizeSpeechResponse) Reset()
func (*StreamingSynthesizeSpeechResponse) String ¶
func (x *StreamingSynthesizeSpeechResponse) String() string
type SynthesisInput ¶
type SynthesisInput struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // Raw text to synthesize. Ssml string `protobuf:"bytes,2,opt,name=ssml,proto3" json:"ssml,omitempty"` // The SSML document to synthesize. // contains filtered or unexported fields }
func (*SynthesisInput) Descriptor
deprecated
func (*SynthesisInput) Descriptor() ([]byte, []int)
Deprecated: Use SynthesisInput.ProtoReflect.Descriptor instead.
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
type SynthesizeSpeechRequest ¶
type SynthesizeSpeechRequest struct { Input *SynthesisInput `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // Input to synthesize. Voice *VoiceSelectionParams `protobuf:"bytes,2,opt,name=voice,proto3" json:"voice,omitempty"` // Voice selection parameters. AudioConfig *AudioConfig `protobuf:"bytes,3,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"` // Audio configuration. Must be specified explicitly. // contains filtered or unexported fields }
func (*SynthesizeSpeechRequest) Descriptor
deprecated
func (*SynthesizeSpeechRequest) Descriptor() ([]byte, []int)
Deprecated: Use SynthesizeSpeechRequest.ProtoReflect.Descriptor instead.
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
type SynthesizeSpeechResponse ¶
type SynthesizeSpeechResponse struct { AudioContent []byte `protobuf:"bytes,1,opt,name=audio_content,json=audioContent,proto3" json:"audio_content,omitempty"` // Whole synthesized audio. // contains filtered or unexported fields }
func (*SynthesizeSpeechResponse) Descriptor
deprecated
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
type TextToSpeechClient ¶
type TextToSpeechClient interface { ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponses, error) Synthesize(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error) StreamingSynthesize(ctx context.Context, in *SynthesizeSpeechRequest, 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
type TextToSpeechServer ¶
type TextToSpeechServer interface { ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponses, error) Synthesize(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error) StreamingSynthesize(*SynthesizeSpeechRequest, TextToSpeech_StreamingSynthesizeServer) error }
TextToSpeechServer is the server API for TextToSpeech service.
type TextToSpeech_StreamingSynthesizeClient ¶
type TextToSpeech_StreamingSynthesizeClient interface { Recv() (*StreamingSynthesizeSpeechResponse, error) grpc.ClientStream }
type TextToSpeech_StreamingSynthesizeServer ¶
type TextToSpeech_StreamingSynthesizeServer interface { Send(*StreamingSynthesizeSpeechResponse) error grpc.ServerStream }
type UnimplementedTextToSpeechServer ¶
type UnimplementedTextToSpeechServer struct { }
UnimplementedTextToSpeechServer can be embedded to have forward compatible implementations.
func (*UnimplementedTextToSpeechServer) ListVoices ¶
func (*UnimplementedTextToSpeechServer) ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponses, error)
func (*UnimplementedTextToSpeechServer) StreamingSynthesize ¶
func (*UnimplementedTextToSpeechServer) StreamingSynthesize(*SynthesizeSpeechRequest, TextToSpeech_StreamingSynthesizeServer) error
func (*UnimplementedTextToSpeechServer) Synthesize ¶
func (*UnimplementedTextToSpeechServer) Synthesize(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error)
type Voice ¶
type Voice struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Voice name. // contains filtered or unexported fields }
func (*Voice) Descriptor
deprecated
func (*Voice) ProtoMessage ¶
func (*Voice) ProtoMessage()
func (*Voice) ProtoReflect ¶
func (x *Voice) ProtoReflect() protoreflect.Message
type VoiceSelectionParams ¶
type VoiceSelectionParams struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Exact voice name. // contains filtered or unexported fields }
func (*VoiceSelectionParams) Descriptor
deprecated
func (*VoiceSelectionParams) Descriptor() ([]byte, []int)
Deprecated: Use VoiceSelectionParams.ProtoReflect.Descriptor instead.
func (*VoiceSelectionParams) GetName ¶
func (x *VoiceSelectionParams) GetName() string
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