Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTtsServer(s grpc.ServiceRegistrar, srv TtsServer)
- type Code
- type Credentials
- type Format
- type Quality
- type Status
- type TtsClient
- type TtsParams
- func (*TtsParams) Descriptor() ([]byte, []int)deprecated
- func (x *TtsParams) GetAudioSource() int32
- func (x *TtsParams) GetFormat() Format
- func (x *TtsParams) GetLanguageIdentifier() int32
- func (x *TtsParams) GetOther() string
- func (x *TtsParams) GetQuality() Quality
- func (x *TtsParams) GetSampleRate() int32
- func (x *TtsParams) GetSeed() int32
- func (x *TtsParams) GetSpeakerAttributes() int32
- func (x *TtsParams) GetSpeechAttributes() int32
- func (x *TtsParams) GetSpeed() float32
- func (x *TtsParams) GetStyleGuidance() float32
- func (x *TtsParams) GetTemperature() float32
- func (x *TtsParams) GetText() []string
- func (x *TtsParams) GetTextGuidance() float32
- func (x *TtsParams) GetTopP() float32
- func (x *TtsParams) GetVoice() string
- func (x *TtsParams) GetVoiceGuidance() float32
- func (*TtsParams) ProtoMessage()
- func (x *TtsParams) ProtoReflect() protoreflect.Message
- func (x *TtsParams) Reset()
- func (x *TtsParams) String() string
- type TtsRequest
- type TtsResponse
- func (*TtsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TtsResponse) GetData() []byte
- func (x *TtsResponse) GetId() string
- func (x *TtsResponse) GetSequence() int32
- func (x *TtsResponse) GetStatus() *Status
- func (*TtsResponse) ProtoMessage()
- func (x *TtsResponse) ProtoReflect() protoreflect.Message
- func (x *TtsResponse) Reset()
- func (x *TtsResponse) String() string
- type TtsServer
- type Tts_TtsClient
- type Tts_TtsServer
- type UnimplementedTtsServer
- type UnsafeTtsServer
Constants ¶
const (
Tts_Tts_FullMethodName = "/playht.v1.Tts/Tts"
)
Variables ¶
var ( Quality_name = map[int32]string{ 0: "QUALITY_UNSPECIFIED", 1: "QUALITY_LOW", 2: "QUALITY_DRAFT", 3: "QUALITY_MEDIUM", 4: "QUALITY_HIGH", 5: "QUALITY_PREMIUM", } Quality_value = map[string]int32{ "QUALITY_UNSPECIFIED": 0, "QUALITY_LOW": 1, "QUALITY_DRAFT": 2, "QUALITY_MEDIUM": 3, "QUALITY_HIGH": 4, "QUALITY_PREMIUM": 5, } )
Enum value maps for Quality.
var ( Code_name = map[int32]string{ 0: "CODE_UNSPECIFIED", 1: "CODE_COMPLETE", 2: "CODE_IN_PROGRESS", 3: "CODE_CANCELED", 4: "CODE_ERROR", } Code_value = map[string]int32{ "CODE_UNSPECIFIED": 0, "CODE_COMPLETE": 1, "CODE_IN_PROGRESS": 2, "CODE_CANCELED": 3, "CODE_ERROR": 4, } )
Enum value maps for Code.
var ( Format_name = map[int32]string{ 0: "FORMAT_RAW", 1: "FORMAT_MP3", 2: "FORMAT_WAV", 3: "FORMAT_OGG", 4: "FORMAT_FLAC", 5: "FORMAT_MULAW", } Format_value = map[string]int32{ "FORMAT_RAW": 0, "FORMAT_MP3": 1, "FORMAT_WAV": 2, "FORMAT_OGG": 3, "FORMAT_FLAC": 4, "FORMAT_MULAW": 5, } )
Enum value maps for Format.
var File_proto_api_proto protoreflect.FileDescriptor
var Tts_ServiceDesc = grpc.ServiceDesc{ ServiceName: "playht.v1.Tts", HandlerType: (*TtsServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Tts", Handler: _Tts_Tts_Handler, ServerStreams: true, }, }, Metadata: "proto/api.proto", }
Tts_ServiceDesc is the grpc.ServiceDesc for Tts service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTtsServer ¶
func RegisterTtsServer(s grpc.ServiceRegistrar, srv TtsServer)
Types ¶
type Code ¶
type Code int32
Status codes.
func (Code) Descriptor ¶
func (Code) Descriptor() protoreflect.EnumDescriptor
func (Code) EnumDescriptor
deprecated
func (Code) Number ¶
func (x Code) Number() protoreflect.EnumNumber
func (Code) Type ¶
func (Code) Type() protoreflect.EnumType
type Credentials ¶
type Credentials struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Token []byte `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*Credentials) Descriptor
deprecated
func (*Credentials) Descriptor() ([]byte, []int)
Deprecated: Use Credentials.ProtoReflect.Descriptor instead.
func (*Credentials) GetId ¶
func (x *Credentials) GetId() string
func (*Credentials) GetToken ¶
func (x *Credentials) GetToken() []byte
func (*Credentials) ProtoMessage ¶
func (*Credentials) ProtoMessage()
func (*Credentials) ProtoReflect ¶
func (x *Credentials) ProtoReflect() protoreflect.Message
func (*Credentials) Reset ¶
func (x *Credentials) Reset()
func (*Credentials) String ¶
func (x *Credentials) String() string
type Format ¶
type Format int32
Audio formats.
const ( Format_FORMAT_RAW Format = 0 // Default value, PCM_FP32 (model native). Format_FORMAT_MP3 Format = 1 // 128kbps MP3 Format_FORMAT_WAV Format = 2 // 16-bit (uint16) PCM Format_FORMAT_OGG Format = 3 // 80kbps OGG Vorbis Format_FORMAT_FLAC Format = 4 // 16-bit (int16) FLAC Format_FORMAT_MULAW Format = 5 // 8-bit (uint8) PCM headerless )
func (Format) Descriptor ¶
func (Format) Descriptor() protoreflect.EnumDescriptor
func (Format) EnumDescriptor
deprecated
func (Format) Number ¶
func (x Format) Number() protoreflect.EnumNumber
func (Format) Type ¶
func (Format) Type() protoreflect.EnumType
type Quality ¶
type Quality int32
Quality levels
func (Quality) Descriptor ¶
func (Quality) Descriptor() protoreflect.EnumDescriptor
func (Quality) EnumDescriptor
deprecated
func (Quality) Number ¶
func (x Quality) Number() protoreflect.EnumNumber
func (Quality) Type ¶
func (Quality) Type() protoreflect.EnumType
type Status ¶
type Status struct { Code Code `protobuf:"varint,1,opt,name=code,proto3,enum=playht.v1.Code" json:"code,omitempty"` Message []string `protobuf:"bytes,2,rep,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Status) Descriptor
deprecated
func (*Status) GetMessage ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type TtsClient ¶
type TtsClient interface {
Tts(ctx context.Context, in *TtsRequest, opts ...grpc.CallOption) (Tts_TtsClient, error)
}
TtsClient is the client API for Tts 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.
func NewTtsClient ¶
func NewTtsClient(cc grpc.ClientConnInterface) TtsClient
type TtsParams ¶
type TtsParams struct { // Text to be synthesized. Text []string `protobuf:"bytes,1,rep,name=text,proto3" json:"text,omitempty"` // Voice to be used. Voice string `protobuf:"bytes,2,opt,name=voice,proto3" json:"voice,omitempty"` // Quality of the generated audio. Quality *Quality `protobuf:"varint,3,opt,name=quality,proto3,enum=playht.v1.Quality,oneof" json:"quality,omitempty"` // Audio format to return. Format *Format `protobuf:"varint,4,opt,name=format,proto3,enum=playht.v1.Format,oneof" json:"format,omitempty"` // Sample rate to return in hz. Native sample rate is 24000 hz (default). SampleRate *int32 `protobuf:"varint,5,opt,name=sample_rate,json=sampleRate,proto3,oneof" json:"sample_rate,omitempty"` // Speaking rate, 1.0 (default) is normal speed. Speed *float32 `protobuf:"fixed32,6,opt,name=speed,proto3,oneof" json:"speed,omitempty"` // Seed for random number generator. If unspecified, a random seed is used. Seed *int32 `protobuf:"varint,7,opt,name=seed,proto3,oneof" json:"seed,omitempty"` // Model sampling temperature, 1.1 is default. Temperature *float32 `protobuf:"fixed32,8,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"` // Model probability mass sampling threshold, 0.85 is default. TopP *float32 `protobuf:"fixed32,9,opt,name=top_p,json=topP,proto3,oneof" json:"top_p,omitempty"` // Default is 1.0 StyleGuidance *float32 `protobuf:"fixed32,10,opt,name=style_guidance,json=styleGuidance,proto3,oneof" json:"style_guidance,omitempty"` // Default is 2.0 VoiceGuidance *float32 `protobuf:"fixed32,11,opt,name=voice_guidance,json=voiceGuidance,proto3,oneof" json:"voice_guidance,omitempty"` // Default is -1 AudioSource *int32 `protobuf:"varint,12,opt,name=audio_source,json=audioSource,proto3,oneof" json:"audio_source,omitempty"` // default is 36 SpeakerAttributes *int32 `protobuf:"varint,13,opt,name=speaker_attributes,json=speakerAttributes,proto3,oneof" json:"speaker_attributes,omitempty"` // Default is -1 SpeechAttributes *int32 `protobuf:"varint,14,opt,name=speech_attributes,json=speechAttributes,proto3,oneof" json:"speech_attributes,omitempty"` // Default is -1 LanguageIdentifier *int32 `protobuf:"varint,15,opt,name=language_identifier,json=languageIdentifier,proto3,oneof" json:"language_identifier,omitempty"` // Default is 1.0 TextGuidance *float32 `protobuf:"fixed32,16,opt,name=text_guidance,json=textGuidance,proto3,oneof" json:"text_guidance,omitempty"` // JSON string with other various parameters. Other *string `protobuf:"bytes,99,opt,name=other,proto3,oneof" json:"other,omitempty"` // contains filtered or unexported fields }
func (*TtsParams) Descriptor
deprecated
func (*TtsParams) GetAudioSource ¶
func (*TtsParams) GetLanguageIdentifier ¶
func (*TtsParams) GetQuality ¶
func (*TtsParams) GetSampleRate ¶
func (*TtsParams) GetSpeakerAttributes ¶
func (*TtsParams) GetSpeechAttributes ¶
func (*TtsParams) GetStyleGuidance ¶
func (*TtsParams) GetTemperature ¶
func (*TtsParams) GetTextGuidance ¶
func (*TtsParams) GetVoiceGuidance ¶
func (*TtsParams) ProtoMessage ¶
func (*TtsParams) ProtoMessage()
func (*TtsParams) ProtoReflect ¶
func (x *TtsParams) ProtoReflect() protoreflect.Message
type TtsRequest ¶
type TtsRequest struct { // User ID, Lease Token Lease []byte `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease,omitempty"` Params *TtsParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*TtsRequest) Descriptor
deprecated
func (*TtsRequest) Descriptor() ([]byte, []int)
Deprecated: Use TtsRequest.ProtoReflect.Descriptor instead.
func (*TtsRequest) GetLease ¶
func (x *TtsRequest) GetLease() []byte
func (*TtsRequest) GetParams ¶
func (x *TtsRequest) GetParams() *TtsParams
func (*TtsRequest) ProtoMessage ¶
func (*TtsRequest) ProtoMessage()
func (*TtsRequest) ProtoReflect ¶
func (x *TtsRequest) ProtoReflect() protoreflect.Message
func (*TtsRequest) Reset ¶
func (x *TtsRequest) Reset()
func (*TtsRequest) String ¶
func (x *TtsRequest) String() string
type TtsResponse ¶
type TtsResponse struct { Sequence int32 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` Status *Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*TtsResponse) Descriptor
deprecated
func (*TtsResponse) Descriptor() ([]byte, []int)
Deprecated: Use TtsResponse.ProtoReflect.Descriptor instead.
func (*TtsResponse) GetData ¶
func (x *TtsResponse) GetData() []byte
func (*TtsResponse) GetId ¶
func (x *TtsResponse) GetId() string
func (*TtsResponse) GetSequence ¶
func (x *TtsResponse) GetSequence() int32
func (*TtsResponse) GetStatus ¶
func (x *TtsResponse) GetStatus() *Status
func (*TtsResponse) ProtoMessage ¶
func (*TtsResponse) ProtoMessage()
func (*TtsResponse) ProtoReflect ¶
func (x *TtsResponse) ProtoReflect() protoreflect.Message
func (*TtsResponse) Reset ¶
func (x *TtsResponse) Reset()
func (*TtsResponse) String ¶
func (x *TtsResponse) String() string
type TtsServer ¶
type TtsServer interface { Tts(*TtsRequest, Tts_TtsServer) error // contains filtered or unexported methods }
TtsServer is the server API for Tts service. All implementations must embed UnimplementedTtsServer for forward compatibility
type Tts_TtsClient ¶
type Tts_TtsClient interface { Recv() (*TtsResponse, error) grpc.ClientStream }
type Tts_TtsServer ¶
type Tts_TtsServer interface { Send(*TtsResponse) error grpc.ServerStream }
type UnimplementedTtsServer ¶
type UnimplementedTtsServer struct { }
UnimplementedTtsServer must be embedded to have forward compatible implementations.
func (UnimplementedTtsServer) Tts ¶
func (UnimplementedTtsServer) Tts(*TtsRequest, Tts_TtsServer) error
type UnsafeTtsServer ¶
type UnsafeTtsServer interface {
// contains filtered or unexported methods
}
UnsafeTtsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TtsServer will result in compilation errors.