@kongyo2/kongyoroid 1.0.0 → 2.0.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.
Files changed (199) hide show
  1. package/README.md +233 -0
  2. package/dist/cache.d.ts +32 -7
  3. package/dist/cache.d.ts.map +1 -1
  4. package/dist/cache.js +138 -9
  5. package/dist/cache.js.map +1 -1
  6. package/dist/cli/flags.d.ts +270 -0
  7. package/dist/cli/flags.d.ts.map +1 -0
  8. package/dist/cli/flags.js +240 -0
  9. package/dist/cli/flags.js.map +1 -0
  10. package/dist/cli/help.d.ts +11 -0
  11. package/dist/cli/help.d.ts.map +1 -0
  12. package/dist/cli/help.js +336 -0
  13. package/dist/cli/help.js.map +1 -0
  14. package/dist/cli.js +598 -232
  15. package/dist/cli.js.map +1 -1
  16. package/dist/errors.d.ts +43 -3
  17. package/dist/errors.d.ts.map +1 -1
  18. package/dist/errors.js +56 -3
  19. package/dist/errors.js.map +1 -1
  20. package/dist/index.d.ts +59 -22
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +32 -14
  23. package/dist/index.js.map +1 -1
  24. package/dist/io.d.ts +11 -0
  25. package/dist/io.d.ts.map +1 -1
  26. package/dist/io.js +149 -5
  27. package/dist/io.js.map +1 -1
  28. package/dist/kongyoroid.d.ts +237 -10
  29. package/dist/kongyoroid.d.ts.map +1 -1
  30. package/dist/kongyoroid.js +777 -86
  31. package/dist/kongyoroid.js.map +1 -1
  32. package/dist/limits.d.ts +5 -0
  33. package/dist/limits.d.ts.map +1 -1
  34. package/dist/limits.js +6 -1
  35. package/dist/limits.js.map +1 -1
  36. package/dist/request.d.ts +1 -0
  37. package/dist/request.d.ts.map +1 -1
  38. package/dist/request.js +102 -15
  39. package/dist/request.js.map +1 -1
  40. package/dist/schema.d.ts +3 -0
  41. package/dist/schema.d.ts.map +1 -1
  42. package/dist/schema.js +271 -68
  43. package/dist/schema.js.map +1 -1
  44. package/dist/song/mml.d.ts +15 -0
  45. package/dist/song/mml.d.ts.map +1 -0
  46. package/dist/song/mml.js +184 -0
  47. package/dist/song/mml.js.map +1 -0
  48. package/dist/song/pitch.d.ts.map +1 -0
  49. package/dist/{pitch.js → song/pitch.js} +1 -1
  50. package/dist/song/pitch.js.map +1 -0
  51. package/dist/song/score.d.ts +92 -0
  52. package/dist/song/score.d.ts.map +1 -0
  53. package/dist/song/score.js +454 -0
  54. package/dist/song/score.js.map +1 -0
  55. package/dist/synth/acoustics.d.ts +27 -0
  56. package/dist/synth/acoustics.d.ts.map +1 -0
  57. package/dist/synth/acoustics.js +608 -0
  58. package/dist/synth/acoustics.js.map +1 -0
  59. package/dist/synth/analysis.d.ts +22 -0
  60. package/dist/synth/analysis.d.ts.map +1 -0
  61. package/dist/synth/analysis.js +170 -0
  62. package/dist/synth/analysis.js.map +1 -0
  63. package/dist/synth/engine.d.ts +115 -0
  64. package/dist/synth/engine.d.ts.map +1 -0
  65. package/dist/synth/engine.js +223 -0
  66. package/dist/synth/engine.js.map +1 -0
  67. package/dist/synth/filters.d.ts +60 -0
  68. package/dist/synth/filters.d.ts.map +1 -0
  69. package/dist/synth/filters.js +166 -0
  70. package/dist/synth/filters.js.map +1 -0
  71. package/dist/synth/glottal.d.ts +20 -0
  72. package/dist/synth/glottal.d.ts.map +1 -0
  73. package/dist/synth/glottal.js +76 -0
  74. package/dist/synth/glottal.js.map +1 -0
  75. package/dist/synth/phonemes.d.ts +42 -0
  76. package/dist/synth/phonemes.d.ts.map +1 -0
  77. package/dist/synth/phonemes.js +311 -0
  78. package/dist/synth/phonemes.js.map +1 -0
  79. package/dist/synth/plan.d.ts +127 -0
  80. package/dist/synth/plan.d.ts.map +1 -0
  81. package/dist/synth/plan.js +81 -0
  82. package/dist/synth/plan.js.map +1 -0
  83. package/dist/synth/prosody.d.ts +30 -0
  84. package/dist/synth/prosody.d.ts.map +1 -0
  85. package/dist/synth/prosody.js +46 -0
  86. package/dist/synth/prosody.js.map +1 -0
  87. package/dist/synth/random.d.ts +15 -0
  88. package/dist/synth/random.d.ts.map +1 -0
  89. package/dist/synth/random.js +59 -0
  90. package/dist/synth/random.js.map +1 -0
  91. package/dist/synth/renderer.d.ts +77 -0
  92. package/dist/synth/renderer.d.ts.map +1 -0
  93. package/dist/synth/renderer.js +343 -0
  94. package/dist/synth/renderer.js.map +1 -0
  95. package/dist/synth/song.d.ts +30 -0
  96. package/dist/synth/song.d.ts.map +1 -0
  97. package/dist/synth/song.js +453 -0
  98. package/dist/synth/song.js.map +1 -0
  99. package/dist/synth/speech.d.ts +49 -0
  100. package/dist/synth/speech.d.ts.map +1 -0
  101. package/dist/synth/speech.js +354 -0
  102. package/dist/synth/speech.js.map +1 -0
  103. package/dist/synth/stream.d.ts +26 -0
  104. package/dist/synth/stream.d.ts.map +1 -0
  105. package/dist/synth/stream.js +67 -0
  106. package/dist/synth/stream.js.map +1 -0
  107. package/dist/synth/textstream.d.ts +35 -0
  108. package/dist/synth/textstream.d.ts.map +1 -0
  109. package/dist/synth/textstream.js +127 -0
  110. package/dist/synth/textstream.js.map +1 -0
  111. package/dist/synth/voice.d.ts +64 -0
  112. package/dist/synth/voice.d.ts.map +1 -0
  113. package/dist/synth/voice.js +208 -0
  114. package/dist/synth/voice.js.map +1 -0
  115. package/dist/text/dictionary.d.ts +50 -0
  116. package/dist/text/dictionary.d.ts.map +1 -0
  117. package/dist/text/dictionary.js +0 -0
  118. package/dist/text/dictionary.js.map +1 -0
  119. package/dist/text/frontend.d.ts +34 -0
  120. package/dist/text/frontend.d.ts.map +1 -0
  121. package/dist/text/frontend.js +550 -0
  122. package/dist/text/frontend.js.map +1 -0
  123. package/dist/text/lexicon.d.ts +10 -0
  124. package/dist/text/lexicon.d.ts.map +1 -0
  125. package/dist/text/lexicon.js +763 -0
  126. package/dist/text/lexicon.js.map +1 -0
  127. package/dist/{mora.d.ts → text/mora.d.ts} +15 -3
  128. package/dist/text/mora.d.ts.map +1 -0
  129. package/dist/{mora.js → text/mora.js} +87 -9
  130. package/dist/text/mora.js.map +1 -0
  131. package/dist/text/normalize.d.ts +34 -0
  132. package/dist/text/normalize.d.ts.map +1 -0
  133. package/dist/text/normalize.js +496 -0
  134. package/dist/text/normalize.js.map +1 -0
  135. package/dist/text/notation.d.ts +32 -0
  136. package/dist/text/notation.d.ts.map +1 -0
  137. package/dist/text/notation.js +182 -0
  138. package/dist/text/notation.js.map +1 -0
  139. package/dist/text/reading.d.ts +52 -0
  140. package/dist/text/reading.d.ts.map +1 -0
  141. package/dist/text/reading.js +32 -0
  142. package/dist/text/reading.js.map +1 -0
  143. package/dist/text/sentences.d.ts +10 -0
  144. package/dist/text/sentences.d.ts.map +1 -0
  145. package/dist/text/sentences.js +84 -0
  146. package/dist/text/sentences.js.map +1 -0
  147. package/dist/{text.d.ts → text/split.d.ts} +2 -2
  148. package/dist/text/split.d.ts.map +1 -0
  149. package/dist/{text.js → text/split.js} +2 -2
  150. package/dist/text/split.js.map +1 -0
  151. package/dist/types.d.ts +58 -3
  152. package/dist/types.d.ts.map +1 -1
  153. package/dist/version.d.ts +4 -0
  154. package/dist/version.d.ts.map +1 -1
  155. package/dist/version.js +5 -1
  156. package/dist/version.js.map +1 -1
  157. package/dist/voicevox/client.d.ts +1 -1
  158. package/dist/voicevox/client.d.ts.map +1 -1
  159. package/dist/voicevox/dictionary.js +1 -1
  160. package/dist/voicevox/dictionary.js.map +1 -1
  161. package/dist/voicevox/song.js +1 -1
  162. package/dist/voicevox/song.js.map +1 -1
  163. package/dist/voicevox/speech.d.ts +1 -0
  164. package/dist/voicevox/speech.d.ts.map +1 -1
  165. package/dist/voicevox/speech.js +8 -2
  166. package/dist/voicevox/speech.js.map +1 -1
  167. package/docs/cli.md +251 -0
  168. package/examples/batch.jsonl +4 -3
  169. package/examples/builtin/dictionary.json +7 -0
  170. package/examples/builtin/song-compact.json +13 -0
  171. package/examples/builtin/song-mml.json +9 -0
  172. package/examples/builtin/song-notes.json +25 -0
  173. package/examples/builtin/speech-dictionary.json +9 -0
  174. package/examples/builtin/speech-kana.json +7 -0
  175. package/examples/builtin/speech.json +7 -0
  176. package/package.json +11 -3
  177. package/dist/formant.d.ts +0 -34
  178. package/dist/formant.d.ts.map +0 -1
  179. package/dist/formant.js +0 -622
  180. package/dist/formant.js.map +0 -1
  181. package/dist/mora.d.ts.map +0 -1
  182. package/dist/mora.js.map +0 -1
  183. package/dist/notation.d.ts +0 -15
  184. package/dist/notation.d.ts.map +0 -1
  185. package/dist/notation.js +0 -114
  186. package/dist/notation.js.map +0 -1
  187. package/dist/pitch.d.ts.map +0 -1
  188. package/dist/pitch.js.map +0 -1
  189. package/dist/score.d.ts +0 -37
  190. package/dist/score.d.ts.map +0 -1
  191. package/dist/score.js +0 -166
  192. package/dist/score.js.map +0 -1
  193. package/dist/text.d.ts.map +0 -1
  194. package/dist/text.js.map +0 -1
  195. package/examples/song-notes.json +0 -24
  196. /package/dist/{pitch.d.ts → song/pitch.d.ts} +0 -0
  197. /package/examples/{song.json → voicevox/song.json} +0 -0
  198. /package/examples/{speech-kana.json → voicevox/speech-kana.json} +0 -0
  199. /package/examples/{speech.json → voicevox/speech.json} +0 -0
@@ -0,0 +1,270 @@
1
+ import { parseArgs } from "node:util";
2
+ import type { JsonObject } from "../validate.ts";
3
+ export declare const OPTIONS: {
4
+ readonly help: {
5
+ readonly type: "boolean";
6
+ readonly short: "h";
7
+ };
8
+ readonly version: {
9
+ readonly type: "boolean";
10
+ readonly short: "v";
11
+ };
12
+ readonly json: {
13
+ readonly type: "boolean";
14
+ };
15
+ readonly text: {
16
+ readonly type: "string";
17
+ readonly short: "t";
18
+ };
19
+ readonly input: {
20
+ readonly type: "string";
21
+ readonly short: "i";
22
+ };
23
+ readonly output: {
24
+ readonly type: "string";
25
+ readonly short: "o";
26
+ };
27
+ readonly "output-dir": {
28
+ readonly type: "string";
29
+ };
30
+ readonly "plan-out": {
31
+ readonly type: "string";
32
+ };
33
+ readonly force: {
34
+ readonly type: "boolean";
35
+ };
36
+ readonly play: {
37
+ readonly type: "boolean";
38
+ };
39
+ readonly "dry-run": {
40
+ readonly type: "boolean";
41
+ };
42
+ readonly stream: {
43
+ readonly type: "boolean";
44
+ };
45
+ readonly format: {
46
+ readonly type: "string";
47
+ };
48
+ readonly progress: {
49
+ readonly type: "boolean";
50
+ };
51
+ readonly "flush-ms": {
52
+ readonly type: "string";
53
+ };
54
+ readonly diagnostics: {
55
+ readonly type: "string";
56
+ };
57
+ readonly detail: {
58
+ readonly type: "string";
59
+ };
60
+ readonly engine: {
61
+ readonly type: "string";
62
+ };
63
+ readonly voice: {
64
+ readonly type: "string";
65
+ };
66
+ readonly endpoint: {
67
+ readonly type: "string";
68
+ };
69
+ readonly "timeout-ms": {
70
+ readonly type: "string";
71
+ };
72
+ readonly retries: {
73
+ readonly type: "string";
74
+ };
75
+ readonly concurrency: {
76
+ readonly type: "string";
77
+ };
78
+ readonly "cache-dir": {
79
+ readonly type: "string";
80
+ };
81
+ readonly cache: {
82
+ readonly type: "boolean";
83
+ };
84
+ readonly dictionary: {
85
+ readonly type: "string";
86
+ };
87
+ readonly "dict-entry": {
88
+ readonly type: "string";
89
+ readonly multiple: true;
90
+ };
91
+ readonly "strict-reading": {
92
+ readonly type: "boolean";
93
+ };
94
+ readonly kana: {
95
+ readonly type: "string";
96
+ };
97
+ readonly speaker: {
98
+ readonly type: "string";
99
+ };
100
+ readonly speed: {
101
+ readonly type: "string";
102
+ };
103
+ readonly pitch: {
104
+ readonly type: "string";
105
+ };
106
+ readonly "pitch-semitones": {
107
+ readonly type: "string";
108
+ };
109
+ readonly intonation: {
110
+ readonly type: "string";
111
+ };
112
+ readonly volume: {
113
+ readonly type: "string";
114
+ };
115
+ readonly "gain-db": {
116
+ readonly type: "string";
117
+ };
118
+ readonly breathiness: {
119
+ readonly type: "string";
120
+ };
121
+ readonly "pre-pause": {
122
+ readonly type: "string";
123
+ };
124
+ readonly "post-pause": {
125
+ readonly type: "string";
126
+ };
127
+ readonly "pause-length": {
128
+ readonly type: "string";
129
+ };
130
+ readonly "pause-scale": {
131
+ readonly type: "string";
132
+ };
133
+ readonly upspeak: {
134
+ readonly type: "boolean";
135
+ };
136
+ readonly split: {
137
+ readonly type: "string";
138
+ };
139
+ readonly "sample-rate": {
140
+ readonly type: "string";
141
+ };
142
+ readonly seed: {
143
+ readonly type: "string";
144
+ };
145
+ readonly lyrics: {
146
+ readonly type: "string";
147
+ };
148
+ readonly melody: {
149
+ readonly type: "string";
150
+ };
151
+ readonly beats: {
152
+ readonly type: "string";
153
+ };
154
+ readonly mml: {
155
+ readonly type: "string";
156
+ };
157
+ readonly tempo: {
158
+ readonly type: "string";
159
+ };
160
+ readonly singer: {
161
+ readonly type: "string";
162
+ };
163
+ readonly teacher: {
164
+ readonly type: "string";
165
+ };
166
+ readonly transpose: {
167
+ readonly type: "string";
168
+ };
169
+ readonly "vibrato-depth": {
170
+ readonly type: "string";
171
+ };
172
+ readonly "vibrato-rate": {
173
+ readonly type: "string";
174
+ };
175
+ readonly "vibrato-delay-ms": {
176
+ readonly type: "string";
177
+ };
178
+ readonly "vibrato-fade-ms": {
179
+ readonly type: "string";
180
+ };
181
+ readonly "portamento-ms": {
182
+ readonly type: "string";
183
+ };
184
+ readonly "scoop-cents": {
185
+ readonly type: "string";
186
+ };
187
+ readonly "scoop-ms": {
188
+ readonly type: "string";
189
+ };
190
+ readonly "consonant-compression": {
191
+ readonly type: "boolean";
192
+ };
193
+ readonly "lead-in": {
194
+ readonly type: "string";
195
+ };
196
+ readonly "lead-out": {
197
+ readonly type: "string";
198
+ };
199
+ readonly kind: {
200
+ readonly type: "string";
201
+ };
202
+ readonly query: {
203
+ readonly type: "string";
204
+ };
205
+ readonly initialize: {
206
+ readonly type: "boolean";
207
+ };
208
+ readonly scope: {
209
+ readonly type: "string";
210
+ };
211
+ readonly surface: {
212
+ readonly type: "string";
213
+ };
214
+ readonly reading: {
215
+ readonly type: "string";
216
+ };
217
+ readonly pronunciation: {
218
+ readonly type: "string";
219
+ };
220
+ readonly accent: {
221
+ readonly type: "string";
222
+ };
223
+ readonly match: {
224
+ readonly type: "string";
225
+ };
226
+ readonly priority: {
227
+ readonly type: "string";
228
+ };
229
+ readonly id: {
230
+ readonly type: "string";
231
+ };
232
+ readonly "word-type": {
233
+ readonly type: "string";
234
+ };
235
+ readonly "max-bytes": {
236
+ readonly type: "string";
237
+ };
238
+ readonly "max-entries": {
239
+ readonly type: "string";
240
+ };
241
+ readonly "pitch-track": {
242
+ readonly type: "boolean";
243
+ };
244
+ readonly "window-ms": {
245
+ readonly type: "string";
246
+ };
247
+ readonly "stop-on-error": {
248
+ readonly type: "boolean";
249
+ };
250
+ };
251
+ export type Values = ReturnType<typeof parseArgs<{
252
+ options: typeof OPTIONS;
253
+ allowPositionals: true;
254
+ }>>["values"];
255
+ export declare function parseCommandLine(argv: readonly string[]): {
256
+ readonly values: Values;
257
+ readonly positionals: string[];
258
+ };
259
+ export declare const ALLOWED: Readonly<Record<string, readonly string[]>>;
260
+ export declare function numberFlag(values: Values, name: keyof Values): number | undefined;
261
+ export declare function styleFlag(values: Values, name: "speaker" | "singer" | "teacher"): string | number | undefined;
262
+ export declare function assign(target: JsonObject, key: string, value: unknown): void;
263
+ export declare function env(name: string): string | undefined;
264
+ export declare function checkAllowed(command: string, values: Values): void;
265
+ export declare function parseDictEntries(values: Values): readonly {
266
+ surface: string;
267
+ reading: string;
268
+ accent?: number;
269
+ }[];
270
+ //# sourceMappingURL=flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../src/cli/flags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAgBjH"}
@@ -0,0 +1,240 @@
1
+ import process from "node:process";
2
+ import { parseArgs } from "node:util";
3
+ import { invalid } from "../errors.js";
4
+ export const OPTIONS = {
5
+ help: { type: "boolean", short: "h" },
6
+ version: { type: "boolean", short: "v" },
7
+ json: { type: "boolean" },
8
+ text: { type: "string", short: "t" },
9
+ input: { type: "string", short: "i" },
10
+ output: { type: "string", short: "o" },
11
+ "output-dir": { type: "string" },
12
+ "plan-out": { type: "string" },
13
+ force: { type: "boolean" },
14
+ play: { type: "boolean" },
15
+ "dry-run": { type: "boolean" },
16
+ stream: { type: "boolean" },
17
+ format: { type: "string" },
18
+ progress: { type: "boolean" },
19
+ "flush-ms": { type: "string" },
20
+ diagnostics: { type: "string" },
21
+ detail: { type: "string" },
22
+ engine: { type: "string" },
23
+ voice: { type: "string" },
24
+ endpoint: { type: "string" },
25
+ "timeout-ms": { type: "string" },
26
+ retries: { type: "string" },
27
+ concurrency: { type: "string" },
28
+ "cache-dir": { type: "string" },
29
+ cache: { type: "boolean" },
30
+ dictionary: { type: "string" },
31
+ "dict-entry": { type: "string", multiple: true },
32
+ "strict-reading": { type: "boolean" },
33
+ kana: { type: "string" },
34
+ speaker: { type: "string" },
35
+ speed: { type: "string" },
36
+ pitch: { type: "string" },
37
+ "pitch-semitones": { type: "string" },
38
+ intonation: { type: "string" },
39
+ volume: { type: "string" },
40
+ "gain-db": { type: "string" },
41
+ breathiness: { type: "string" },
42
+ "pre-pause": { type: "string" },
43
+ "post-pause": { type: "string" },
44
+ "pause-length": { type: "string" },
45
+ "pause-scale": { type: "string" },
46
+ upspeak: { type: "boolean" },
47
+ split: { type: "string" },
48
+ "sample-rate": { type: "string" },
49
+ seed: { type: "string" },
50
+ lyrics: { type: "string" },
51
+ melody: { type: "string" },
52
+ beats: { type: "string" },
53
+ mml: { type: "string" },
54
+ tempo: { type: "string" },
55
+ singer: { type: "string" },
56
+ teacher: { type: "string" },
57
+ transpose: { type: "string" },
58
+ "vibrato-depth": { type: "string" },
59
+ "vibrato-rate": { type: "string" },
60
+ "vibrato-delay-ms": { type: "string" },
61
+ "vibrato-fade-ms": { type: "string" },
62
+ "portamento-ms": { type: "string" },
63
+ "scoop-cents": { type: "string" },
64
+ "scoop-ms": { type: "string" },
65
+ "consonant-compression": { type: "boolean" },
66
+ "lead-in": { type: "string" },
67
+ "lead-out": { type: "string" },
68
+ kind: { type: "string" },
69
+ query: { type: "string" },
70
+ initialize: { type: "boolean" },
71
+ scope: { type: "string" },
72
+ surface: { type: "string" },
73
+ reading: { type: "string" },
74
+ pronunciation: { type: "string" },
75
+ accent: { type: "string" },
76
+ match: { type: "string" },
77
+ priority: { type: "string" },
78
+ id: { type: "string" },
79
+ "word-type": { type: "string" },
80
+ "max-bytes": { type: "string" },
81
+ "max-entries": { type: "string" },
82
+ "pitch-track": { type: "boolean" },
83
+ "window-ms": { type: "string" },
84
+ "stop-on-error": { type: "boolean" },
85
+ };
86
+ export function parseCommandLine(argv) {
87
+ return parseArgs({ args: [...argv], options: OPTIONS, allowPositionals: true, allowNegative: true, strict: true });
88
+ }
89
+ const COMMON = [
90
+ "json",
91
+ "engine",
92
+ "voice",
93
+ "endpoint",
94
+ "timeout-ms",
95
+ "retries",
96
+ "concurrency",
97
+ "cache-dir",
98
+ "cache",
99
+ "dictionary",
100
+ ];
101
+ const OUTPUT = ["output", "force", "play", "plan-out", "dry-run", "diagnostics"];
102
+ const SPEECH = [
103
+ "text",
104
+ "input",
105
+ "kana",
106
+ "dict-entry",
107
+ "strict-reading",
108
+ "speaker",
109
+ "speed",
110
+ "pitch",
111
+ "pitch-semitones",
112
+ "intonation",
113
+ "volume",
114
+ "gain-db",
115
+ "breathiness",
116
+ "pre-pause",
117
+ "post-pause",
118
+ "pause-length",
119
+ "pause-scale",
120
+ "upspeak",
121
+ "split",
122
+ "sample-rate",
123
+ "seed",
124
+ ];
125
+ const STREAM = ["stream", "format", "progress", "flush-ms"];
126
+ const SONG = [
127
+ "input",
128
+ "lyrics",
129
+ "melody",
130
+ "beats",
131
+ "mml",
132
+ "tempo",
133
+ "singer",
134
+ "teacher",
135
+ "transpose",
136
+ "volume",
137
+ "gain-db",
138
+ "breathiness",
139
+ "vibrato-depth",
140
+ "vibrato-rate",
141
+ "vibrato-delay-ms",
142
+ "vibrato-fade-ms",
143
+ "portamento-ms",
144
+ "scoop-cents",
145
+ "scoop-ms",
146
+ "consonant-compression",
147
+ "lead-in",
148
+ "lead-out",
149
+ "sample-rate",
150
+ "seed",
151
+ ];
152
+ export const ALLOWED = {
153
+ speak: [...COMMON, ...OUTPUT, ...SPEECH, ...STREAM],
154
+ sing: [...COMMON, ...OUTPUT, ...SONG],
155
+ render: [...COMMON, ...OUTPUT, "input"],
156
+ validate: [...COMMON, "input", "diagnostics", ...SPEECH, ...SONG],
157
+ plan: [...COMMON, "input", "detail", ...SPEECH, ...SONG],
158
+ batch: [...COMMON, "input", "output-dir", "force", "stop-on-error"],
159
+ reading: [...COMMON, "text", "input", "kana", "dict-entry", "strict-reading", "speaker"],
160
+ inspect: ["json", "input", "pitch-track", "window-ms"],
161
+ voices: [...COMMON, "kind", "query"],
162
+ doctor: [...COMMON, "speaker", "initialize"],
163
+ dict: [
164
+ ...COMMON,
165
+ "scope",
166
+ "surface",
167
+ "reading",
168
+ "pronunciation",
169
+ "accent",
170
+ "match",
171
+ "priority",
172
+ "id",
173
+ "word-type",
174
+ "dry-run",
175
+ "text",
176
+ "input",
177
+ ],
178
+ cache: ["json", "cache-dir", "max-bytes", "max-entries", "dry-run"],
179
+ play: ["json"],
180
+ schema: ["json", "kind"],
181
+ capabilities: ["json"],
182
+ help: [],
183
+ };
184
+ export function numberFlag(values, name) {
185
+ const raw = values[name];
186
+ if (raw === undefined || typeof raw !== "string")
187
+ return undefined;
188
+ const value = Number(raw.trim());
189
+ if (raw.trim().length === 0 || !Number.isFinite(value)) {
190
+ invalid(`$flags.${name}`, `Expected a number for --${name}, got ${JSON.stringify(raw)}.`, {
191
+ hint: `Example: --${name} ${name === "tempo" ? "120" : name === "sample-rate" ? "24000" : "1"}`,
192
+ });
193
+ }
194
+ return value;
195
+ }
196
+ export function styleFlag(values, name) {
197
+ const raw = values[name];
198
+ if (raw === undefined)
199
+ return undefined;
200
+ return /^\d+$/u.test(raw.trim()) ? Number(raw) : raw;
201
+ }
202
+ export function assign(target, key, value) {
203
+ if (value !== undefined)
204
+ target[key] = value;
205
+ }
206
+ export function env(name) {
207
+ const value = process.env[name];
208
+ return value === undefined || value.trim().length === 0 ? undefined : value.trim();
209
+ }
210
+ export function checkAllowed(command, values) {
211
+ const allowed = ALLOWED[command] ?? [];
212
+ for (const key of Object.keys(values)) {
213
+ if (key === "help" || key === "version")
214
+ continue;
215
+ if (!allowed.includes(key)) {
216
+ invalid(`$flags.${key}`, `--${key} is not accepted by ${command}.`, {
217
+ hint: `Run: kongyoroid ${command} --help`,
218
+ });
219
+ }
220
+ }
221
+ }
222
+ export function parseDictEntries(values) {
223
+ const raw = values["dict-entry"];
224
+ if (raw === undefined)
225
+ return [];
226
+ return raw.map((item, index) => {
227
+ const match = /^([^=]+)=([^:]+)(?::(\d+))?$/u.exec(item.trim());
228
+ if (match === null) {
229
+ invalid(`$flags.dict-entry[${index}]`, `Expected SURFACE=READING[:ACCENT], got ${JSON.stringify(item)}.`, {
230
+ hint: "Example: --dict-entry kongyoroid=コンギョロイド:0",
231
+ });
232
+ }
233
+ return {
234
+ surface: (match[1] ?? "").trim(),
235
+ reading: (match[2] ?? "").trim(),
236
+ ...(match[3] === undefined ? {} : { accent: Number(match[3]) }),
237
+ };
238
+ });
239
+ }
240
+ //# sourceMappingURL=flags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/cli/flags.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,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BAAmB,OAAO,SAAS;aAC1C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IACjC,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAG,+BAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAChE,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,CAAC,qBAAqB,KAAK,GAAG,EAAE,0CAA0C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE;gBACxG,IAAI,EAAE,4CAA4C;aACnD,CAAC,CAAC;QACL,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;YAChC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;YAChC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface CommandHelp {
2
+ readonly summary: string;
3
+ readonly usage: string;
4
+ readonly description: string;
5
+ readonly options: readonly (readonly [string, string])[];
6
+ readonly examples: readonly string[];
7
+ }
8
+ export declare const COMMANDS: Readonly<Record<string, CommandHelp>>;
9
+ export declare function rootHelp(): string;
10
+ export declare function commandHelp(name: string): string;
11
+ //# sourceMappingURL=help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IACzD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AA+ED,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CA0O1D,CAAC;AAEF,wBAAgB,QAAQ,IAAI,MAAM,CA0BjC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBhD"}