transcribe

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package transcribe provides a tool for speech-to-text transcription.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inputs

type Inputs struct {
	Path     string `` /* 143-byte string literal not displayed */
	Language string `json:"language,omitempty" jsonschema:"description=ISO-639-1 language code hint (e.g. en\\, de\\, ja). Empty = auto-detect."`
}

Inputs defines the parameters for the Transcribe tool.

type Tool

type Tool struct {
	tool.Base

	// Cfg is the full config — needed because this tool creates sub-agents
	// via agent.New(), which requires access to agents, providers, modes,
	// and the full BuildAgent pipeline.
	Cfg      config.Config
	CfgPaths config.Paths
	Rt       *config.Runtime
}

Tool implements speech-to-text transcription via a whisper-compatible server.

func New

func New(cfg config.Config, paths config.Paths, rt *config.Runtime) *Tool

New creates a Transcribe tool with the given configuration.

func (*Tool) Available

func (t *Tool) Available() bool

Available checks if the STT agent is configured.

func (*Tool) Execute

func (t *Tool) Execute(ctx context.Context, args map[string]any) (string, error)

Execute transcribes an audio file and returns the text.

func (*Tool) Name

func (t *Tool) Name() string

Name returns the tool's identifier.

func (*Tool) Paths

func (t *Tool) Paths(ctx context.Context, args map[string]any) (read, write []string, err error)

Paths returns the filesystem paths this tool call will access.

func (*Tool) Sandboxable

func (t *Tool) Sandboxable() bool

Sandboxable returns false because the tool makes network calls.

func (*Tool) Schema

func (t *Tool) Schema() tool.Schema

Schema returns the provider-agnostic tool definition.

Jump to

Keyboard shortcuts

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