Versions in this module Expand all Collapse all v0 v0.2.0 Oct 3, 2026 v0.1.0 Sep 29, 2026 Changes in this version + const CodeAudioQuota + const CodeAudioTooLarge + const CodeCloneLimit + const CodeDesignFailed + const CodeInsufficientTokens + const CodeInvalid + const CodeNoAudio + const CodeNotApproved + const CodeQuota + const CodeSynthFailed + const CodeTimeout + const CodeTranscribeFailed + const CodeVoiceNotReady + const DefaultBaseURL + const DefaultTimeout + const MaxAudioBytes + const MaxAudioMinutes + const MaxPodcastChars + const MaxSpeakChars + const Version + func Bool(b bool) *bool + func CollapseSpace(s string) string + func ErrorCode(err error) string + func ErrorStatus(err error) int + func IsInsufficientTokens(err error) bool + func IsNotFound(err error) bool + func IsRateLimited(err error) bool + func IsTimeout(err error) bool + func NormalizePodcastText(s string) string + func String(s string) *string + func TextLength(s string) int + type Account struct + Admin bool + Approved bool + AudioSec float64 + AudioUsedToday float64 + Chars int64 + Clips int64 + DailyAudioSec *int64 + DailyChars *int64 + MaxClones *int64 + ResetsAt string + Tokens *TokenWallet + Transcripts int64 + UsedToday int64 + Voices int64 + type AudioFormat string + const AudioAAC + const AudioFLAC + const AudioM4A + const AudioMP3 + const AudioMP4 + const AudioOGG + const AudioWAV + const AudioWebM + type Client struct + func NewClient(apiKey string, opts ...Option) *Client + func (c *Client) Account(ctx context.Context) (*Account, error) + func (c *Client) CreatePodcast(ctx context.Context, req PodcastRequest) (*Clip, error) + func (c *Client) CreateVoice(ctx context.Context, req CreateVoiceRequest, wait ...WaitOptions) (*Voice, error) + func (c *Client) CreateVoiceFromDescription(ctx context.Context, req VoiceFromDescriptionRequest, wait ...WaitOptions) (*Voice, error) + func (c *Client) DeleteClips(ctx context.Context, clipIDs []string) (int, error) + func (c *Client) DeleteDesign(ctx context.Context, designID string) error + func (c *Client) DeleteTranscripts(ctx context.Context, transcriptIDs []string) (int, error) + func (c *Client) DeleteVoice(ctx context.Context, voiceID string) error + func (c *Client) DesignVoice(ctx context.Context, req DesignVoiceRequest) (*VoiceDesign, error) + func (c *Client) GetClip(ctx context.Context, clipID string) (*Clip, error) + func (c *Client) GetDesign(ctx context.Context, designID string) (*VoiceDesign, error) + func (c *Client) GetTranscript(ctx context.Context, transcriptID string) (*Transcript, error) + func (c *Client) GetVoice(ctx context.Context, voiceID string) (*Voice, error) + func (c *Client) Languages(ctx context.Context) ([]LanguageInfo, error) + func (c *Client) ListClips(ctx context.Context, opts ListClipsOptions) (*ClipPage, error) + func (c *Client) ListDesigns(ctx context.Context, opts PageOptions) (*DesignPage, error) + func (c *Client) ListTranscripts(ctx context.Context, opts ListTranscriptsOptions) (*TranscriptPage, error) + func (c *Client) MakePodcast(ctx context.Context, req PodcastRequest, wait ...WaitOptions) (*Clip, error) + func (c *Client) Projects(ctx context.Context) ([]Project, error) + func (c *Client) STTLanguages(ctx context.Context) (*STTInfo, error) + func (c *Client) Samples(ctx context.Context, language Language) (*Samples, error) + func (c *Client) SaveDesign(ctx context.Context, designID string, req SaveDesignRequest, ...) (*Voice, error) + func (c *Client) Say(ctx context.Context, req SpeakRequest, wait ...WaitOptions) (*Clip, error) + func (c *Client) ShareClip(ctx context.Context, clipID string) (string, error) + func (c *Client) Speak(ctx context.Context, req SpeakRequest) (*Clip, error) + func (c *Client) Stream(ctx context.Context, req StreamRequest) (*SpeechStream, error) + func (c *Client) Transcribe(ctx context.Context, req TranscribeRequest) (*Transcript, error) + func (c *Client) TranscribeFile(ctx context.Context, req TranscribeRequest, wait ...WaitOptions) (*Transcript, error) + func (c *Client) UnshareClip(ctx context.Context, clipID string) error + func (c *Client) UpdateVoice(ctx context.Context, voiceID string, patch VoiceUpdate) error + func (c *Client) Usage(ctx context.Context, opts PageOptions) (*UsagePage, error) + func (c *Client) Voices(ctx context.Context, language Language) ([]Voice, error) + func (c *Client) WaitForClip(ctx context.Context, clipID string, wait ...WaitOptions) (*Clip, error) + func (c *Client) WaitForDesign(ctx context.Context, designID string, wait ...WaitOptions) (*VoiceDesign, error) + func (c *Client) WaitForTranscript(ctx context.Context, transcriptID string, wait ...WaitOptions) (*Transcript, error) + func (c *Client) WaitForVoice(ctx context.Context, voiceID string, wait ...WaitOptions) (*Voice, error) + type Clip struct + Chars int + ClipID string + CreatedAt string + DurationSec float64 + Engine string + FailReason string + Format string + Kind string + Language Language + Mode SpeakMode + Parts int + PartsDone int + Project string + SampleRate int + ShareURL string + Source Source + Status Status + SynthMs float64 + Text string + Title string + Tokens int + URL string + UpdatedAt string + VoiceID string + VoiceName string + func (c *Clip) IsPodcast() bool + type ClipKind string + const ClipKindClip + const ClipKindPodcast + type ClipPage struct + Cursor string + Items []Clip + type CreateVoiceRequest struct + Audio io.Reader + Description string + Format AudioFormat + Gender Gender + Language Language + Name string + RefText string + Size int64 + type DesignCandidate struct + DurationSec float64 + Index int + Status Status + URL string + type DesignPage struct + Cursor string + Items []VoiceDesign + type DesignVoiceRequest struct + Count int + Description string + Language Language + Text string + type Error struct + Available *int64 + Code string + Limit *int64 + Message string + Needed *int64 + RefillsAt string + ResetsAt string + RetryAfter time.Duration + Status int + Used *int64 + func (e *Error) Error() string + type Gender string + const GenderFemale + const GenderMale + const GenderNeutral + type Language string + const Chinese + const English + const French + const German + const Italian + const Japanese + const Korean + const Portuguese + const Spanish + const Vietnamese + type LanguageInfo struct + Clone struct{ ... } + Cloneable bool + Code Language + DefaultMode SpeakMode + Designable bool + Label string + MaxChars int + Modes []SpeakMode + SampleText string + type ListClipsOptions struct + Cursor string + Kind ClipKind + Limit int + Project string + Source Source + VoiceID string + type ListTranscriptsOptions struct + Cursor string + Limit int + Project string + Source Source + Status Status + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithIDToken(token string) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(ua string) Option + type PageOptions struct + Cursor string + Limit int + type PodcastRequest struct + Mode SpeakMode + Project string + Text string + Title string + VoiceID string + type Project struct + Chars int + Clips int + Project string + UpdatedAt string + type STTInfo struct + Engine string + Formats []AudioFormat + Languages []struct{ ... } + MaxBytes int64 + MaxSeconds int64 + Tasks []TranscribeTask + type SampleVoice struct + Description string + Engine string + Gender Gender + Kind VoiceKind + Language Language + Name string + SampleText string + SampleURL string + Styles []string + VoiceID string + type Samples struct + Languages []struct{ ... } + SampleText map[Language]string + Voices []SampleVoice + type SaveDesignRequest struct + Candidate int + Description string + Gender Gender + Name string + type Source string + const SourceAPI + const SourceStudio + type SpeakMode string + const ModeFast + const ModeNormal + type SpeakRequest struct + Mode SpeakMode + Project string + Text string + VoiceID string + Wait *bool + type SpeechStream struct + Format StreamFormat + SampleRate int + Tokens int + type Status string + const StatusFailed + const StatusProcessing + const StatusReady + type StreamFormat string + const StreamPCM + const StreamWAV + type StreamRequest struct + Format StreamFormat + SampleRate int + Text string + VoiceID string + type TokenRates struct + CJK float64 + Clone float64 + Design float64 + STTPerSec float64 + Standard float64 + Stream float64 + ViFast float64 + ViNormal float64 + func (r TokenRates) EstimateClone() int + func (r TokenRates) EstimateDesign(options int) int + func (r TokenRates) EstimateSpeak(language Language, chars int, mode SpeakMode) int + func (r TokenRates) EstimateStream(chars int) int + func (r TokenRates) EstimateTranscription(seconds float64) int + type TokenWallet struct + Available *int64 + Balance int64 + DailyFree int64 + FreeToday int64 + Rates TokenRates + RefillsAt string + Unlimited bool + UsedToday int64 + type TranscribeRequest struct + Audio io.Reader + FileName string + Format AudioFormat + Language string + Project string + Prompt string + Size int64 + Task TranscribeTask + Title string + Words bool + type TranscribeTask string + const TaskTranscribe + const TaskTranslate + type Transcript struct + AudioBytes int64 + AudioURL string + Chars int + CreatedAt string + DoneSec float64 + DurationSec float64 + Engine string + FailReason string + FileName string + Format AudioFormat + JSONURL string + JobStatus string + Language string + LanguageProb float64 + Parts int + PartsDone int + Project string + RTF float64 + RequestedLanguage string + SRTURL string + SegmentCount int + Segments []TranscriptSegment + Source Source + Status Status + TXTURL string + Task TranscribeTask + Text string + Title string + TranscribeMs float64 + TranscriptID string + UpdatedAt string + VTTURL string + Words bool + type TranscriptPage struct + Cursor string + Items []Transcript + type TranscriptSegment struct + End float64 + ID int + Start float64 + Text string + Words []TranscriptWord + type TranscriptWord struct + End float64 + Prob float64 + Start float64 + Word string + type UsageEntry struct + At string + Free int64 + ID string + Kind string + Note string + Paid int64 + Ref string + Tokens int64 + type UsagePage struct + Cursor string + Items []UsageEntry + type Voice struct + CreatedAt string + Description string + DesignID string + Engine string + FailReason string + Gender Gender + Kind VoiceKind + Language Language + Mine bool + Name string + SampleURL string + Shared bool + Status Status + Styles []string + UpdatedAt string + VoiceID string + type VoiceDesign struct + Candidates []DesignCandidate + Count int + CreatedAt string + Description string + DesignID string + Expired bool + ExpiresAt string + FailReason string + Instruct string + Language Language + SavedVoiceIDs []string + Source Source + Status Status + Text string + Tokens int + UpdatedAt string + type VoiceFromDescriptionRequest struct + Description string + Gender Gender + Language Language + Name string + Text string + type VoiceKind string + const VoiceKindClone + const VoiceKindPreset + type VoiceUpdate struct + Description *string + Gender Gender + Name string + Shared *bool + Styles []string + func (u VoiceUpdate) MarshalJSON() ([]byte, error) + type WaitOptions struct + PollInterval time.Duration + Timeout time.Duration