xtts

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 3 Imported by: 0

README

xtts-go

go sdk for xtts model api

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func C

func C(auth string) *Client

func (*Client) CreateSample

func (c *Client) CreateSample(conf *SampleConf) (*Sample, error)

func (*Client) CreateVoiceFromFiles

func (c *Client) CreateVoiceFromFiles(name string, files ...string) (*Voice, error)

func (*Client) CreateVoiceFromTextPrompt

func (c *Client) CreateVoiceFromTextPrompt(name, prompt string) (*Voice, error)

func (*Client) CreateVoiceFromUrls

func (c *Client) CreateVoiceFromUrls(name string, urls ...string) (*Voice, error)

type Sample

type Sample struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
	Text      string `json:"text"`
	Language  string `json:"language"`
	AudioUrl  string `json:"audio_url"`
}

func (*Sample) String

func (s *Sample) String() string

type SampleConf

type SampleConf struct {
	VoiceID  string
	Text     string
	Speed    float64
	Language string
}

func DefaultSampleConf

func DefaultSampleConf(id string, text string) *SampleConf

type Voice

type Voice struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	CreatedAt    string `json:"created_at"`
	Favorite     bool   `json:"favorite"`
	SamplesCount int    `json:"samples_count"`
}

func (*Voice) String

func (v *Voice) String() string

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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