Skip to main content

CalibraBreath (removed in 2.0.0)

Removed — migration required

CalibraBreath was removed in 2.0.0. There is no source-compat shell. The new contract operates on a tona.model.PitchContour instead of parallel (times, pitchesHz) arrays, and the canonical return type is now BreathMetrics { controlScore, phrases, alignmentScore } on the TesseraBreath facade. 1.x callers must migrate before they will compile against 2.0.

The new API operates on tona.model.PitchContour instead of parallel times / pitchesHz arrays, and the canonical return type is the unified BreathMetrics, not the legacy calibra.model.BreathMetrics (which used -1f as a failure sentinel) or the short-lived 2.0.0 BreathScore.

Where to find each piece

Old APINew API
CalibraBreath.computeCapacity(times, pitchesHz)TesseraBreath.analyze(contour).phrases?.longestDuration — LOF-filtered peak phrase, in seconds
CalibraBreath.computeMetrics(refTimes, refPitches, studentTimes, studentPitches, …)TesseraBreath.analyze(studentContour, referenceContour, config) — single call returns control + phrases + alignmentScore
CalibraBreath.hasEnoughData(times, pitchesHz)Construct PitchContour.fromArrays(times, pitchesHz) and check contour.size >= 2 (full check is inside TesseraBreath)
BreathMetrics { capacity, control, isValid } (calibra)BreathMetrics { controlScore, phrases, alignmentScore } (tessera)

Migration

// Before
val capacity = CalibraBreath.computeCapacity(times, pitchesHz) // -1f on failure

// After
val contour = PitchContour.fromArrays(times, pitchesHz)
val metrics = TesseraBreath.analyze(contour, config = BreathConfig.DEFAULT)
val capacity = metrics.phrases?.longestDuration // null when phrases can't be segmented

For full reference, see TesseraBreath.