client

package
v0.0.0-...-41654de Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: 0BSD Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized = errors.New("unauthorized")
	ErrUnspecified  = errors.New("unspecified error")
)

Functions

This section is empty.

Types

type Client

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

func New

func New(apiKey string) Client

func (Client) CreateVoice

func (c Client) CreateVoice(ctx context.Context, name, description string, labels []string, files []*os.File) error

func (Client) DeleteVoice

func (c Client) DeleteVoice(ctx context.Context, voiceID string) error

func (Client) DeleteVoiceSample

func (c Client) DeleteVoiceSample(ctx context.Context, voiceID, sampleID string) (bool, error)

func (Client) DownloadVoiceSample

func (c Client) DownloadVoiceSample(ctx context.Context, voiceID, sampleID string) ([]byte, error)

func (Client) DownloadVoiceSampleWriter

func (c Client) DownloadVoiceSampleWriter(ctx context.Context, w io.Writer, voiceID, sampleID string) error

func (Client) EditVoice

func (c Client) EditVoice(ctx context.Context, voiceID, name, description string, labels []string, files []*os.File) error

func (Client) EditVoiceSettings

func (c Client) EditVoiceSettings(ctx context.Context, voiceID string, settings types.SynthesisOptions) error

func (Client) GetHistoryIDs

func (c Client) GetHistoryIDs(ctx context.Context, voiceIDs ...string) ([]string, error)

func (Client) GetHistoryItemList

func (c Client) GetHistoryItemList(ctx context.Context) ([]types.HistoryItemList, error)

func (Client) GetSubscriptionInfo

func (c Client) GetSubscriptionInfo(ctx context.Context) (types.Subscription, error)

func (Client) GetUserInfo

func (c Client) GetUserInfo(ctx context.Context) (types.UserResponseModel, error)

func (Client) GetVoice

func (c Client) GetVoice(ctx context.Context, voiceID string) (types.VoiceResponseModel, error)

func (Client) GetVoiceIDs

func (c Client) GetVoiceIDs(ctx context.Context) ([]string, error)

func (Client) GetVoiceSettings

func (c Client) GetVoiceSettings(ctx context.Context, voiceID string) (types.SynthesisOptions, error)

func (Client) GetVoices

func (c Client) GetVoices(ctx context.Context) ([]types.VoiceResponseModel, error)

func (Client) HistoryDelete

func (c Client) HistoryDelete(ctx context.Context, historyItemID string) (bool, error)

func (Client) HistoryDownloadAudio

func (c Client) HistoryDownloadAudio(ctx context.Context, ID string) ([]byte, error)

func (Client) HistoryDownloadAudioWriter

func (c Client) HistoryDownloadAudioWriter(ctx context.Context, w io.Writer, ID string) error

func (Client) HistoryDownloadZip

func (c Client) HistoryDownloadZip(ctx context.Context, id1, id2 string, additionalIDs ...string) ([]byte, error)

func (Client) HistoryDownloadZipWriter

func (c Client) HistoryDownloadZipWriter(ctx context.Context, w io.Writer, id1, id2 string, additionalIDs ...string) error

func (Client) TTS

func (c Client) TTS(ctx context.Context, modelID, text, voiceID string, options types.SynthesisOptions) ([]byte, error)

func (Client) TTSStream

func (c Client) TTSStream(ctx context.Context, w io.Writer, text, voiceID string, options types.SynthesisOptions) error

func (Client) TTSWriter

func (c Client) TTSWriter(ctx context.Context, w io.Writer, modelID, text, voiceID string, options types.SynthesisOptions) error

func (Client) WithEndpoint

func (c Client) WithEndpoint(endpoint string) Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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