Documentation
¶
Index ¶
- func LanguageCode(language string) (string, string)
- type Client
- func (c *Client) DeleteModel(ctx context.Context, model string) error
- func (c *Client) DownloadModel(ctx context.Context, path string, fn func(cur, total uint64)) (*schema.Model, error)
- func (c *Client) ListModels(ctx context.Context) ([]schema.Model, error)
- func (c *Client) Transcribe(ctx context.Context, model string, r io.Reader, opt ...Opt) (*schema.Transcription, error)
- func (c *Client) Translate(ctx context.Context, model string, r io.Reader, opt ...Opt) (*schema.Transcription, error)
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LanguageCode ¶ added in v0.0.23
LanguageCode returns the two-letter (OpenAI) and three-letter (ElevenLabs) codes for a given language, or an empty string if the language is not recognized.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteModel ¶
Delete existing model
func (*Client) DownloadModel ¶
func (c *Client) DownloadModel(ctx context.Context, path string, fn func(cur, total uint64)) (*schema.Model, error)
Download model for use in transcription and translation
func (*Client) ListModels ¶
List models for transcription and translation
type Opt ¶
type Opt func(apitype, *opts) error
func OptDiarize ¶ added in v0.0.23
func OptDiarize() Opt
Identify speakers in the audio and return their speech separately.
func OptLogprobs ¶ added in v0.0.23
func OptLogprobs() Opt
Return the log probabilities of the tokens in the response to understand the model's confidence in the transcription.
func OptPrompt ¶ added in v0.0.23
Text to guide the model's style or continue a previous audio segment.
func OptStream ¶ added in v0.0.23
func OptStream() Opt
Model response data will be streamed to the client as it is generated using server-sent events.
func OptTemperature ¶ added in v0.0.23
The sampling temperature, between 0 and 1.