Tessera Overview
Tessera is the voice-metrics module. It analyzes a PitchContour (from PitchDetection) and produces structured measurements of the singer's voice.
| Facade | Purpose |
|---|---|
Tessera | Multi-metric batch — breath + agility + range from one contour |
TesseraSession | Streaming multi-metric — feed audio incrementally |
TesseraBreath | Breath control, phrase structure, reference comparison |
TesseraAgility | Vocal agility (ornament speed and regularity) |
TesseraRange | Vocal range, search vector, song matching |
TesseraRangeSession | Guided "find your range" flow with observable state |
TesseraSpeakingPitch | Natural speaking pitch detection |
All facades operate on a tona.model.PitchContour. Get one via PitchDetection.createContourExtractor(...).extract(...) or accumulate it via PitchDetection.createDetector(...).feedContour(...).
When to Use
| Scenario | Facade |
|---|---|
| Profile a singer from one recording (one call) | Tessera.analyze |
| Stream metrics live | TesseraSession |
| Score breath control / phrase structure | TesseraBreath |
| Score vocal agility | TesseraAgility |
| Find a singer's lower / upper note (batch) | TesseraRange |
| Interactive "find your range" flow | TesseraRangeSession |
| Natural speaking pitch from speech | TesseraSpeakingPitch |
| Voice/song matching by pitch distribution | TesseraRange.computeMatch |
Tessera.analyze (batch)
val result = Tessera.analyze(contour)
println("Breath control: ${result.breath?.controlScore}")
println("Agility: ${result.agility?.scores?.firstOrNull()}")
println("Range: ${result.vocalRange?.range?.octaves} octaves")
// Specific metrics only
val breathOnly = Tessera.analyze(contour, setOf(TesseraMetric.BREATH))
Signature
fun analyze(
contour: PitchContour,
metrics: Set<TesseraMetric> = TesseraMetric.ALL,
breathConfig: BreathConfig = BreathConfig.DEFAULT,
agilityConfig: AgilityConfig = AgilityConfig.DEFAULT,
rangeConfig: SearchVectorConfig = SearchVectorConfig.DEFAULT,
): TesseraResult
TesseraMetric.ALL = { BREATH, AGILITY, VOCAL_RANGE }.
TesseraResult carries one nullable field per metric — null means the metric was not requested. (For range, null may also mean insufficient voiced data.)
data class TesseraResult(
val breath: BreathMetrics?,
val agility: AgilityScore?,
val vocalRange: VocalRangeResult?,
)
Failure Semantics (ADR-022)
| Kind | How it surfaces |
|---|---|
Empty contour or < 2 samples | Throws IllegalArgumentException |
| Insufficient data for range estimation (valid input) | vocalRange is null in the result |
Per-facade pages document additional throws/null-returns.
See also
- Tessera Session — streaming counterpart
- Tona / PitchDetection — produces the contour
- Calibra Live Eval — for singing scoring against a reference (different domain)