modulate

package
v0.0.0-...-1770f56 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package modulate implements Modulate Velma-2 streaming speech-to-text.

Index

Constants

View Source
const (
	// BatchAdapterID identifies the Velma batch implementation.
	BatchAdapterID = "modulate.stt.batch.v1"
	// BatchEndpointMultilingual is the batch twin of the multilingual
	// streaming model; BatchEndpointEnglishFast pairs with English Fast. The
	// model is selected by PATH on this API, so each catalog row carries its
	// own endpoint and the model id names the path's last segment.
	BatchEndpointMultilingual = "https://platform.modulate.ai/api/velma-2-stt-batch"
	BatchEndpointEnglishFast  = "https://platform.modulate.ai/api/velma-2-stt-batch-english-vfast"
	// BatchModelMultilingual and BatchModelEnglishFast are the batch model ids.
	BatchModelMultilingual = "velma-2-stt-batch"
	BatchModelEnglishFast  = "velma-2-stt-batch-english-vfast"
	// BatchMaxAudioBytes is the documented upload ceiling ("100 MB", 413
	// above). It binds long before any duration: 16 kHz mono WAV crosses it at
	// about 52 minutes.
	BatchMaxAudioBytes int64 = 100_000_000
	// BatchMaxDurationSeconds is a local bound consistent with the byte cap at
	// the lowest rate this gateway carries (8 kHz mono, ~104 min).
	BatchMaxDurationSeconds int64 = 100 * 60
)
View Source
const (
	// AdapterID is the stable identifier carried by Modulate STT session plans.
	AdapterID = "modulate.stt.v1"

	// EnglishFastModel is Modulate's lowest-latency English streaming model.
	EnglishFastModel = "velma-2-stt-streaming-english-v2"
	// MultilingualModel adds automatic language detection, diarization, and
	// optional acoustic enrichments. Speko enables partials and diarization but
	// leaves the separately billed enrichment signals off.
	MultilingualModel = "velma-2-stt-streaming"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter implements both current Modulate streaming transcription endpoints.

func New

func New(config Config) (*Adapter, error)

func (*Adapter) ID

func (a *Adapter) ID() string

func (*Adapter) Open

type BatchAdapter

type BatchAdapter struct {
	// contains filtered or unexported fields
}

BatchAdapter implements runtime.BatchTranscriber over the Velma batch endpoints.

func NewBatch

func NewBatch(config BatchConfig) (*BatchAdapter, error)

NewBatch creates the batch adapter.

func (*BatchAdapter) ID

func (a *BatchAdapter) ID() string

func (*BatchAdapter) Transcribe

Transcribe POSTs the WAV as the multipart `upload_file`.

type BatchConfig

type BatchConfig struct {
	AdapterID             string
	HTTPClient            *http.Client
	MaxResponseBytes      int64
	AllowedEndpointHosts  []string
	AllowInsecureEndpoint bool
}

BatchConfig controls local transport limits for the batch adapter.

type Config

type Config struct {
	AdapterID             string
	HTTPClient            *http.Client
	EventBuffer           int
	MaxMessageBytes       int64
	ShutdownTimeout       time.Duration
	AllowedEndpointHosts  []string
	AllowInsecureEndpoint bool
}

Config controls bounded transport resources and test-only endpoint policy.

Jump to

Keyboard shortcuts

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