types/speaker.go

LocalAI · core/http/endpoints/openai/types/speaker.go · go · MIT
voice, tag:knn-classified

Defines a Speaker struct for audio turn recognition, extending OpenAI Realtime schema.

// Source: https://github.com/mudler/LocalAI | License: MIT | Copyright 2023-2025 Ettore Di Giacinto (mudler@localai.io)
// Provided via justclaw.it.com; keep this notice with the code.
package types

// Speaker is the recognized speaker for a committed audio turn. It is a LocalAI
// extension to the OpenAI Realtime schema, carried on the user conversation item
// and surfaced via the conversation.item.speaker event. Confidence is a 0..100
// score relative to the match threshold (same formula as /v1/voice/identify).
type Speaker struct {
	Name       string            `json:"name,omitempty"`
	ID         string            `json:"id,omitempty"`
	Labels     map[string]string `json:"labels,omitempty"`
	Confidence float32           `json:"confidence"`
	Distance   float32           `json:"distan

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key