fakeyou

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseResponse

type BaseResponse struct {
	Success bool `json:"success" `
}

type Builder

type Builder fakeyou

func (*Builder) Build

func (f *Builder) Build() []string

type Category

type Category struct {
	CategoryToken           string    `json:"category_token"`
	MaybeSuperCategoryToken *string   `json:"maybe_super_category_token"`
	ModelType               ModelType `json:"model_type"`
	Name                    string    `json:"name"`
	NameForDropdown         string    `json:"name_for_dropdown"`
	CanDirectlyHaveModels   bool      `json:"can_directly_have_models"`
	CanHaveSubcategories    bool      `json:"can_have_subcategories"`
	CanOnlyModsApply        bool      `json:"can_only_mods_apply"`
	IsModApproved           *bool     `json:"is_mod_approved"`
	IsSynthetic             bool      `json:"is_synthetic"`
	ShouldBeSorted          bool      `json:"should_be_sorted"`
	CreatedAt               string    `json:"created_at"`
	UpdatedAt               string    `json:"updated_at"`
	DeletedAt               string    `json:"deleted_at"`
}

type CreatorSetVisibility

type CreatorSetVisibility string
const (
	Public CreatorSetVisibility = "public"
)

type IBuilder

type IBuilder interface {
	Build() []string
}

type IETFTag

type IETFTag string
const (
	Ar    IETFTag = "ar"
	En    IETFTag = "en"
	EnUS  IETFTag = "en-US"
	Es    IETFTag = "es"
	Es419 IETFTag = "es-419"
)

type IFakeYou

type IFakeYou interface {
	//
	IsDebug() bool
	// voice api
	GetListOfVoices() (*ResponseVoice, error)
	GetListOfVoiceCategories() (*ResponseVoiceCategories, error)
	GenerateTTSAudio(text string, ttsModelToken string) (*ResponseGenerateTTS, error)
	PollTTSRequest(InferenceJobToken string) (*ResponsePollTTS, error)
	// auth api
	Login(body RequestLogin) error
}

func NewFakeYou

func NewFakeYou(configuration *configuration.Configuration) IFakeYou

type Model

type Model struct {
	ModelToken                     string               `json:"model_token"`
	TTSModelType                   TTSModelType         `json:"tts_model_type"`
	CreatorUserToken               string               `json:"creator_user_token"`
	CreatorUsername                string               `json:"creator_username"`
	CreatorDisplayName             string               `json:"creator_display_name"`
	CreatorGravatarHash            string               `json:"creator_gravatar_hash"`
	Title                          string               `json:"title"`
	IETFLanguageTag                IETFTag              `json:"ietf_language_tag"`
	IETFPrimaryLanguageSubtag      IETFTag              `json:"ietf_primary_language_subtag"`
	IsFrontPageFeatured            bool                 `json:"is_front_page_featured"`
	IsTwitchFeatured               bool                 `json:"is_twitch_featured"`
	MaybeSuggestedUniqueBotCommand *string              `json:"maybe_suggested_unique_bot_command"`
	CreatorSetVisibility           CreatorSetVisibility `json:"creator_set_visibility"`
	UserRatings                    UserRatings          `json:"user_ratings"`
	CategoryTokens                 []string             `json:"category_tokens"`
	CreatedAt                      string               `json:"created_at"`
	UpdatedAt                      string               `json:"updated_at"`
}

type ModelType

type ModelType string
const (
	TTS ModelType = "tts"
)

type RequestGenerateTTS

type RequestGenerateTTS struct {
	TTSModelToken        string `json:"tts_model_token" required:"true" validate:"nonnil,min=4"`
	UUIDIdempotencyToken string `json:"uuid_idempotency_token" required:"true" validate:"nonnil,min=4"`
	InferenceText        string `json:"inference_text" required:"true" validate:"nonnil,min=4"`
}

type RequestLogin

type RequestLogin struct {
	Username string `json:"username_or_email" required:"true" validate:"nonnil,min=1"`
	Password string `json:"password" required:"true" validate:"nonnil,min=4"`
}

type ResponseGenerateTTS

type ResponseGenerateTTS struct {
	BaseResponse
	InferenceJobToken string `json:"inference_job_token"`
}

type ResponsePollTTS added in v0.0.2

type ResponsePollTTS struct {
	BaseResponse
	State StateTTS `json:"state"`
}

type ResponseVoice

type ResponseVoice struct {
	BaseResponse
	Models []Model `json:"models"`
}

type ResponseVoiceCategories

type ResponseVoiceCategories struct {
	BaseResponse
	Categories []Category `json:"categories"`
}

type StateStatus added in v0.0.2

type StateStatus string
const (
	Pending         StateStatus = "pending"
	Started         StateStatus = "started"
	CompleteSuccess StateStatus = "complete_success"
	AtttemptFailed  StateStatus = "attempt_failed"
)

type StateStatusType added in v0.0.2

type StateStatusType string

type StateTTS added in v0.0.2

type StateTTS struct {
	JobToken string          `json:"job_token"`
	Status   StateStatusType `json:"status"`

	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	DeletedAt string `json:"deleted_at"`
}

type TTSModelType

type TTSModelType string
const (
	Tacotron2 TTSModelType = "tacotron2"
)

type UserRatings

type UserRatings struct {
	PositiveCount int64 `json:"positive_count"`
	NegativeCount int64 `json:"negative_count"`
	TotalCount    int64 `json:"total_count"`
}

Jump to

Keyboard shortcuts

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