Files
jrich-wakeword-trainer/deploy/wakeword-training/training-request-v1.schema.json
T

111 lines
4.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://gateway.jrich.ai/schemas/wakeword-training-request-v1.json",
"title": "Resolved Wakeword Training Request v1",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"primary_phrase",
"variants",
"near_misses",
"evaluation_profile",
"source_lock_path",
"source_lock_sha256",
"intended_release_id",
"runner_image_digest",
"pipeline_config",
"run_kind",
"derived_from_run_id"
],
"properties": {
"schema_version": {"const": 1},
"primary_phrase": {"type": "string", "minLength": 1},
"variants": {"type": "array", "items": {"type": "string", "minLength": 1}},
"near_misses": {"type": "array", "items": {"type": "string", "minLength": 1}},
"evaluation_profile": {"type": "string", "minLength": 1},
"source_lock_path": {"type": "string", "minLength": 1},
"source_lock_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
"intended_release_id": {"type": "string", "minLength": 1},
"runner_image_digest": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"},
"pipeline_config": {
"type": "object",
"additionalProperties": false,
"required": ["model_name", "target_phrases"],
"properties": {
"model_name": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"},
"family_slug": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
"version": {"type": "integer", "minimum": 1},
"threshold": {
"oneOf": [{"type": "number", "minimum": 0, "maximum": 1}, {"const": "auto"}]
},
"target_phrases": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
"custom_negative_phrases": {"type": "array", "items": {"type": "string", "minLength": 1}},
"n_samples": {"type": "integer", "minimum": 1},
"n_samples_val": {"type": "integer", "minimum": 1},
"n_background_samples": {"type": "integer", "minimum": 1},
"n_background_samples_val": {"type": "integer", "minimum": 1},
"tts_batch_size": {"type": "integer", "minimum": 1},
"max_speakers": {"type": ["integer", "null"], "minimum": 1},
"tts_backend": {"const": "piper_vits"},
"noise_scales": {"type": "array", "minItems": 1, "items": {"type": "number"}},
"noise_scale_ws": {"type": "array", "minItems": 1, "items": {"type": "number"}},
"length_scales": {"type": "array", "minItems": 1, "items": {"type": "number"}},
"slerp_weights": {"type": "array", "minItems": 1, "items": {"type": "number"}},
"augmentation": {
"type": "object",
"additionalProperties": false,
"properties": {
"clip_duration": {"type": "number", "exclusiveMinimum": 0},
"batch_size": {"type": "integer", "minimum": 1},
"rounds": {"type": "integer", "minimum": 1},
"background_paths": {
"type": "array",
"items": {
"type": "string",
"pattern": "^/inputs/(?!\\.\\.(?:/|$))(?!.*?/\\.\\.(?:/|$)).+"
}
},
"rir_paths": {
"type": "array",
"items": {
"type": "string",
"pattern": "^/inputs/(?!\\.\\.(?:/|$))(?!.*?/\\.\\.(?:/|$)).+"
}
}
}
},
"model": {
"type": "object",
"additionalProperties": false,
"properties": {
"model_type": {"enum": ["dnn", "rnn", "conv_attention"]},
"model_size": {"enum": ["tiny", "small", "medium", "large"]}
}
},
"steps": {"type": "integer", "minimum": 1},
"learning_rate": {"type": "number", "minimum": 0},
"weight_decay": {"type": "number", "minimum": 0},
"label_smoothing": {"type": "number", "minimum": 0},
"max_negative_weight": {"type": "number", "minimum": 0},
"target_fp_per_hour": {"type": "number", "minimum": 0},
"batch_n_per_class": {
"type": "object",
"additionalProperties": false,
"properties": {
"positive": {"type": "integer", "minimum": 1},
"adversarial_negative": {"type": "integer", "minimum": 1},
"ACAV100M_sample": {"type": "integer", "minimum": 1},
"background_noise": {"type": "integer", "minimum": 1}
}
}
}
},
"run_kind": {"enum": ["commercial", "local_experiment", "quarantined_smoke"]},
"derived_from_run_id": {
"type": ["string", "null"],
"pattern": "^[a-f0-9]{32}$"
}
}
}