Skip to content

madoo.speech-timing-state/v1

Madoo speech timing state — Bounded round checkpoint preserving accepted candidates and all rejected attempts.

Reference madoo.speech-timing-state/v1
Schema id urn:madoo:schema:speech-timing-state:v1
Version 1.0.0
Served at GET /api/v1/json-schemas/madoo.speech-timing-state/v1 · MCP get_json_schema
  • Produced by: utility/speech_timing_plan → state, utility/speech_timing_reconcile → state
  • Read by: ai/text_to_speech → timing_state, audio/speech_timing_check → state, enumerate/caption_blocks → timing_state, utility/dubbing_manifest → timing_state, utility/speech_timing_reconcile → state
Field Type Required Rules Description
schema "madoo.speech-timing-state/v1" yes
plan object yes no other fields
plan.schema "madoo.speech-timing-plan/v1" yes
plan.planId string yes pattern “^[a-f0-9]{64}$”
plan.organizationID integer yes ≥ 1; ≤ 9007199254740991
plan.workspaceID integer yes ≥ 1; ≤ 9007199254740991
plan.durationMilliseconds integer yes ≥ 50; ≤ 21600000
plan.sourceCaptions object yes no other fields
plan.sourceCaptions.schema "madoo.caption-track/v1" yes
plan.sourceCaptions.track_id string yes min length 1; max length 512
plan.sourceCaptions.language string yes min length 1; max length 64
plan.sourceCaptions.source_language string or null yes max length 64
plan.sourceCaptions.granularity string yes min length 1; max length 64
plan.sourceCaptions.cues array of objects yes min items 1; max items 10000
plan.sourceCaptions.cues[].id string yes min length 1; max length 128
plan.sourceCaptions.cues[].start number yes ≥ 0; ≤ 21600
plan.sourceCaptions.cues[].end number yes ≥ 0; ≤ 21600
plan.sourceCaptions.cues[].text string yes min length 1; max length 20000
plan.sourceCaptions.cues[].speaker string or null yes max length 512
plan.sourceCaptions.cues[].speaker_scope string or null yes max length 512
plan.sourceCaptions.cues[].kind "speech" yes
plan.sourceCaptions.cues[].source_segment_ids array of string yes min items 0; max items 10000
plan.sourceCaptions.generation object yes no other fields
plan.sourceCaptions.generation.normalizer string yes min length 1; max length 256
plan.sourceCaptions.generation.version string yes min length 1; max length 128
plan.sourceCaptions.generation.segment_count integer yes ≥ 0; ≤ 10000
plan.sourceCaptions.generation.overlap_reconciled boolean yes
plan.sourceCaptions.warnings array of objects yes min items 0; max items 10000
plan.sourceCaptions.warnings[].code string yes min length 1; max length 128
plan.sourceCaptions.warnings[].message string yes min length 1; max length 20000
plan.targetCaptions object yes no other fields
plan.targetCaptions.schema "madoo.caption-track/v1" yes
plan.targetCaptions.track_id string yes min length 1; max length 512
plan.targetCaptions.language string yes min length 1; max length 64
plan.targetCaptions.source_language string or null yes max length 64
plan.targetCaptions.granularity string yes min length 1; max length 64
plan.targetCaptions.cues array of objects yes min items 1; max items 10000
plan.targetCaptions.cues[].id string yes min length 1; max length 128
plan.targetCaptions.cues[].start number yes ≥ 0; ≤ 21600
plan.targetCaptions.cues[].end number yes ≥ 0; ≤ 21600
plan.targetCaptions.cues[].text string yes min length 1; max length 20000
plan.targetCaptions.cues[].speaker string or null yes max length 512
plan.targetCaptions.cues[].speaker_scope string or null yes max length 512
plan.targetCaptions.cues[].kind "speech" yes
plan.targetCaptions.cues[].source_segment_ids array of string yes min items 0; max items 10000
plan.targetCaptions.generation object yes no other fields
plan.targetCaptions.generation.normalizer string yes min length 1; max length 256
plan.targetCaptions.generation.version string yes min length 1; max length 128
plan.targetCaptions.generation.segment_count integer yes ≥ 0; ≤ 10000
plan.targetCaptions.generation.overlap_reconciled boolean yes
plan.targetCaptions.warnings array of objects yes min items 0; max items 10000
plan.targetCaptions.warnings[].code string yes min length 1; max length 128
plan.targetCaptions.warnings[].message string yes min length 1; max length 20000
plan.policy object yes no other fields
plan.policy.maximumRounds integer yes ≥ 1; ≤ 3
plan.policy.minimumSpeakingRate number yes ≥ 0.95; ≤ 1
plan.policy.maximumSpeakingRate number yes ≥ 1; ≤ 1.05
plan.policy.maximumFitRate number yes ≥ 1; ≤ 2
plan.policy.maximumCombinedRate number yes ≥ 1; ≤ 2
plan.policy.toleranceMilliseconds integer yes ≥ 1; ≤ 250
plan.cues array of objects yes min items 1; max items 10000
plan.cues[].cueId string yes min length 1; max length 128
plan.cues[].originalIndex integer yes ≥ 0; ≤ 9999
plan.cues[].sourceText string yes min length 1; max length 20000
plan.cues[].initialTranslation string yes min length 1; max length 20000
plan.cues[].speaker string or null yes max length 512
plan.cues[].startMilliseconds integer yes ≥ 0; ≤ 21600000
plan.cues[].endMilliseconds integer yes ≥ 50; ≤ 21600000
plan.cues[].contextBefore string or null yes max length 20000
plan.cues[].contextAfter string or null yes max length 20000
plan.elasticity object no other fields
plan.elasticity.maximumEndExtensionMilliseconds integer yes ≥ 1; ≤ 250
plan.elasticity.evidence object yes no other fields
plan.elasticity.evidence.referenceAudioStorageRef string yes max length 4096; pattern “^storage://[^?#\s]+$”
plan.elasticity.evidence.referenceAudioSha256 string yes pattern “^[a-f0-9]{64}$”
plan.elasticity.evidence.durationMilliseconds integer yes ≥ 50; ≤ 21600000
plan.elasticity.evidence.silence array of objects yes max items 1026
plan.elasticity.windows array of objects yes max items 10000
plan.elasticity.windows[].cueId string yes min length 1; max length 128
plan.elasticity.windows[].startMilliseconds integer yes ≥ 0; ≤ 21600000
plan.elasticity.windows[].endMilliseconds integer yes ≥ 1; ≤ 21600000
plan.availableWindows object no other fields
plan.availableWindows.maximumEndExtensionMilliseconds integer yes ≥ 1; ≤ 2000
plan.availableWindows.safetyGapMilliseconds integer yes ≥ 20; ≤ 500
plan.availableWindows.windows array of objects yes max items 10000
plan.availableWindows.windows[].cueId string yes min length 1; max length 128
plan.availableWindows.windows[].startMilliseconds integer yes ≥ 0; ≤ 21600000
plan.availableWindows.windows[].endMilliseconds integer yes ≥ 1; ≤ 21600000
completedRounds integer yes ≥ 0; ≤ 3
history array of objects yes min items 0; max items 30000
history[].schema "madoo.speech-timing-assessment/v1" yes
history[].candidate object yes no other fields
history[].candidate.planId string yes pattern “^[a-f0-9]{64}$”
history[].candidate.cueId string yes min length 1; max length 128
history[].candidate.round integer yes ≥ 1; ≤ 3
history[].candidate.text string yes min length 1; max length 20000
history[].candidate.audioStorageRef string yes max length 4096; pattern “^storage://[^?#\s]+$”
history[].candidate.audioSha256 string yes pattern “^[a-f0-9]{64}$”
history[].candidate.durationMilliseconds integer yes ≥ 1; ≤ 21600000
history[].candidate.speakingRate number yes ≤ 10; > 0
history[].candidate.modelId string yes min length 1; max length 256
history[].candidate.profileVersion string yes min length 1; max length 256
history[].candidate.voice string yes min length 1; max length 512
history[].candidate.hasAudibleSignal boolean yes
history[].candidate.headSilenceMilliseconds integer ≥ 0; ≤ 21600000
history[].candidate.tailSilenceMilliseconds integer ≥ 0; ≤ 21600000
history[].candidate.trimStartMilliseconds integer ≥ 0; ≤ 1000
history[].candidate.trimEndMilliseconds integer ≥ 0; ≤ 1000
history[].candidate.expectedMilliCredits integer yes ≥ 0; ≤ 9007199254740991
history[].accepted boolean yes
history[].requiredFitRate number yes ≥ 1; ≤ 432000
history[].paddingMilliseconds integer yes ≥ 0; ≤ 21600000
history[].reason one of "SPEECH_TIMING_ACCEPTED", "SPEECH_TIMING_REQUIRES_ADAPTATION", "SPEECH_TIMING_NO_AUDIBLE_SIGNAL", "SPEECH_TIMING_REFLOWED", "SPEECH_TIMING_DEGRADED_REFLOW" yes
history[].targetDurationMilliseconds integer ≥ 0; ≤ 21600000
deliveryPolicy one of "strict", "best_effort" Stamped by the finalizing reconcile: the policy its delivery was selected with. Absent before finalization.
{
"schema": "madoo.speech-timing-state/v1",
"plan": {
"schema": "madoo.speech-timing-plan/v1",
"planId": "df9f0828ea2c188dc4f90ef01e1c53ff04956e4f6f7199e1368bf01d54c18f7f",
"organizationID": 1,
"workspaceID": 2,
"durationMilliseconds": 1000,
"sourceCaptions": {
"schema": "madoo.caption-track/v1",
"track_id": "source",
"language": "en",
"source_language": null,
"granularity": "segment",
"cues": [
{
"id": "cue-1",
"start": 0,
"end": 1,
"text": "Hello",
"speaker": "speaker",
"speaker_scope": "track",
"kind": "speech",
"source_segment_ids": []
}
],
"generation": {
"normalizer": "fixture",
"version": "1",
"segment_count": 1,
"overlap_reconciled": false
},
"warnings": []
},
"targetCaptions": {
"schema": "madoo.caption-track/v1",
"track_id": "target",
"language": "it",
"source_language": null,
"granularity": "segment",
"cues": [
{
"id": "cue-1",
"start": 0,
"end": 1,
"text": "Ciao",
"speaker": "speaker",
"speaker_scope": "track",
"kind": "speech",
"source_segment_ids": []
}
],
"generation": {
"normalizer": "fixture",
"version": "1",
"segment_count": 1,
"overlap_reconciled": false
},
"warnings": []
},
"policy": {
"maximumRounds": 3,
"minimumSpeakingRate": 0.95,
"maximumSpeakingRate": 1.05,
"maximumFitRate": 1.1,
"maximumCombinedRate": 1.15,
"toleranceMilliseconds": 80
},
"cues": [
{
"cueId": "cue-1",
"originalIndex": 0,
"sourceText": "Hello",
"initialTranslation": "Ciao",
"speaker": "speaker",
"startMilliseconds": 0,
"endMilliseconds": 1000,
"contextBefore": null,
"contextAfter": null
}
]
},
"completedRounds": 1,
"history": [
{
"schema": "madoo.speech-timing-assessment/v1",
"candidate": {
"planId": "df9f0828ea2c188dc4f90ef01e1c53ff04956e4f6f7199e1368bf01d54c18f7f",
"cueId": "cue-1",
"round": 1,
"text": "Ciao",
"audioStorageRef": "storage://org/ws/audio.wav",
"audioSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"durationMilliseconds": 800,
"speakingRate": 1,
"modelId": "turbo",
"profileVersion": "1",
"voice": "Rachel",
"expectedMilliCredits": 100,
"hasAudibleSignal": true
},
"accepted": true,
"requiredFitRate": 1,
"paddingMilliseconds": 200,
"reason": "SPEECH_TIMING_ACCEPTED"
}
]
}
madoo.speech-timing-state/v1 (JSON Schema)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:madoo:schema:speech-timing-state:v1",
"title": "Madoo speech timing state",
"description": "Shape validation only. Correlation, timing policy, tenant authorization and trusted measurement provenance require Application validation.",
"$ref": "#/$defs/state",
"$defs": {
"warning": {
"type": "object",
"additionalProperties": false,
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 20000
}
}
},
"captionCue": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"start",
"end",
"text",
"speaker",
"speaker_scope",
"kind",
"source_segment_ids"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"start": {
"type": "number",
"minimum": 0,
"maximum": 21600
},
"end": {
"type": "number",
"minimum": 0,
"maximum": 21600
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"speaker": {
"type": [
"string",
"null"
],
"maxLength": 512
},
"speaker_scope": {
"type": [
"string",
"null"
],
"maxLength": 512
},
"kind": {
"const": "speech"
},
"source_segment_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"maxItems": 10000,
"minItems": 0
}
}
},
"captionTrack": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"track_id",
"language",
"source_language",
"granularity",
"cues",
"generation",
"warnings"
],
"properties": {
"schema": {
"const": "madoo.caption-track/v1"
},
"track_id": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"language": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"source_language": {
"type": [
"string",
"null"
],
"maxLength": 64
},
"granularity": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"cues": {
"type": "array",
"items": {
"$ref": "#/$defs/captionCue"
},
"maxItems": 10000,
"minItems": 1
},
"generation": {
"type": "object",
"additionalProperties": false,
"required": [
"normalizer",
"version",
"segment_count",
"overlap_reconciled"
],
"properties": {
"normalizer": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"version": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"segment_count": {
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"overlap_reconciled": {
"type": "boolean"
}
}
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/$defs/warning"
},
"maxItems": 10000,
"minItems": 0
}
}
},
"policy": {
"type": "object",
"additionalProperties": false,
"required": [
"maximumRounds",
"minimumSpeakingRate",
"maximumSpeakingRate",
"maximumFitRate",
"maximumCombinedRate",
"toleranceMilliseconds"
],
"properties": {
"maximumRounds": {
"type": "integer",
"minimum": 1,
"maximum": 3
},
"minimumSpeakingRate": {
"type": "number",
"minimum": 0.95,
"maximum": 1
},
"maximumSpeakingRate": {
"type": "number",
"minimum": 1,
"maximum": 1.05
},
"maximumFitRate": {
"type": "number",
"minimum": 1,
"maximum": 2
},
"maximumCombinedRate": {
"type": "number",
"minimum": 1,
"maximum": 2
},
"toleranceMilliseconds": {
"type": "integer",
"minimum": 1,
"maximum": 250
}
}
},
"cue": {
"type": "object",
"additionalProperties": false,
"required": [
"cueId",
"originalIndex",
"sourceText",
"initialTranslation",
"speaker",
"startMilliseconds",
"endMilliseconds",
"contextBefore",
"contextAfter"
],
"properties": {
"cueId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"originalIndex": {
"type": "integer",
"minimum": 0,
"maximum": 9999
},
"sourceText": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"initialTranslation": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"speaker": {
"type": [
"string",
"null"
],
"maxLength": 512
},
"startMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 21600000
},
"endMilliseconds": {
"type": "integer",
"minimum": 50,
"maximum": 21600000
},
"contextBefore": {
"type": [
"string",
"null"
],
"maxLength": 20000
},
"contextAfter": {
"type": [
"string",
"null"
],
"maxLength": 20000
}
}
},
"plan": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"planId",
"organizationID",
"workspaceID",
"durationMilliseconds",
"sourceCaptions",
"targetCaptions",
"policy",
"cues"
],
"properties": {
"schema": {
"const": "madoo.speech-timing-plan/v1"
},
"planId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"organizationID": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"workspaceID": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"durationMilliseconds": {
"type": "integer",
"minimum": 50,
"maximum": 21600000
},
"sourceCaptions": {
"$ref": "#/$defs/captionTrack"
},
"targetCaptions": {
"$ref": "#/$defs/captionTrack"
},
"policy": {
"$ref": "#/$defs/policy"
},
"cues": {
"type": "array",
"items": {
"$ref": "#/$defs/cue"
},
"maxItems": 10000,
"minItems": 1
},
"elasticity": {
"$ref": "#/$defs/elasticity"
},
"availableWindows": {
"$ref": "#/$defs/availableWindows"
}
}
},
"candidate": {
"type": "object",
"additionalProperties": false,
"required": [
"planId",
"cueId",
"round",
"text",
"audioStorageRef",
"audioSha256",
"durationMilliseconds",
"speakingRate",
"modelId",
"profileVersion",
"voice",
"expectedMilliCredits",
"hasAudibleSignal"
],
"properties": {
"planId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"cueId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"round": {
"type": "integer",
"minimum": 1,
"maximum": 3
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"audioStorageRef": {
"type": "string",
"pattern": "^storage://[^?#\\s]+$",
"maxLength": 4096
},
"audioSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"durationMilliseconds": {
"type": "integer",
"minimum": 1,
"maximum": 21600000
},
"speakingRate": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 10
},
"modelId": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"profileVersion": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"voice": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"hasAudibleSignal": {
"type": "boolean"
},
"headSilenceMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 21600000
},
"tailSilenceMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 21600000
},
"trimStartMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"trimEndMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"expectedMilliCredits": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
},
"assessment": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"candidate",
"accepted",
"requiredFitRate",
"paddingMilliseconds",
"reason"
],
"properties": {
"schema": {
"const": "madoo.speech-timing-assessment/v1"
},
"candidate": {
"$ref": "#/$defs/candidate"
},
"accepted": {
"type": "boolean"
},
"requiredFitRate": {
"type": "number",
"minimum": 1,
"maximum": 432000
},
"paddingMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 21600000
},
"reason": {
"enum": [
"SPEECH_TIMING_ACCEPTED",
"SPEECH_TIMING_REQUIRES_ADAPTATION",
"SPEECH_TIMING_NO_AUDIBLE_SIGNAL",
"SPEECH_TIMING_REFLOWED",
"SPEECH_TIMING_DEGRADED_REFLOW"
]
},
"targetDurationMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 21600000
}
}
},
"state": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"plan",
"completedRounds",
"history"
],
"properties": {
"schema": {
"const": "madoo.speech-timing-state/v1"
},
"plan": {
"$ref": "#/$defs/plan"
},
"completedRounds": {
"type": "integer",
"minimum": 0,
"maximum": 3
},
"history": {
"type": "array",
"items": {
"$ref": "#/$defs/assessment"
},
"maxItems": 30000,
"minItems": 0
},
"deliveryPolicy": {
"description": "Stamped by the finalizing reconcile: the policy its delivery was selected with. Absent before finalization.",
"enum": [
"strict",
"best_effort"
]
}
}
},
"silenceInterval": {
"type": "object",
"additionalProperties": false,
"required": [
"startMilliseconds",
"endMilliseconds"
],
"properties": {
"startMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 21600000
},
"endMilliseconds": {
"type": "integer",
"minimum": 1,
"maximum": 21600000
}
}
},
"deliveryWindow": {
"type": "object",
"additionalProperties": false,
"required": [
"cueId",
"startMilliseconds",
"endMilliseconds"
],
"properties": {
"cueId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"startMilliseconds": {
"type": "integer",
"minimum": 0,
"maximum": 21600000
},
"endMilliseconds": {
"type": "integer",
"minimum": 1,
"maximum": 21600000
}
}
},
"availableWindows": {
"type": "object",
"additionalProperties": false,
"required": [
"maximumEndExtensionMilliseconds",
"safetyGapMilliseconds",
"windows"
],
"properties": {
"maximumEndExtensionMilliseconds": {
"type": "integer",
"minimum": 1,
"maximum": 2000
},
"safetyGapMilliseconds": {
"type": "integer",
"minimum": 20,
"maximum": 500
},
"windows": {
"type": "array",
"maxItems": 10000,
"items": {
"$ref": "#/$defs/deliveryWindow"
}
}
}
},
"elasticity": {
"type": "object",
"additionalProperties": false,
"required": [
"maximumEndExtensionMilliseconds",
"evidence",
"windows"
],
"properties": {
"maximumEndExtensionMilliseconds": {
"type": "integer",
"minimum": 1,
"maximum": 250
},
"evidence": {
"type": "object",
"additionalProperties": false,
"required": [
"referenceAudioStorageRef",
"referenceAudioSha256",
"durationMilliseconds",
"silence"
],
"properties": {
"referenceAudioStorageRef": {
"type": "string",
"pattern": "^storage://[^?#\\s]+$",
"maxLength": 4096
},
"referenceAudioSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"durationMilliseconds": {
"type": "integer",
"minimum": 50,
"maximum": 21600000
},
"silence": {
"type": "array",
"maxItems": 1026,
"items": {
"$ref": "#/$defs/silenceInterval"
}
}
}
},
"windows": {
"type": "array",
"maxItems": 10000,
"items": {
"$ref": "#/$defs/deliveryWindow"
}
}
}
}
}
}