proto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tts_Tts_FullMethodName = "/playht.v1.Tts/Tts"
)

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
var File_proto_api_proto protoreflect.FileDescriptor
View Source
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.

const (
	Code_CODE_UNSPECIFIED Code = 0
	Code_CODE_COMPLETE    Code = 1
	Code_CODE_IN_PROGRESS Code = 2
	Code_CODE_CANCELED    Code = 3
	Code_CODE_ERROR       Code = 4
)

func (Code) Descriptor

func (Code) Descriptor() protoreflect.EnumDescriptor

func (Code) Enum

func (x Code) Enum() *Code

func (Code) EnumDescriptor deprecated

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

Deprecated: Use Code.Descriptor instead.

func (Code) Number

func (x Code) Number() protoreflect.EnumNumber

func (Code) String

func (x Code) String() string

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) Enum

func (x Format) Enum() *Format

func (Format) EnumDescriptor deprecated

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

Deprecated: Use Format.Descriptor instead.

func (Format) Number

func (x Format) Number() protoreflect.EnumNumber

func (Format) String

func (x Format) String() string

func (Format) Type

func (Format) Type() protoreflect.EnumType

type Quality

type Quality int32

Quality levels

const (
	Quality_QUALITY_UNSPECIFIED Quality = 0 // Defaults to 'DRAFT' quality.
	Quality_QUALITY_LOW         Quality = 1
	Quality_QUALITY_DRAFT       Quality = 2
	Quality_QUALITY_MEDIUM      Quality = 3
	Quality_QUALITY_HIGH        Quality = 4
	Quality_QUALITY_PREMIUM     Quality = 5
)

func (Quality) Descriptor

func (Quality) Descriptor() protoreflect.EnumDescriptor

func (Quality) Enum

func (x Quality) Enum() *Quality

func (Quality) EnumDescriptor deprecated

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

Deprecated: Use Quality.Descriptor instead.

func (Quality) Number

func (x Quality) Number() protoreflect.EnumNumber

func (Quality) String

func (x Quality) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCode

func (x *Status) GetCode() Code

func (*Status) GetMessage

func (x *Status) GetMessage() []string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use TtsParams.ProtoReflect.Descriptor instead.

func (*TtsParams) GetAudioSource

func (x *TtsParams) GetAudioSource() int32

func (*TtsParams) GetFormat

func (x *TtsParams) GetFormat() Format

func (*TtsParams) GetLanguageIdentifier

func (x *TtsParams) GetLanguageIdentifier() int32

func (*TtsParams) GetOther

func (x *TtsParams) GetOther() string

func (*TtsParams) GetQuality

func (x *TtsParams) GetQuality() Quality

func (*TtsParams) GetSampleRate

func (x *TtsParams) GetSampleRate() int32

func (*TtsParams) GetSeed

func (x *TtsParams) GetSeed() int32

func (*TtsParams) GetSpeakerAttributes

func (x *TtsParams) GetSpeakerAttributes() int32

func (*TtsParams) GetSpeechAttributes

func (x *TtsParams) GetSpeechAttributes() int32

func (*TtsParams) GetSpeed

func (x *TtsParams) GetSpeed() float32

func (*TtsParams) GetStyleGuidance

func (x *TtsParams) GetStyleGuidance() float32

func (*TtsParams) GetTemperature

func (x *TtsParams) GetTemperature() float32

func (*TtsParams) GetText

func (x *TtsParams) GetText() []string

func (*TtsParams) GetTextGuidance

func (x *TtsParams) GetTextGuidance() float32

func (*TtsParams) GetTopP

func (x *TtsParams) GetTopP() float32

func (*TtsParams) GetVoice

func (x *TtsParams) GetVoice() string

func (*TtsParams) GetVoiceGuidance

func (x *TtsParams) GetVoiceGuidance() float32

func (*TtsParams) ProtoMessage

func (*TtsParams) ProtoMessage()

func (*TtsParams) ProtoReflect

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

func (*TtsParams) Reset

func (x *TtsParams) Reset()

func (*TtsParams) String

func (x *TtsParams) String() string

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

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.

Jump to

Keyboard shortcuts

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