Versions in this module Expand all Collapse all v0 v0.4.0 Sep 30, 2026 Changes in this version + const DefaultBaseURL + const Version + var ErrForbidden = &APIError + var ErrNotFound = &APIError + var ErrRateLimited = &APIError + var ErrStreamClosed = errors.New("voicekit: stream closed") + var ErrUnauthorized = &APIError + func B64(data []byte) string + func B64File(path string) (string, error) + func EffectsJSON(effects []map[string]any) (string, error) + func ErrorCode(err error) string + func IsCode(err error, code string) bool + func StatusCode(err error) int + type APIError struct + Code string + Message string + Status int + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type AnalyzeOptions struct + Clean bool + Diarization bool + Keyterms []string + Language string + WebhookURL string + type AnalyzeSyncOptions struct + Clean bool + Diarization bool + Emotions *bool + Entities *bool + Keyterms []string + Keywords *bool + Language string + type Attachment struct + ContentType string + Data []byte + Name string + func Bytes(data []byte) Attachment + func File(path string) (Attachment, error) + func (a Attachment) WithContentType(contentType string) Attachment + func (a Attachment) WithName(name string) Attachment + type AudioEffectsOptions struct + Effects []map[string]any + OutputFormat string + WebhookURL string + type CleanAudioOptions struct + Options map[string]any + OutputFormat string + WebhookURL string + type Client struct + func NewClient(apiKey string, opts ...Option) (*Client, error) + func (c *Client) Analyze(ctx context.Context, audio Attachment, opts *AnalyzeOptions) (Object, error) + func (c *Client) AnalyzeSync(ctx context.Context, audio Attachment, opts *AnalyzeSyncOptions) (Object, error) + func (c *Client) AnalyzeVoice(ctx context.Context, audio Attachment) (Object, error) + func (c *Client) ApplyAudioEffects(ctx context.Context, audio Attachment, opts *AudioEffectsOptions) (Object, error) + func (c *Client) ApplyVideoEffects(ctx context.Context, video Attachment, opts *VideoEffectsOptions) (Object, error) + func (c *Client) Ask(ctx context.Context, query string) (Object, error) + func (c *Client) BaseURL() string + func (c *Client) BatchAnalyze(ctx context.Context, items []map[string]any) (Object, error) + func (c *Client) BatchSynthesize(ctx context.Context, items []map[string]any) (Object, error) + func (c *Client) BillingBalance(ctx context.Context) (Object, error) + func (c *Client) CleanAudio(ctx context.Context, audio Attachment, opts *CleanAudioOptions) (Object, error) + func (c *Client) CreateCloneVoice(ctx context.Context, name, promptText string, samples []Attachment, ...) (Object, error) + func (c *Client) CreateShare(ctx context.Context, recordingID string, opts *CreateShareOptions) (Object, error) + func (c *Client) DeleteCloneVoice(ctx context.Context, cloneID string) error + func (c *Client) DeleteRecording(ctx context.Context, recordingID string) error + func (c *Client) DeleteVoiceProfile(ctx context.Context, profileID string) error + func (c *Client) DetectLanguage(ctx context.Context, text string) (Object, error) + func (c *Client) DownloadAudioCleaning(ctx context.Context, jobID string) ([]byte, error) + func (c *Client) DownloadAudioEffects(ctx context.Context, jobID string) ([]byte, error) + func (c *Client) DownloadRecordingAudio(ctx context.Context, recordingID string) ([]byte, error) + func (c *Client) DownloadSynthesisAudio(ctx context.Context, jobID string) ([]byte, error) + func (c *Client) DownloadVideoEffects(ctx context.Context, jobID string) ([]byte, error) + func (c *Client) EnrollVoice(ctx context.Context, audio Attachment, name string) (Object, error) + func (c *Client) Evaluate(ctx context.Context, audio Attachment, reference string, opts *EvaluateOptions) (Object, error) + func (c *Client) ExportRecording(ctx context.Context, recordingID, format string) ([]byte, error) + func (c *Client) GetAnalysisJob(ctx context.Context, jobID string) (Object, error) + func (c *Client) GetAudioCleaningJob(ctx context.Context, jobID string) (Object, error) + func (c *Client) GetAudioEffectsJob(ctx context.Context, jobID string) (Object, error) + func (c *Client) GetBatch(ctx context.Context, batchID string) (Object, error) + func (c *Client) GetCloneVoice(ctx context.Context, cloneID string) (Object, error) + func (c *Client) GetRecording(ctx context.Context, recordingID string) (Object, error) + func (c *Client) GetSynthesisJob(ctx context.Context, jobID string) (Object, error) + func (c *Client) GetTranscriptionJob(ctx context.Context, jobID string) (Object, error) + func (c *Client) GetVideoEffectsJob(ctx context.Context, jobID string) (Object, error) + func (c *Client) IdentifyVoice(ctx context.Context, audio Attachment, profileIDs []string) (Object, error) + func (c *Client) ListCloneVoices(ctx context.Context) ([]Object, error) + func (c *Client) ListRecordings(ctx context.Context, opts *RecordingListOptions) (Object, error) + func (c *Client) ListShares(ctx context.Context, recordingID string) ([]Object, error) + func (c *Client) ListVoiceProfiles(ctx context.Context) ([]Object, error) + func (c *Client) MeetingProtocol(ctx context.Context, recordingID, template string) (Object, error) + func (c *Client) Moderate(ctx context.Context, text, language string) (Object, error) + func (c *Client) QAAnalytics(ctx context.Context, days int) (Object, error) + func (c *Client) QAEvaluate(ctx context.Context, recordingID string, opts *QAEvaluateOptions) (Object, error) + func (c *Client) QAEvaluations(ctx context.Context, limit, offset int) (Object, error) + func (c *Client) QAExport(ctx context.Context, format string, days int) ([]byte, error) + func (c *Client) RecordingFolders(ctx context.Context) ([]string, error) + func (c *Client) RecordingFromLink(ctx context.Context, audioURL, language string) (Object, error) + func (c *Client) RecordingSpeakers(ctx context.Context, recordingID string) (Object, error) + func (c *Client) RecordingTags(ctx context.Context) ([]string, error) + func (c *Client) RecordingTranscript(ctx context.Context, recordingID string) (Object, error) + func (c *Client) Redact(ctx context.Context, text, language string) (Object, error) + func (c *Client) RevokeShare(ctx context.Context, recordingID, token string) error + func (c *Client) Search(ctx context.Context, query string, opts *SearchOptions) (Object, error) + func (c *Client) Subtitles(ctx context.Context, jobID string, opts *SubtitleOptions) (string, error) + func (c *Client) Summarize(ctx context.Context, text string, opts *SummarizeOptions) (Object, error) + func (c *Client) Synthesize(ctx context.Context, text string, opts *SynthesizeOptions) ([]byte, error) + func (c *Client) SynthesizeAsync(ctx context.Context, text string, opts *SynthesizeAsyncOptions) (Object, error) + func (c *Client) SynthesizeStream(ctx context.Context, text string, opts *SynthesizeOptions) (io.ReadCloser, error) + func (c *Client) Topics(ctx context.Context, text, language string) (Object, error) + func (c *Client) Transcribe(ctx context.Context, audio Attachment, opts *TranscribeOptions) (Object, error) + func (c *Client) TranscribeStream(ctx context.Context, opts *StreamOptions) (*Stream, error) + func (c *Client) TranscribeSync(ctx context.Context, audio Attachment, opts *TranscribeSyncOptions) (Object, error) + func (c *Client) TranslateTranscript(ctx context.Context, jobID, targetLanguage string) (Object, error) + func (c *Client) UpdateRecording(ctx context.Context, recordingID string, opts UpdateRecordingOptions) (Object, error) + func (c *Client) UpdateSpeaker(ctx context.Context, recordingID, speakerID, displayName, role string) (Object, error) + func (c *Client) Usage(ctx context.Context) (Object, error) + func (c *Client) VAD(ctx context.Context, audio Attachment) (Object, error) + func (c *Client) VADStream(ctx context.Context) (*Stream, error) + func (c *Client) VerifyVoice(ctx context.Context, audio Attachment, profileID string) (Object, error) + func (c *Client) Voice(ctx context.Context, voiceID string) (Object, error) + func (c *Client) Voices(ctx context.Context) ([]Object, error) + type CreateShareOptions struct + ExpiresInSeconds int + Password string + type EvaluateOptions struct + Language string + Normalize *bool + type Object map[string]any + func (o Object) Bool(key string) bool + func (o Object) Get(key string) any + func (o Object) Int(key string) int + func (o Object) List(key string) []Object + func (o Object) Num(key string) float64 + func (o Object) Obj(key string) Object + func (o Object) Str(key string) string + func (o Object) Strings(key string) []string + type Option func(*config) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(hc *http.Client) Option + func WithTimeout(d time.Duration) Option + type QAEvaluateOptions struct + Checklist []map[string]any + WebhookURL string + type RecordingListOptions struct + Folder string + Limit int + Offset int + Source string + Tag string + type SearchOptions struct + From string + Keywords string + Limit int + MaxDuration float64 + MinDuration float64 + Source string + Speaker string + To string + type Stream struct + func (s *Stream) Close() error + func (s *Stream) Receive(ctx context.Context) (Object, error) + func (s *Stream) SendAudio(ctx context.Context, pcm16 []byte) error + func (s *Stream) SendJSON(ctx context.Context, message any) error + func (s *Stream) Stop(ctx context.Context) error + type StreamOptions struct + Interim *bool + Keyterms []string + Language string + type SubtitleOptions struct + Format string + HotMarks bool + TargetLanguage string + type SummarizeOptions struct + Language string + MaxSentences int + type SynthesizeAsyncOptions struct + Format string + Language string + Model string + SampleRate int + Speed float64 + Voice string + WebhookURL string + type SynthesizeOptions struct + Effects string + Emotion string + Format string + Language string + Model string + Normalize *bool + Pitch float64 + PutAccent *bool + PutYo *bool + SSML *bool + SampleRate int + Speed float64 + Voice string + type TranscribeOptions struct + Clean bool + Diarization bool + Keyterms []string + Language string + LongForm bool + WebhookURL string + type TranscribeSyncOptions struct + Clean bool + Diarization bool + Keyterms []string + Language string + type UpdateRecordingOptions struct + ClearTags bool + Folder *string + Tags []string + type VideoEffectsOptions struct + Audio *Attachment + Effects []map[string]any + Mode string + OutputFormat string + WebhookURL string