Documentation
¶
Overview ¶
Package omnivoice provides a unified interface for speech-to-text and text-to-speech. This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Package omnivoice provides a unified interface for speech-to-text and text-to-speech. This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Package omnivoice provides a unified interface for speech-to-text and text-to-speech.
This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Quick Start ¶
Import the package with all providers:
import (
"github.com/plexusone/omnivoice"
_ "github.com/plexusone/omnivoice/providers/all"
)
Or import specific providers:
import (
"github.com/plexusone/omnivoice"
openai "github.com/plexusone/omni-openai/omnivoice"
)
Creating Providers ¶
// OpenAI provider sttProvider := openai.NewSTTProvider(apiKey) ttsProvider := openai.NewTTSProvider(apiKey) // Create multi-provider client sttClient := omnivoice.NewSTTClient(sttProvider) ttsClient := omnivoice.NewTTSClient(ttsProvider)
Package omnivoice provides a unified interface for speech-to-text and text-to-speech. This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Package omnivoice provides a unified interface for speech-to-text and text-to-speech. This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Package omnivoice provides a unified interface for speech-to-text and text-to-speech. This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Package omnivoice provides a unified interface for speech-to-text and text-to-speech. This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Package omnivoice provides a unified interface for speech-to-text and text-to-speech. This is the batteries-included package that imports all providers. For a minimal dependency footprint, use github.com/plexusone/omnivoice-core instead.
Index ¶
- Constants
- Variables
- func GetCallSystemProvider(name string, opts ...ProviderOption) (callsystem.CallSystem, error)
- func GetCallSystemProviderPriority(name string) int
- func GetGatewayProvider(name string, opts ...ProviderOption) (registry.Gateway, error)
- func GetGatewayProviderPriority(name string) int
- func GetRealtimeFactory(name string) (gateway.RealtimeProviderFactory, error)
- func GetRealtimeProvider(name string, opts ...ProviderOption) (registry.RealtimeProvider, error)
- func GetRealtimeProviderPriority(name string) int
- func GetSTTProvider(name string, opts ...ProviderOption) (stt.Provider, error)
- func GetSTTProviderPriority(name string) int
- func GetTTSProvider(name string, opts ...ProviderOption) (tts.Provider, error)
- func GetTTSProviderPriority(name string) int
- func HasCallSystemProvider(name string) bool
- func HasGatewayProvider(name string) bool
- func HasRealtimeFactory(name string) bool
- func HasRealtimeProvider(name string) bool
- func HasSTTProvider(name string) bool
- func HasTTSProvider(name string) bool
- func ListCallSystemProviders() []string
- func ListGatewayProviders() []string
- func ListRealtimeFactories() []string
- func ListRealtimeProviders() []string
- func ListSTTProviders() []string
- func ListTTSProviders() []string
- func MustGetRealtimeFactory(name string) gateway.RealtimeProviderFactory
- func RegisterCallSystemProvider(name string, factory registry.CallSystemProviderFactory, priority int)
- func RegisterGatewayProvider(name string, factory registry.GatewayProviderFactory, priority int)
- func RegisterRealtimeProvider(name string, factory registry.RealtimeProviderFactory, priority int)
- func RegisterSTTProvider(name string, factory registry.STTProviderFactory, priority int)
- func RegisterTTSProvider(name string, factory registry.TTSProviderFactory, priority int)
- func WithGatewayRealtimeConfig(config *gateway.RealtimeConfig) registry.ProviderOption
- func WithGatewayToolHandlers(provider string, handlers map[string]ToolHandler) registry.ProviderOption
- func WithGatewayTools(provider string, tools []ToolDefinition) registry.ProviderOption
- func WithRealtimeFactory(factory gateway.RealtimeProviderFactory) registry.ProviderOption
- type AudioFormat
- type Call
- type CallDirection
- type CallHandler
- type CallOption
- type CallOptions
- type CallStatus
- type CallSystem
- type CallSystemClient
- type CallSystemConfig
- type FunctionDeclaration
- type Gateway
- type GatewayCallHandler
- type GatewayCallInfo
- type GatewayConfig
- type GatewayEvent
- type GatewayEventType
- type GatewayMetrics
- type GatewayMinimal
- type GatewaySession
- type GatewayToolCall
- type GatewayTurn
- type LLMProvider
- type ProcessConfig
- type ProviderConfig
- type ProviderOption
- type RealtimeAudioChunk
- type RealtimeClient
- type RealtimeConfig
- type RealtimeProvider
- type RealtimeProviderFactory
- type RealtimeProviderMinimal
- type RealtimeTranscript
- type STTClient
- type STTProvider
- type STTStreamingProvider
- type Segment
- type StreamEvent
- type SubtitleFormat
- type SubtitleOptions
- type SynthesisConfig
- type SynthesisResult
- type TTSClient
- type TTSProvider
- type TTSStreamChunk
- type TTSStreamingProvider
- type ToolDefinition
- type ToolHandler
- type Transcript
- type TranscriptMetadata
- type TranscriptOptions
- type TranscriptSegment
- type TranscriptWord
- type TranscriptionConfig
- type TranscriptionResult
- type Voice
- type Word
Constants ¶
const ( StatusRinging = callsystem.StatusRinging StatusAnswered = callsystem.StatusAnswered StatusEnded = callsystem.StatusEnded StatusFailed = callsystem.StatusFailed StatusBusy = callsystem.StatusBusy StatusNoAnswer = callsystem.StatusNoAnswer CallInbound = callsystem.Inbound CallOutbound = callsystem.Outbound )
Re-export CallStatus constants
const ( GatewayProviderTwilio = gateway.ProviderTwilio GatewayProviderTelnyx = gateway.ProviderTelnyx GatewayProviderVonage = gateway.ProviderVonage GatewayProviderPlivo = gateway.ProviderPlivo GatewayProviderLiveKit = gateway.ProviderLiveKit )
Re-export Gateway provider name constants
const ( PipelineModeText = gateway.PipelineModeText PipelineModeRealtime = gateway.PipelineModeRealtime )
Re-export Pipeline mode constants
const ( EventSessionStarted = gateway.EventSessionStarted EventSessionEnded = gateway.EventSessionEnded EventUserSpeechStart = gateway.EventUserSpeechStart EventUserSpeechEnd = gateway.EventUserSpeechEnd EventUserTranscript = gateway.EventUserTranscript EventAgentThinking = gateway.EventAgentThinking EventAgentSpeechStart = gateway.EventAgentSpeechStart EventAgentSpeechEnd = gateway.EventAgentSpeechEnd EventAgentTranscript = gateway.EventAgentTranscript EventToolCall = gateway.EventToolCall EventInterruption = gateway.EventInterruption EventError = gateway.EventError EventAudioReceived = gateway.EventAudioReceived EventAudioSent = gateway.EventAudioSent )
Re-export Gateway event type constants
const ( // PriorityThin is the priority for thin (stdlib-only) provider implementations. PriorityThin = core.PriorityThin // PriorityThick is the priority for thick (official SDK) provider implementations. PriorityThick = core.PriorityThick )
Re-export priority constants from omnivoice-core.
const ( SubtitleFormatSRT = subtitle.FormatSRT SubtitleFormatVTT = subtitle.FormatVTT )
Subtitle format constants.
const TranscriptFormatVersion = stt.TranscriptFormatVersion
TranscriptFormatVersion is the current version of the OmniVoice transcript format.
const TranscriptSchemaURL = stt.TranscriptSchemaURL
TranscriptSchemaURL is the JSON Schema URL for the transcript format.
const Version = "0.10.0"
Version is the current version of the omnivoice package.
Variables ¶
var ( WithFrom = callsystem.WithFrom WithTimeout = callsystem.WithTimeout WithMachineDetection = callsystem.WithMachineDetection WithRecording = callsystem.WithRecording WithWhisper = callsystem.WithWhisper WithAgent = callsystem.WithAgent WithStatusCallback = callsystem.WithStatusCallback )
Re-export CallOption functions
var ( AudioFormatTwilio = gateway.AudioFormatTwilio AudioFormatTelnyx = gateway.AudioFormatTelnyx AudioFormatOpenAI = gateway.AudioFormatOpenAI AudioFormatGeminiInput = gateway.AudioFormatGeminiInput AudioFormatGeminiOutput = gateway.AudioFormatGeminiOutput )
var ( // Core options WithAPIKey = registry.WithAPIKey WithBaseURL = registry.WithBaseURL WithExtension = registry.WithExtension // CallSystem options WithAccountSID = registry.WithAccountSID WithAuthToken = registry.WithAuthToken WithPhoneNumber = registry.WithPhoneNumber WithWebhookURL = registry.WithWebhookURL WithRegion = registry.WithRegion // Gateway options WithListener = registry.WithListener WithPublicURL = registry.WithPublicURL WithListenAddr = registry.WithListenAddr WithConnectionID = registry.WithConnectionID // Realtime options WithVoice = registry.WithVoice WithModel = registry.WithModel WithInstructions = registry.WithInstructions // Pipeline options WithSTTProvider = registry.WithSTTProvider WithSTTAPIKey = registry.WithSTTAPIKey WithSTTModel = registry.WithSTTModel WithSTTLanguage = registry.WithSTTLanguage WithTTSProvider = registry.WithTTSProvider WithTTSAPIKey = registry.WithTTSAPIKey WithTTSVoiceID = registry.WithTTSVoiceID WithTTSModel = registry.WithTTSModel WithLLMProvider = registry.WithLLMProvider WithLLMAPIKey = registry.WithLLMAPIKey WithLLMModel = registry.WithLLMModel WithLLMSystemPrompt = registry.WithLLMSystemPrompt // Session options WithGreeting = registry.WithGreeting WithMaxSessionDuration = registry.WithMaxSessionDuration WithInterruptionMode = registry.WithInterruptionMode WithLogger = registry.WithLogger WithPipelineMode = registry.WithPipelineMode )
Re-export registry option functions from omnivoice-core.
var ( ErrNoAvailableProvider = stt.ErrNoAvailableProvider ErrStreamingNotSupported = stt.ErrStreamingNotSupported ErrInvalidAudio = stt.ErrInvalidAudio ErrInvalidConfig = stt.ErrInvalidConfig ErrAudioTooLong = stt.ErrAudioTooLong ErrAudioTooShort = stt.ErrAudioTooShort ErrRateLimited = stt.ErrRateLimited ErrQuotaExceeded = stt.ErrQuotaExceeded ErrUnsupportedLanguage = stt.ErrUnsupportedLanguage ErrUnsupportedFormat = stt.ErrUnsupportedFormat ErrStreamClosed = stt.ErrStreamClosed )
Re-export STT errors
var ( // DefaultSubtitleOptions returns sensible defaults for subtitle generation. DefaultSubtitleOptions = subtitle.DefaultOptions // GenerateSRT generates SRT subtitles from a transcription result. GenerateSRT = subtitle.GenerateSRT // GenerateVTT generates WebVTT subtitles from a transcription result. GenerateVTT = subtitle.GenerateVTT // SaveSRT generates and saves SRT to a file. SaveSRT = subtitle.SaveSRT // SaveVTT generates and saves WebVTT to a file. SaveVTT = subtitle.SaveVTT )
Re-export subtitle functions.
var ( ErrTTSNoAvailableProvider = tts.ErrNoAvailableProvider ErrVoiceNotFound = tts.ErrVoiceNotFound ErrTTSInvalidConfig = tts.ErrInvalidConfig ErrTTSRateLimited = tts.ErrRateLimited ErrTTSQuotaExceeded = tts.ErrQuotaExceeded ErrTTSStreamClosed = tts.ErrStreamClosed )
Re-export TTS errors
var NewCallSystemClient = callsystem.NewClient
NewCallSystemClient creates a new CallSystem client with the given providers. The first provider becomes the primary by default.
var NewRealtimeClient = realtime.NewClient
Re-export Realtime functions
var NewSTTClient = stt.NewClient
Re-export STT functions
var NewTTSClient = tts.NewClient
Re-export TTS functions
Functions ¶
func GetCallSystemProvider ¶ added in v0.7.0
func GetCallSystemProvider(name string, opts ...ProviderOption) (callsystem.CallSystem, error)
GetCallSystemProvider creates a CallSystem provider instance from the registry.
func GetCallSystemProviderPriority ¶ added in v0.10.0
GetCallSystemProviderPriority returns the priority of the registered CallSystem provider.
func GetGatewayProvider ¶ added in v0.10.0
func GetGatewayProvider(name string, opts ...ProviderOption) (registry.Gateway, error)
GetGatewayProvider creates a Gateway provider instance from the registry.
func GetGatewayProviderPriority ¶ added in v0.10.0
GetGatewayProviderPriority returns the priority of the registered Gateway provider.
func GetRealtimeFactory ¶ added in v0.11.0
func GetRealtimeFactory(name string) (gateway.RealtimeProviderFactory, error)
GetRealtimeFactory returns a realtime provider factory by name. Supported providers:
- "openai": OpenAI Realtime API (~100ms latency)
- "gemini": Google Gemini Live API (~200ms latency)
Example:
factory, err := omnivoice.GetRealtimeFactory("openai")
if err != nil {
log.Fatal(err)
}
// Use factory with gateway configuration
func GetRealtimeProvider ¶ added in v0.9.0
func GetRealtimeProvider(name string, opts ...ProviderOption) (registry.RealtimeProvider, error)
GetRealtimeProvider creates a Realtime provider instance from the registry.
Realtime providers enable native voice-to-voice conversations with low latency (~100-300ms). Available providers include:
- "openai": OpenAI Realtime API (~100ms latency)
- "gemini": Google Gemini Live API (~200ms latency)
Example:
provider, err := omnivoice.GetRealtimeProvider("openai",
omnivoice.WithAPIKey(os.Getenv("OPENAI_API_KEY")))
func GetRealtimeProviderPriority ¶ added in v0.10.0
GetRealtimeProviderPriority returns the priority of the registered Realtime provider.
func GetSTTProvider ¶
func GetSTTProvider(name string, opts ...ProviderOption) (stt.Provider, error)
GetSTTProvider creates an STT provider instance from the registry.
func GetSTTProviderPriority ¶ added in v0.10.0
GetSTTProviderPriority returns the priority of the registered STT provider.
func GetTTSProvider ¶
func GetTTSProvider(name string, opts ...ProviderOption) (tts.Provider, error)
GetTTSProvider creates a TTS provider instance from the registry.
func GetTTSProviderPriority ¶ added in v0.10.0
GetTTSProviderPriority returns the priority of the registered TTS provider.
func HasCallSystemProvider ¶ added in v0.7.0
HasCallSystemProvider returns true if a CallSystem provider with the given name is registered.
func HasGatewayProvider ¶ added in v0.10.0
HasGatewayProvider returns true if a Gateway provider with the given name is registered.
func HasRealtimeFactory ¶ added in v0.11.0
HasRealtimeFactory returns true if a realtime factory with the given name exists.
func HasRealtimeProvider ¶ added in v0.9.0
HasRealtimeProvider returns true if a Realtime provider with the given name is registered.
func HasSTTProvider ¶
HasSTTProvider returns true if an STT provider with the given name is registered.
func HasTTSProvider ¶
HasTTSProvider returns true if a TTS provider with the given name is registered.
func ListCallSystemProviders ¶ added in v0.7.0
func ListCallSystemProviders() []string
ListCallSystemProviders returns a list of all registered CallSystem provider names.
func ListGatewayProviders ¶ added in v0.10.0
func ListGatewayProviders() []string
ListGatewayProviders returns a list of all registered Gateway provider names.
func ListRealtimeFactories ¶ added in v0.11.0
func ListRealtimeFactories() []string
ListRealtimeFactories returns the names of all available realtime factories.
func ListRealtimeProviders ¶ added in v0.9.0
func ListRealtimeProviders() []string
ListRealtimeProviders returns a list of all registered Realtime provider names.
func ListSTTProviders ¶
func ListSTTProviders() []string
ListSTTProviders returns a list of all registered STT provider names.
func ListTTSProviders ¶
func ListTTSProviders() []string
ListTTSProviders returns a list of all registered TTS provider names.
func MustGetRealtimeFactory ¶ added in v0.11.0
func MustGetRealtimeFactory(name string) gateway.RealtimeProviderFactory
MustGetRealtimeFactory returns a realtime provider factory by name. It panics if the factory is not found.
func RegisterCallSystemProvider ¶ added in v0.7.0
func RegisterCallSystemProvider(name string, factory registry.CallSystemProviderFactory, priority int)
RegisterCallSystemProvider registers a CallSystem provider factory with the given name and priority. Higher priority values override lower priority registrations.
func RegisterGatewayProvider ¶ added in v0.10.0
func RegisterGatewayProvider(name string, factory registry.GatewayProviderFactory, priority int)
RegisterGatewayProvider registers a Gateway provider factory with the given name and priority. Higher priority values override lower priority registrations.
func RegisterRealtimeProvider ¶ added in v0.9.0
func RegisterRealtimeProvider(name string, factory registry.RealtimeProviderFactory, priority int)
RegisterRealtimeProvider registers a Realtime provider factory with the given name and priority. Higher priority values override lower priority registrations.
func RegisterSTTProvider ¶
func RegisterSTTProvider(name string, factory registry.STTProviderFactory, priority int)
RegisterSTTProvider registers an STT provider factory with the given name and priority. Higher priority values override lower priority registrations.
func RegisterTTSProvider ¶
func RegisterTTSProvider(name string, factory registry.TTSProviderFactory, priority int)
RegisterTTSProvider registers a TTS provider factory with the given name and priority. Higher priority values override lower priority registrations.
func WithGatewayRealtimeConfig ¶ added in v0.11.0
func WithGatewayRealtimeConfig(config *gateway.RealtimeConfig) registry.ProviderOption
WithGatewayRealtimeConfig returns a provider option that configures realtime settings. This is used for native voice-to-voice mode with gateways.
func WithGatewayToolHandlers ¶ added in v0.11.0
func WithGatewayToolHandlers(provider string, handlers map[string]ToolHandler) registry.ProviderOption
WithGatewayToolHandlers returns a provider option that configures tool handlers for a gateway. The provider parameter specifies which gateway provider to configure ("twilio" or "telnyx").
func WithGatewayTools ¶ added in v0.11.0
func WithGatewayTools(provider string, tools []ToolDefinition) registry.ProviderOption
WithGatewayTools returns a provider option that configures tools for a gateway. The provider parameter specifies which gateway provider to configure ("twilio" or "telnyx").
func WithRealtimeFactory ¶ added in v0.11.0
func WithRealtimeFactory(factory gateway.RealtimeProviderFactory) registry.ProviderOption
WithRealtimeFactory returns a provider option that configures a realtime provider factory. This is used for native voice-to-voice mode with gateways.
Types ¶
type AudioFormat ¶ added in v0.10.0
type AudioFormat = gateway.AudioFormat
Re-export audio format types and constants
type CallDirection ¶ added in v0.6.0
type CallDirection = callsystem.CallDirection
CallDirection indicates inbound or outbound call.
type CallHandler ¶ added in v0.6.0
type CallHandler = callsystem.CallHandler
CallHandler is called when a new call arrives.
type CallOption ¶ added in v0.6.0
type CallOption = callsystem.CallOption
CallOption configures an outbound call.
type CallOptions ¶ added in v0.6.0
type CallOptions = callsystem.CallOptions
CallOptions holds parsed options for MakeCall.
type CallStatus ¶ added in v0.6.0
type CallStatus = callsystem.CallStatus
CallStatus represents the call state.
type CallSystem ¶ added in v0.6.0
type CallSystem = callsystem.CallSystem
CallSystem defines the interface for telephony/meeting integrations.
type CallSystemClient ¶ added in v0.7.0
type CallSystemClient = callsystem.Client
CallSystemClient manages multiple CallSystem providers with fallback support.
type CallSystemConfig ¶ added in v0.6.0
type CallSystemConfig = callsystem.CallSystemConfig
CallSystemConfig configures a call system integration.
type FunctionDeclaration ¶ added in v0.9.0
type FunctionDeclaration = realtime.FunctionDeclaration
FunctionDeclaration describes a function the model can call.
type GatewayCallHandler ¶ added in v0.10.0
type GatewayCallHandler = gateway.CallHandler
GatewayCallHandler is called when a new call is received.
type GatewayCallInfo ¶ added in v0.10.0
GatewayCallInfo contains information about a call.
type GatewayConfig ¶ added in v0.10.0
GatewayConfig provides common configuration for voice gateways.
type GatewayEvent ¶ added in v0.10.0
GatewayEvent represents a session event.
type GatewayEventType ¶ added in v0.10.0
GatewayEventType identifies the type of session event.
type GatewayMetrics ¶ added in v0.10.0
GatewayMetrics contains session performance metrics.
type GatewayMinimal ¶ added in v0.10.0
GatewayMinimal is the minimal interface used by the registry. Use type assertion to access the full Gateway interface.
type GatewaySession ¶ added in v0.10.0
GatewaySession represents an active voice conversation session.
type GatewayToolCall ¶ added in v0.10.0
GatewayToolCall represents a tool invocation during conversation.
type GatewayTurn ¶ added in v0.10.0
GatewayTurn represents a single conversation turn.
type LLMProvider ¶ added in v0.10.0
type LLMProvider = gateway.LLMProvider
LLMProvider defines the interface for LLM integration with voice gateways.
type ProcessConfig ¶ added in v0.9.0
type ProcessConfig = realtime.ProcessConfig
ProcessConfig configures a real-time audio processing session.
type ProviderConfig ¶
type ProviderConfig = registry.ProviderConfig
ProviderConfig holds common configuration options for creating providers.
type ProviderOption ¶
type ProviderOption = registry.ProviderOption
ProviderOption configures a ProviderConfig.
type RealtimeAudioChunk ¶ added in v0.9.0
type RealtimeAudioChunk = realtime.AudioChunk
RealtimeAudioChunk represents a chunk of audio data from the model.
type RealtimeClient ¶ added in v0.9.0
RealtimeClient is the multi-provider Realtime client.
type RealtimeConfig ¶ added in v0.10.0
type RealtimeConfig = gateway.RealtimeConfig
RealtimeConfig configures a realtime provider for voice-to-voice.
type RealtimeProvider ¶ added in v0.9.0
RealtimeProvider defines the interface for real-time voice-to-voice providers. This is the full interface from realtime package with ProcessAudioStream.
type RealtimeProviderFactory ¶ added in v0.9.0
type RealtimeProviderFactory = gateway.RealtimeProviderFactory
RealtimeProviderFactory creates realtime providers from configuration.
type RealtimeProviderMinimal ¶ added in v0.10.0
type RealtimeProviderMinimal = registry.RealtimeProvider
RealtimeProviderMinimal is the minimal interface used by the registry. Use type assertion to access the full RealtimeProvider interface.
type RealtimeTranscript ¶ added in v0.9.0
type RealtimeTranscript = realtime.Transcript
RealtimeTranscript represents a transcript update during a realtime conversation.
type STTProvider ¶
STTProvider defines the interface for STT providers.
type STTStreamingProvider ¶
type STTStreamingProvider = stt.StreamingProvider
STTStreamingProvider extends Provider with streaming support.
type StreamEvent ¶
type StreamEvent = stt.StreamEvent
StreamEvent represents a streaming transcription event.
type SubtitleFormat ¶
SubtitleFormat represents the output format for subtitles.
type SubtitleOptions ¶
SubtitleOptions configures subtitle generation.
type SynthesisConfig ¶
type SynthesisConfig = tts.SynthesisConfig
SynthesisConfig configures a TTS synthesis request.
type SynthesisResult ¶
type SynthesisResult = tts.SynthesisResult
SynthesisResult contains the result of a TTS synthesis.
type TTSProvider ¶
TTSProvider defines the interface for TTS providers.
type TTSStreamChunk ¶
type TTSStreamChunk = tts.StreamChunk
StreamChunk represents a chunk of streaming audio.
type TTSStreamingProvider ¶
type TTSStreamingProvider = tts.StreamingProvider
TTSStreamingProvider extends Provider with input streaming support.
type ToolDefinition ¶ added in v0.11.0
type ToolDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters map[string]any `json:"parameters,omitempty"`
}
ToolDefinition defines a tool that can be called during voice conversations. This is a generic type that works with any gateway provider.
type ToolHandler ¶ added in v0.11.0
ToolHandler is a function that handles tool calls during voice conversations.
type Transcript ¶ added in v0.8.0
type Transcript = stt.Transcript
Type aliases for backwards compatibility.
func LoadTranscript ¶ added in v0.8.0
func LoadTranscript(filePath string) (*Transcript, error)
LoadTranscript reads a transcript from a JSON file.
func NewTranscript ¶ added in v0.8.0
func NewTranscript(result *TranscriptionResult, provider, model, audioFile string, config *TranscriptionConfig) *Transcript
NewTranscript creates a Transcript from a TranscriptionResult. This is a convenience wrapper around stt.NewTranscript.
type TranscriptMetadata ¶ added in v0.8.0
type TranscriptMetadata = stt.TranscriptMetadata
Type aliases for backwards compatibility.
type TranscriptOptions ¶ added in v0.8.0
type TranscriptOptions = stt.TranscriptOptions
Type aliases for backwards compatibility.
type TranscriptSegment ¶ added in v0.8.0
type TranscriptSegment = stt.TranscriptSegment
Type aliases for backwards compatibility.
type TranscriptWord ¶ added in v0.8.0
type TranscriptWord = stt.TranscriptWord
Type aliases for backwards compatibility.
type TranscriptionConfig ¶
type TranscriptionConfig = stt.TranscriptionConfig
TranscriptionConfig configures a STT transcription request.
type TranscriptionResult ¶
type TranscriptionResult = stt.TranscriptionResult
TranscriptionResult contains the result of a STT transcription.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
omnivoice
command
Package main provides the entry point for the omnivoice CLI.
|
Package main provides the entry point for the omnivoice CLI. |
|
internal
|
|
|
cli
Package cli provides the command-line interface for omnivoice.
|
Package cli provides the command-line interface for omnivoice. |
|
providers
|
|
|
all
Package all imports and registers all omnivoice providers.
|
Package all imports and registers all omnivoice providers. |
|
Package schema re-exports JSON Schema definitions from omnivoice-core.
|
Package schema re-exports JSON Schema definitions from omnivoice-core. |