speakerid

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 10 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 speakerid adapts the self-hosted embedding service to the voices contract.

The service returns a unit-length vector per utterance and nothing else. It deliberately does not compare them: what counts as the same person is a policy decision, and policy belongs where the rest of the policy is.

Index

Constants

View Source
const AdapterVersion = "speakerid-http-pcm16-1"

AdapterVersion identifies the HTTP/PCM contract implemented here. The embedding model and its immutable weights are separate deployment pins.

View Source
const DefaultEndpoint = "http://127.0.0.1:8124/embed"

DefaultEndpoint is where tools/speakerid serves embeddings.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter is safe for concurrent calls.

func New

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

New returns a client for the embedding service.

func (*Adapter) Embed

func (adapter *Adapter) Embed(ctx context.Context, pcm []byte, rateHz uint32) ([]float32, error)

Embed returns the speaker embedding of one stretch of audio.

An utterance too short to identify comes back as no embedding rather than as an error: the service is reporting that it cannot tell, which is an answer.

type Config

type Config struct {
	Endpoint       string
	HTTPClient     *http.Client
	RequestTimeout time.Duration
}

Config configures the client.

Jump to

Keyboard shortcuts

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