speakercontract

package
v0.76.6 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 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 speakercontract holds test-only conformance helpers that speaker provider tests use to assert the public speaker contracts: complete diarization results, well-formed realtime frames, unknown labels left unattributed, and provider errors that name the provider without leaking credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertDiarizationResult

func AssertDiarizationResult(t testing.TB, result *speaker.DiarizationResult)

AssertDiarizationResult fails t unless result is non-nil, names its provider and model, carries text, reports a level stronger than speaker.IdentificationNone, and has non-empty words (each with text), segments, and speakers.

func AssertKnownAttribution

func AssertKnownAttribution(t testing.TB, result *speaker.DiarizationResult, wantName string)

AssertKnownAttribution runs AssertDiarizationResult and then fails t unless some segment or speaker carries wantName as its DisplayName or PersonID.

func AssertProviderError

func AssertProviderError(t testing.TB, err error, provider string)

AssertProviderError fails t unless err is non-nil, mentions provider case-insensitively, and contains none of the secret-shaped fragments a provider response body could leak.

func AssertSpeakerFrame

func AssertSpeakerFrame(t testing.TB, frame *speaker.SpeakerFrame)

AssertSpeakerFrame fails t unless frame is non-nil, names its provider and model, has a positive Sequence, and carries text or words (each word with text).

func AssertUnknownIsUnattributed

func AssertUnknownIsUnattributed(t testing.TB, raw any)

AssertUnknownIsUnattributed fails t unless speaker.NormalizeSpeakerLabel maps raw to the empty, unattributed label.

Types

This section is empty.

Jump to

Keyboard shortcuts

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