@leiboss/dsh-voiceover 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +187 -2
- package/client/client.js +985 -0
- package/cordis.patch.yml +13 -0
- package/dist/api.d.ts +52 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +301 -0
- package/dist/api.js.map +1 -0
- package/dist/cli.d.ts +40 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +303 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.js +985 -0
- package/dist/http-types.d.ts +26 -0
- package/dist/http-types.d.ts.map +1 -0
- package/dist/http-types.js +2 -0
- package/dist/http-types.js.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +410 -0
- package/dist/index.js.map +1 -0
- package/dist/llm.d.ts +60 -0
- package/dist/llm.d.ts.map +1 -0
- package/dist/llm.js +113 -0
- package/dist/llm.js.map +1 -0
- package/dist/operations.d.ts +41 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +77 -0
- package/dist/operations.js.map +1 -0
- package/dist/panel.d.ts +42 -0
- package/dist/panel.d.ts.map +1 -0
- package/dist/panel.js +212 -0
- package/dist/panel.js.map +1 -0
- package/dist/pipeline.d.ts +141 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +519 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/prompts.d.ts +58 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +169 -0
- package/dist/prompts.js.map +1 -0
- package/dist/serve-entry.d.ts +3 -0
- package/dist/serve-entry.d.ts.map +1 -0
- package/dist/serve-entry.js +11 -0
- package/dist/serve-entry.js.map +1 -0
- package/dist/snapshot.d.ts +48 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +82 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/subtitle.d.ts +49 -0
- package/dist/subtitle.d.ts.map +1 -0
- package/dist/subtitle.js +163 -0
- package/dist/subtitle.js.map +1 -0
- package/dist/types.d.ts +148 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/dist/util.d.ts +16 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +47 -0
- package/dist/util.js.map +1 -0
- package/dist/validate.d.ts +15 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +186 -0
- package/dist/validate.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +83 -3
- package/schemas/manifest.schema.json +132 -0
- package/schemas/outline.schema.json +40 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/leiboss/dsh-voiceover/schemas/manifest.schema.json",
|
|
4
|
+
"title": "VoiceoverManifest",
|
|
5
|
+
"description": "有声项目清单。第三方消费方(daemon、导出器、审计)以此为准;路径一律相对项目根。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "projectId", "createdAt", "capability", "engine", "promptVersion", "source", "chapters", "totals", "warnings"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "type": "integer", "const": 1 },
|
|
11
|
+
"projectId": { "type": "string", "pattern": "^[0-9a-f]{8,24}$" },
|
|
12
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
13
|
+
"updatedAt": { "type": "string", "format": "date-time" },
|
|
14
|
+
"title": { "type": "string", "maxLength": 60 },
|
|
15
|
+
"capability": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["llm", "network", "wordBoundaries", "timingQuality"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"llm": { "type": "boolean", "description": "改写链路是否可用;false 表示按原文直读。" },
|
|
21
|
+
"network": { "type": "boolean", "description": "Edge 端点是否可达(含经代理可达)。" },
|
|
22
|
+
"wordBoundaries": { "type": "boolean", "description": "引擎是否返回词边界。" },
|
|
23
|
+
"timingQuality": { "type": "string", "enum": ["exact", "estimated", "none"] }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"engine": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["name", "voice", "rate"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"name": { "type": "string", "enum": ["edge-js", "edge-py", "sapi", "speechSynthesis"] },
|
|
32
|
+
"version": { "type": "string" },
|
|
33
|
+
"voice": { "type": "string" },
|
|
34
|
+
"rate": { "type": "string", "pattern": "^[+-][0-9]{1,3}%$" },
|
|
35
|
+
"viaProxy": { "type": "boolean" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"promptVersion": { "type": "string", "pattern": "^p[0-9]+\\.[0-9]+$" },
|
|
39
|
+
"source": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["path", "hash", "chars"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"path": { "type": "string" },
|
|
45
|
+
"hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
46
|
+
"chars": { "type": "integer", "minimum": 1 },
|
|
47
|
+
"kind": { "type": "string", "enum": ["md", "txt", "pdf", "docx", "html"] }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"chapters": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"minItems": 1,
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["id", "order", "title", "chars", "status"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"id": { "type": "string", "pattern": "^ch-[0-9]{2,3}$" },
|
|
59
|
+
"order": { "type": "integer", "minimum": 1 },
|
|
60
|
+
"title": { "type": "string", "maxLength": 40 },
|
|
61
|
+
"chars": { "type": "integer", "minimum": 1 },
|
|
62
|
+
"sourceRange": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"minItems": 2,
|
|
65
|
+
"maxItems": 2,
|
|
66
|
+
"items": { "type": "integer", "minimum": 0 }
|
|
67
|
+
},
|
|
68
|
+
"status": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": ["queued", "adapted", "marked", "audited", "synthesized", "timed", "done", "failed"]
|
|
71
|
+
},
|
|
72
|
+
"audio": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": ["path", "bytes", "durationMs", "timingQuality"],
|
|
76
|
+
"properties": {
|
|
77
|
+
"path": { "type": "string" },
|
|
78
|
+
"bytes": { "type": "integer", "minimum": 1 },
|
|
79
|
+
"durationMs": { "type": "integer", "minimum": 1 },
|
|
80
|
+
"timingQuality": { "type": "string", "enum": ["exact", "estimated"] },
|
|
81
|
+
"format": { "type": "string", "enum": ["mp3", "wav"] }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"subtitles": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": ["path", "units"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"path": { "type": "string" },
|
|
90
|
+
"units": { "type": "integer", "minimum": 0 },
|
|
91
|
+
"timingQuality": { "type": "string", "enum": ["exact", "estimated"] }
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"script": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["path", "hash"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"path": { "type": "string" },
|
|
100
|
+
"hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"error": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": ["code", "message", "retryable"],
|
|
107
|
+
"properties": {
|
|
108
|
+
"code": { "type": "string" },
|
|
109
|
+
"message": { "type": "string" },
|
|
110
|
+
"retryable": { "type": "boolean" }
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"totals": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": ["chapters", "chars", "audioMs", "bytes"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"chapters": { "type": "integer", "minimum": 0 },
|
|
122
|
+
"chars": { "type": "integer", "minimum": 0 },
|
|
123
|
+
"audioMs": { "type": "integer", "minimum": 0 },
|
|
124
|
+
"bytes": { "type": "integer", "minimum": 0 }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"warnings": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": { "type": "string", "maxLength": 200 }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/leiboss/dsh-voiceover/schemas/outline.schema.json",
|
|
4
|
+
"title": "VoiceoverOutline",
|
|
5
|
+
"description": "章节大纲:由 P0b 产出,作为流水线与断点续跑的输入。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["title", "chapters"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"title": { "type": "string", "minLength": 1, "maxLength": 60 },
|
|
11
|
+
"chapters": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"maxItems": 40,
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["id", "title", "sourceRange", "summary", "estimatedChars"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"id": { "type": "string", "pattern": "^ch-[0-9]{2,3}$" },
|
|
21
|
+
"title": { "type": "string", "minLength": 1, "maxLength": 14 },
|
|
22
|
+
"summary": { "type": "string", "maxLength": 80 },
|
|
23
|
+
"sourceRange": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"description": "[起始段落序号, 结束段落序号],包含两端;相邻章节必须首尾相接。",
|
|
26
|
+
"minItems": 2,
|
|
27
|
+
"maxItems": 2,
|
|
28
|
+
"items": { "type": "integer", "minimum": 0 }
|
|
29
|
+
},
|
|
30
|
+
"estimatedChars": { "type": "integer", "minimum": 1 },
|
|
31
|
+
"crossRefs": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "type": "string", "maxLength": 40 }
|
|
34
|
+
},
|
|
35
|
+
"note": { "type": "string", "maxLength": 120 }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|