Documentation
¶
Index ¶
Constants ¶
View Source
const (
ModelLong = "long"
)
Variables ¶
This section is empty.
Functions ¶
func NewSpeechClient ¶
func NewSpeechClient(ctx context.Context, retryOpts helper.RetryOptions, opts SpeechClientOptions) (contract.SpeechClient, error)
Types ¶
type Client ¶
type Client interface { contract.SpeechOperator }
func NewClient ¶
func NewClient(ctx context.Context, d Dependencies, opts ClientOptions) (Client, error)
type ClientOption ¶
type ClientOption func(*ClientOptions)
func WithCredentialsJSON ¶
func WithCredentialsJSON(x []byte) ClientOption
func WithInitialized ¶
func WithInitialized(x Initialized) ClientOption
func WithLoaded ¶
func WithLoaded(x Loaded) ClientOption
func WithProjectID ¶
func WithProjectID(x string) ClientOption
type ClientOptions ¶
type ClientOptions struct { Loaded Initialized }
func ApplyClientOptions ¶
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) Close ¶
func (d *DefaultTool) Close(ctx context.Context) error
Close shuts down the underlying speech client.
func (*DefaultTool) GetMatcher ¶ added in v0.1.460
GetMatcher returns the language matcher used by the speech client.
func (*DefaultTool) Recognize ¶
func (d *DefaultTool) Recognize(ctx context.Context, opts contract.SpeechRecognizeOptions) (*contract.SpeechToTextResponse, error)
Recognize performs speech-to-text recognition using a remote audio file.
type Dependencies ¶
type Dependencies struct { C contract.SpeechClient HD contract.HTTPDoer HR contract.HTTPRequester R contract.Reader }
type Initialized ¶
type SpeechClientOptions ¶
type SpeechClientOptions struct {
Loaded
}
Click to show internal directories.
Click to hide internal directories.