modulate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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