audioproviders

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package audioproviders exposes seshat's stt.SpeechToText and tts.Generation implementations for direct use by a host application, independent of the agent/tool loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAISTT

type OpenAISTT = internalproviders.OpenAISTT

OpenAISTT transcribes audio using OpenAI Whisper - or, via WithSTTBaseURL, any OpenAI-API-compatible transcription server, such as a locally running whisper.cpp server (no API key required in that case, since local servers don't check the Authorization header).

func NewOpenAISTT

func NewOpenAISTT(apiKey string, opts ...OpenAISTTOption) *OpenAISTT

NewOpenAISTT creates an OpenAI Whisper STT client. audioData passed to Transcribe may be MP3, MP4, MPEG, MPGA, M4A, WAV, or WebM.

type OpenAISTTOption

type OpenAISTTOption = internalproviders.OpenAISTTOption

OpenAISTTOption configures an OpenAISTT client.

func WithSTTBaseURL

func WithSTTBaseURL(url string) OpenAISTTOption

WithSTTBaseURL overrides the default endpoint - point this at a self-hosted, OpenAI-API-compatible transcription server (e.g. a local whisper.cpp server) instead of the real OpenAI cloud.

func WithSTTHTTPClient

func WithSTTHTTPClient(hc *http.Client) OpenAISTTOption

WithSTTHTTPClient injects a custom HTTP client.

func WithSTTLanguage

func WithSTTLanguage(lang string) OpenAISTTOption

WithSTTLanguage sets the IETF language tag; empty means auto-detect.

func WithSTTModel

func WithSTTModel(model string) OpenAISTTOption

WithSTTModel sets the transcription model (default "whisper-1").

type OpenAITTS

type OpenAITTS = internalproviders.OpenAITTS

OpenAITTS synthesises speech using OpenAI's TTS models.

func NewOpenAITTS

func NewOpenAITTS(apiKey string, opts ...OpenAITTSOption) *OpenAITTS

NewOpenAITTS creates an OpenAI text-to-speech client.

type OpenAITTSOption

type OpenAITTSOption = internalproviders.OpenAITTSOption

OpenAITTSOption configures an OpenAITTS client.

func WithTTSBaseURL

func WithTTSBaseURL(url string) OpenAITTSOption

WithTTSBaseURL overrides the default endpoint - point this at a self-hosted, OpenAI-API-compatible TTS server instead of the real OpenAI cloud.

func WithTTSFormat

func WithTTSFormat(format string) OpenAITTSOption

WithTTSFormat sets the output audio format (e.g. "mp3", "wav").

func WithTTSHTTPClient

func WithTTSHTTPClient(hc *http.Client) OpenAITTSOption

WithTTSHTTPClient injects a custom HTTP client.

func WithTTSModel

func WithTTSModel(model string) OpenAITTSOption

WithTTSModel sets the TTS model.

func WithTTSVoice

func WithTTSVoice(voice string) OpenAITTSOption

WithTTSVoice sets the voice (e.g. "alloy", "nova").

Jump to

Keyboard shortcuts

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