@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,336 @@
1
+ import { VERSION } from "../version.js";
2
+ const COMMON_OPTIONS = [
3
+ ["--engine formant|voicevox|auto", "Engine (default formant; a VOICEVOX style selects voicevox)"],
4
+ ["--voice ID", "Built-in voice: neutral, female, male, child, soft, bright, deep"],
5
+ ["--dictionary FILE", "Local reading dictionary JSON (or KONGYOROID_DICTIONARY)"],
6
+ ["--cache-dir DIR", "On-disk render cache (a kongyoroid-cache subdirectory is created)"],
7
+ ["--no-cache", "Disable the render cache for this run"],
8
+ ["--endpoint URL", "VOICEVOX ENGINE base URL (default http://127.0.0.1:50021)"],
9
+ ["--timeout-ms N", "VOICEVOX HTTP timeout per request"],
10
+ ["--retries N", "VOICEVOX HTTP retries for retryable failures"],
11
+ ["--concurrency N", "Parallel renders (batch) and HTTP requests"],
12
+ ];
13
+ const OUTPUT_OPTIONS = [
14
+ ["-o, --output FILE|-", "WAV path (default kongyoroid-<kind>-<hash>.wav); - streams bytes to stdout, JSON to stderr"],
15
+ ["--force", "Replace an existing output file (identical content is a no-op without --force)"],
16
+ ["--play", "Play the result with the system player after writing"],
17
+ ["--plan-out FILE|-", "Also write the synthesis plan (reading, phonemes, timing) as JSON"],
18
+ ["--dry-run", "Validate and plan only; write nothing (same output as validate)"],
19
+ ["--diagnostics json|compact", "How warnings are reported: inside the JSON (default) or one line each on stderr"],
20
+ ];
21
+ const SPEECH_OPTIONS = [
22
+ ["-t, --text TEXT", "Text to read (kanji, kana, numbers, ASCII words)"],
23
+ ["-i, --input FILE|-", "Read the text from a file or stdin"],
24
+ [
25
+ "--kana NOTATION",
26
+ "Pronunciation override with optional accent marks: コンニチワ、キョ'ーワ/イ'イ/テ'ンキデ_スネ?",
27
+ ],
28
+ [
29
+ "--dict-entry SURFACE=READING[:ACCENT]",
30
+ "One-off reading override (repeatable), e.g. --dict-entry kongyoroid=コンギョロイド:0",
31
+ ],
32
+ ["--no-strict-reading", "Skip unreadable characters with a warning instead of failing"],
33
+ ["--speed N", "Rate multiplier 0.25–4 (default 1)"],
34
+ ["--pitch-semitones N", "Shift the base pitch in semitones (-24..24)"],
35
+ ["--pitch N", "VOICEVOX pitchScale semantics (-1..1, practical ±0.15); not with --pitch-semitones"],
36
+ ["--intonation N", "Pitch-range multiplier 0–3 (default 1)"],
37
+ ["--volume N | --gain-db N", "Output level (linear 0–3, or dB)"],
38
+ ["--breathiness N", "Glottal tension offset -1..1.5 (positive = breathier)"],
39
+ ["--pre-pause S, --post-pause S", "Leading/trailing silence in seconds (default 0.1)"],
40
+ ["--pause-length S, --pause-scale N", "Absolute 、 pause length, and pause multiplier"],
41
+ ["--no-upspeak", "Do not raise the end of questions"],
42
+ ["--sample-rate HZ", "8000–48000 (default 24000)"],
43
+ ["--seed N", "Noise seed (default 1)"],
44
+ ["--speaker ID|NAME", "VOICEVOX speech style (selects the voicevox engine)"],
45
+ ["--split sentence|paragraph|none", "VOICEVOX chunking"],
46
+ ];
47
+ const STREAM_OPTIONS = [
48
+ ["--stream", "Synthesize sentence by sentence as text arrives (stdin, file, or --text) and emit audio immediately"],
49
+ [
50
+ "--format wav|pcm|ndjson",
51
+ "Stream format for --output -: wav (unknown-length header), pcm (raw s16le mono), ndjson (JSON lines with base64 audio)",
52
+ ],
53
+ ["--progress", "With --stream, print a JSON line per sentence on stderr"],
54
+ ];
55
+ const SONG_OPTIONS = [
56
+ ["--lyrics KANA", "Kana lyrics, one mora per pitched note"],
57
+ ["--melody NOTES", 'Notes: "C4 D4 E4 R ~ ~G4" (R rest, ~ tie, ~G4 melisma to G4)'],
58
+ ["--beats LIST", 'Beats per note: "1 1 2 0.5"; one value applies to all (default 1)'],
59
+ ["--mml MML", 'MML score instead of --melody: "t120 o4 l8 c d e f g4 r4 e&e"'],
60
+ ["-i, --input FILE|-", "Song request JSON (flags override its fields)"],
61
+ ["--tempo BPM", "20–400 (default 120 or the MML tempo)"],
62
+ ["--transpose N", "Semitones -48..48"],
63
+ ["--vibrato-depth CENTS, --vibrato-rate HZ", "Vibrato (default 30 cents, 5.5 Hz; 0 disables)"],
64
+ ["--vibrato-delay-ms MS, --vibrato-fade-ms MS", "Vibrato onset per sustained vowel"],
65
+ ["--portamento-ms MS", "Pitch transition between connected notes (default 60; 0 = step)"],
66
+ ["--scoop-cents N", "Start phrase-initial notes below pitch and slide up"],
67
+ ["--no-consonant-compression", "Fail with NOTE_TOO_SHORT instead of shortening consonants"],
68
+ ["--lead-in S, --lead-out S", "Rests around the score (default 0.16)"],
69
+ ["--volume N | --gain-db N", "Output level"],
70
+ ["--breathiness N", "Glottal tension offset"],
71
+ ["--sample-rate HZ, --seed N", "Output rate and noise seed"],
72
+ ["--singer ID|NAME, --teacher ID|NAME", "VOICEVOX singing styles (select the voicevox engine)"],
73
+ ];
74
+ export const COMMANDS = {
75
+ speak: {
76
+ summary: "Read Japanese text aloud",
77
+ usage: "kongyoroid speak (--text TEXT | --input FILE|-) [options]",
78
+ description: "Reads ordinary Japanese (kanji, kana, numbers, dates, ASCII words) with the built-in engine. Readings and accents come from the jpreprocess frontend and can be overridden with --kana or dictionaries. Prints one JSON line with the output path and metadata.",
79
+ options: [...SPEECH_OPTIONS, ...STREAM_OPTIONS, ...OUTPUT_OPTIONS, ...COMMON_OPTIONS],
80
+ examples: [
81
+ 'kongyoroid speak --text "こんにちは。今日はいい天気ですね?" -o hello.wav',
82
+ 'kongyoroid speak --text "橋の端で箸を使う" --kana "ハシノ/ハシデ/ハ\'シヲ/ツカウ" -o hashi.wav',
83
+ 'kongyoroid speak --text "kongyoroidは便利です" --dict-entry kongyoroid=コンギョロイド:0 -o dict.wav',
84
+ "kongyoroid speak --input notes.txt --voice female --speed 1.1 -o notes.wav --play",
85
+ 'kongyoroid speak --text "テストが3件失敗しました" --dry-run',
86
+ "llm-agent run | kongyoroid speak --input - --stream --output - --format pcm | aplay -f S16_LE -r 24000 -c 1",
87
+ 'kongyoroid speak --text "ずんだもんなのだ" --speaker ずんだもん -o zunda.wav',
88
+ ],
89
+ },
90
+ sing: {
91
+ summary: "Sing a score (lyrics + melody, MML, or a note list)",
92
+ usage: "kongyoroid sing (--lyrics KANA --melody NOTES | --mml MML [--lyrics KANA] | --input FILE|-) [options]",
93
+ description: "Sings kana lyrics on a melody with the built-in engine: ties, melismas, re-articulation, per-note velocity and vibrato are supported in the JSON note list. Prints one JSON line with the output path and metadata.",
94
+ options: [...SONG_OPTIONS, ...OUTPUT_OPTIONS, ...COMMON_OPTIONS],
95
+ examples: [
96
+ 'kongyoroid sing --lyrics "ドレミファソラシド" --melody "C4 D4 E4 F4 G4 A4 B4 C5" --beats "1 1 1 1 1 1 1 2" --tempo 100 -o scale.wav',
97
+ 'kongyoroid sing --lyrics "きらきらぼしー" --melody "C4 C4 G4 G4 A4 A4 G4 ~ R" --beats "1 1 1 1 1 1 1 1 2" -o twinkle.wav',
98
+ 'kongyoroid sing --mml "t140 o4 l8 c d e f g4 r4 e&e d4 c2" --lyrics "どれみふぁそみれど" -o mml.wav',
99
+ 'kongyoroid sing --lyrics "あ" --melody "C4 ~E4 ~G4" --beats "1 1 2" --vibrato-depth 0 --portamento-ms 0 -o melisma.wav',
100
+ "kongyoroid sing --input song.json --transpose -2 --voice male -o song.wav",
101
+ 'kongyoroid sing --lyrics "ドレミ" --melody "C4 D4 E4" --singer ずんだもん -o voicevox.wav',
102
+ ],
103
+ },
104
+ render: {
105
+ summary: "Render a full JSON request (speech or song)",
106
+ usage: "kongyoroid render --input FILE|- [options]",
107
+ description: "Renders a request that follows the JSON Schema printed by the schema command. Flags such as --engine, --voice, and --dictionary override or supplement the request.",
108
+ options: [["-i, --input FILE|-", "Request JSON (required)"], ...OUTPUT_OPTIONS, ...COMMON_OPTIONS],
109
+ examples: [
110
+ "kongyoroid render --input request.json -o out.wav",
111
+ 'echo \'{"kind":"speech","text":"読み上げのテスト"}\' | kongyoroid render --input - -o test.wav',
112
+ "kongyoroid render --input song.json --plan-out song.plan.json -o song.wav",
113
+ "kongyoroid render --input request.json --dry-run",
114
+ ],
115
+ },
116
+ validate: {
117
+ summary: "Validate a request and estimate its output without rendering",
118
+ usage: "kongyoroid validate (--input FILE|- | --text TEXT | --lyrics KANA --melody NOTES | --mml MML) [options]",
119
+ description: "Checks structure and semantics (readings, note timing, pitch range), and returns the estimated duration and size, warnings, adjustments, and hashes. Exit code 2 means the request cannot be rendered as written.",
120
+ options: [
121
+ ["-i, --input FILE|-", "Request JSON"],
122
+ ...SPEECH_OPTIONS.slice(0, 5),
123
+ ...SONG_OPTIONS.slice(0, 4),
124
+ ["--diagnostics json|compact", "Warnings inside the JSON (default) or one compact line per warning on stdout"],
125
+ ...COMMON_OPTIONS,
126
+ ],
127
+ examples: [
128
+ "kongyoroid validate --input request.json",
129
+ 'kongyoroid validate --text "2026年9月7日 9:05に会議"',
130
+ 'kongyoroid validate --lyrics "きらきら" --melody "C4 C4 G4" --diagnostics compact',
131
+ ],
132
+ },
133
+ plan: {
134
+ summary: "Show reading, phonemes, notes, and timing of a request",
135
+ usage: "kongyoroid plan (--input FILE|- | --text TEXT | --lyrics KANA --melody NOTES | --mml MML) [--detail summary|phonemes|acoustics] [options]",
136
+ description: "Compiles the request with the built-in engine and prints the plan: accent phrases with sources, mora and note boundaries in seconds, pitch range, warnings, and adjustments. Use it to check readings before rendering, or --detail phonemes for phoneme-level timing.",
137
+ options: [
138
+ ["-i, --input FILE|-", "Request JSON"],
139
+ ["--detail summary|phonemes|acoustics", "Level of detail (default summary)"],
140
+ ...SPEECH_OPTIONS.slice(0, 5),
141
+ ...SONG_OPTIONS.slice(0, 4),
142
+ ...COMMON_OPTIONS,
143
+ ],
144
+ examples: [
145
+ 'kongyoroid plan --text "こんにちは、世界"',
146
+ "kongyoroid plan --input song.json --detail phonemes",
147
+ 'kongyoroid plan --lyrics "あ" --melody "C4 ~E4" --detail acoustics | jq .plan.notes',
148
+ ],
149
+ },
150
+ batch: {
151
+ summary: "Render many JSONL jobs; also a persistent session for agents",
152
+ usage: "kongyoroid batch --input FILE|- --output-dir DIR [options]",
153
+ description: 'Each input line is {"id":"name","request":{...}}. Jobs are rendered as lines arrive (stdin works as a long-lived session), results are printed as JSON lines in completion order, failures do not stop the batch, and the exit code is the worst job result.',
154
+ options: [
155
+ ["-i, --input FILE|-", "JSONL jobs (required)"],
156
+ ["--output-dir DIR", "Directory for <id>.wav files (required)"],
157
+ ["--force", "Replace existing files"],
158
+ ["--concurrency N", "Parallel jobs (default 2)"],
159
+ ["--stop-on-error", "Stop after the first failed job"],
160
+ ...COMMON_OPTIONS,
161
+ ],
162
+ examples: [
163
+ "kongyoroid batch --input jobs.jsonl --output-dir out",
164
+ "cat jobs.jsonl | kongyoroid batch --input - --output-dir out --concurrency 4",
165
+ 'printf \'%s\\n\' \'{"id":"a","request":{"kind":"speech","text":"一件目"}}\' | kongyoroid batch -i - --output-dir out',
166
+ ],
167
+ },
168
+ reading: {
169
+ summary: "Show how text will be read (kana with accents, phrases, sources)",
170
+ usage: "kongyoroid reading (--text TEXT | --input FILE|-) [--kana NOTATION] [options]",
171
+ description: "Prints the reading the engine will use: kana notation with accent marks, accent phrases with their sources (frontend, dictionary, user), dictionary hits, and warnings. Works offline with the built-in frontend; --engine voicevox asks the VOICEVOX ENGINE instead.",
172
+ options: [
173
+ ["-t, --text TEXT", "Text to analyse"],
174
+ ["-i, --input FILE|-", "Read the text from a file or stdin"],
175
+ ["--kana NOTATION", "Pronunciation to normalize instead of analysing text"],
176
+ ["--dict-entry SURFACE=READING[:ACCENT]", "One-off reading override (repeatable)"],
177
+ ["--no-strict-reading", "Skip unreadable characters with a warning"],
178
+ ["--speaker ID|NAME", "VOICEVOX style for --engine voicevox"],
179
+ ...COMMON_OPTIONS,
180
+ ],
181
+ examples: [
182
+ 'kongyoroid reading --text "橋の端で箸を使う"',
183
+ 'kongyoroid reading --text "kongyoroidはLLM向けです" --dict-entry kongyoroid=コンギョロイド:0',
184
+ 'kongyoroid reading --text "今日は" --engine voicevox --speaker 3',
185
+ ],
186
+ },
187
+ inspect: {
188
+ summary: "Inspect a WAV file (format, level, pitch)",
189
+ usage: "kongyoroid inspect FILE.wav [--pitch-track] [--window-ms N]",
190
+ description: "Prints sample rate, duration, peak, RMS, clipped samples, and an F0 estimate (median, range, voiced ratio) for a WAV file. --pitch-track adds a per-window pitch track.",
191
+ options: [
192
+ ["--pitch-track", "Include the per-window F0 track"],
193
+ ["--window-ms N", "Analysis window in milliseconds (default 40)"],
194
+ ],
195
+ examples: [
196
+ "kongyoroid inspect out.wav",
197
+ "kongyoroid inspect song.wav --pitch-track --window-ms 30 | jq .pitch.track",
198
+ ],
199
+ },
200
+ voices: {
201
+ summary: "List voices (built-in, and VOICEVOX styles when reachable)",
202
+ usage: "kongyoroid voices [--engine formant|voicevox|all] [--kind speech|song|all] [--query TEXT]",
203
+ description: "Lists built-in voices with their pitch ranges, and VOICEVOX styles when --engine is voicevox or all and the engine answers. An unreachable VOICEVOX is reported, not fatal, unless --engine voicevox is given.",
204
+ options: [
205
+ ["--engine formant|voicevox|all", "Which engines to list (default: all, VOICEVOX best-effort)"],
206
+ ["--kind speech|song|all", "Filter VOICEVOX styles by purpose"],
207
+ ["--query TEXT", "Substring filter on id, name, or character"],
208
+ ...COMMON_OPTIONS.slice(5, 8),
209
+ ],
210
+ examples: [
211
+ "kongyoroid voices",
212
+ "kongyoroid voices --engine formant",
213
+ "kongyoroid voices --engine voicevox --kind song --query めたん",
214
+ ],
215
+ },
216
+ doctor: {
217
+ summary: "Check the runtime: frontend, synthesis, cache, and optional VOICEVOX",
218
+ usage: "kongyoroid doctor [--engine formant|voicevox|all|auto] [--speaker ID] [--initialize]",
219
+ description: "Runs a self-test of the built-in engine (frontend load, short synthesis) and reports cache and dictionary status. VOICEVOX is checked only for --engine voicevox, auto, or all. Exit code 3 when the checked engine is unusable.",
220
+ options: [
221
+ ["--engine formant|voicevox|all|auto", "What to check (default: the configured default engine)"],
222
+ ["--speaker ID|NAME", "VOICEVOX style to inspect"],
223
+ ["--initialize", "Initialize the VOICEVOX style"],
224
+ ...COMMON_OPTIONS,
225
+ ],
226
+ examples: [
227
+ "kongyoroid doctor",
228
+ "kongyoroid doctor --engine all",
229
+ "kongyoroid doctor --engine voicevox --speaker 3 --initialize",
230
+ ],
231
+ },
232
+ dict: {
233
+ summary: "Manage reading dictionaries (local file or VOICEVOX user dictionary)",
234
+ usage: "kongyoroid dict <list|add|update|delete|check> [--scope local|voicevox] [options]",
235
+ description: "Local scope edits a JSON dictionary file (default KONGYOROID_DICTIONARY or ./kongyoroid-dictionary.json) that the built-in engine applies to text. VOICEVOX scope edits the engine's user dictionary. Adding an existing surface with the same reading is a no-op.",
236
+ options: [
237
+ ["--scope local|voicevox", "Which dictionary (default local)"],
238
+ ["--dictionary FILE", "Local dictionary path"],
239
+ ["--surface TEXT", "Text to match"],
240
+ ["--reading KANA", "Pronunciation in kana (alias: --pronunciation)"],
241
+ ["--accent N", "Accent nucleus mora (0 = flat); omit to let the frontend decide"],
242
+ ["--match word|anywhere", "Local: matching mode (default word)"],
243
+ ["--priority N", "0–10 (default 5)"],
244
+ ["--id ID", "Local: entry id for update/delete"],
245
+ ["--word-type TYPE", "VOICEVOX: PROPER_NOUN|COMMON_NOUN|VERB|ADJECTIVE|SUFFIX"],
246
+ ["--dry-run", "Show the change without writing"],
247
+ ],
248
+ examples: [
249
+ "kongyoroid dict add --surface kongyoroid --reading コンギョロイド --accent 0",
250
+ "kongyoroid dict add --surface 端 --reading ハシ --accent 0 --dictionary ./readings.json",
251
+ "kongyoroid dict list",
252
+ 'kongyoroid dict check --text "kongyoroidの端"',
253
+ "kongyoroid dict delete --id entry-1",
254
+ "kongyoroid dict add --scope voicevox --surface 金曜日 --reading キンヨウビ --accent 3",
255
+ ],
256
+ },
257
+ cache: {
258
+ summary: "Show, prune, or clear the on-disk render cache",
259
+ usage: "kongyoroid cache <stats|prune|clear> [--cache-dir DIR] [--max-bytes N] [--max-entries N] [--dry-run]",
260
+ description: "Operates only on files inside <cache-dir>/kongyoroid-cache; unrelated files in the directory are never touched.",
261
+ options: [
262
+ ["--cache-dir DIR", "Cache directory (or KONGYOROID_CACHE_DIR)"],
263
+ ["--max-bytes N", "prune: keep at most this many bytes"],
264
+ ["--max-entries N", "prune: keep at most this many entries"],
265
+ ["--dry-run", "Report what would be removed"],
266
+ ],
267
+ examples: [
268
+ "kongyoroid cache stats --cache-dir ~/.cache/kongyoroid",
269
+ "kongyoroid cache prune --cache-dir ./cache --max-bytes 200000000",
270
+ "kongyoroid cache clear --cache-dir ./cache",
271
+ ],
272
+ },
273
+ play: {
274
+ summary: "Play a WAV file with the system player",
275
+ usage: "kongyoroid play FILE.wav",
276
+ description: "Tries afplay (macOS), paplay/aplay/ffplay/play (Linux), or PowerShell (Windows).",
277
+ options: [],
278
+ examples: ["kongyoroid play out.wav"],
279
+ },
280
+ schema: {
281
+ summary: "Print a JSON Schema",
282
+ usage: "kongyoroid schema [--kind request|batch|dictionary]",
283
+ description: "Prints the JSON Schema (draft 2020-12) for render requests, batch jobs, or dictionary files.",
284
+ options: [["--kind request|batch|dictionary", "Which schema (default request)"]],
285
+ examples: ["kongyoroid schema", "kongyoroid schema --kind batch > batch.schema.json"],
286
+ },
287
+ capabilities: {
288
+ summary: "Machine-readable feature descriptor",
289
+ usage: "kongyoroid capabilities",
290
+ description: "Prints engines, voices, limits, commands, environment variables, exit codes, and error codes as JSON.",
291
+ options: [],
292
+ examples: ["kongyoroid capabilities | jq .engines.formant"],
293
+ },
294
+ };
295
+ export function rootHelp() {
296
+ const lines = [
297
+ `kongyoroid ${VERSION} — Japanese speech and singing for LLM agents (built-in formant engine; VOICEVOX optional)`,
298
+ "",
299
+ "Usage: kongyoroid <command> [options]",
300
+ " kongyoroid <command> --help",
301
+ "",
302
+ "Commands",
303
+ ];
304
+ const names = Object.keys(COMMANDS);
305
+ const width = Math.max(...names.map((name) => name.length)) + 2;
306
+ for (const name of names)
307
+ lines.push(` ${name.padEnd(width)}${COMMANDS[name]?.summary ?? ""}`);
308
+ lines.push("", 'Output: one JSON object per line on stdout ({ "ok": true, ... }); errors on stderr ({ "ok": false, "error": {...} }).', "Exit codes: 0 ok, 1 internal, 2 input, 3 engine, 4 io, 130 cancelled.", "Environment: KONGYOROID_ENGINE, KONGYOROID_VOICE, KONGYOROID_DICTIONARY, KONGYOROID_CACHE_DIR,", " KONGYOROID_ENDPOINT (or VOICEVOX_URL), KONGYOROID_SPEAKER, KONGYOROID_SINGER, KONGYOROID_TEACHER", "", "Examples", ' kongyoroid speak --text "こんにちは" -o hello.wav', ' kongyoroid sing --lyrics "ドレミ" --melody "C4 D4 E4" -o scale.wav', ' kongyoroid plan --text "橋の端で箸を使う"', "");
309
+ return lines.join("\n");
310
+ }
311
+ export function commandHelp(name) {
312
+ const help = COMMANDS[name];
313
+ if (help === undefined)
314
+ return rootHelp();
315
+ const lines = [`kongyoroid ${name} — ${help.summary}`, "", `Usage: ${help.usage}`, "", help.description, ""];
316
+ if (help.options.length > 0) {
317
+ lines.push("Options");
318
+ const width = Math.min(44, Math.max(...help.options.map(([flag]) => flag.length)) + 2);
319
+ for (const [flag, description] of help.options) {
320
+ if (flag.length + 2 > width) {
321
+ lines.push(` ${flag}`);
322
+ lines.push(` ${"".padEnd(width)}${description}`);
323
+ }
324
+ else {
325
+ lines.push(` ${flag.padEnd(width)}${description}`);
326
+ }
327
+ }
328
+ lines.push("");
329
+ }
330
+ lines.push("Examples");
331
+ for (const example of help.examples)
332
+ lines.push(` ${example}`);
333
+ lines.push("");
334
+ return lines.join("\n");
335
+ }
336
+ //# sourceMappingURL=help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAUxC,MAAM,cAAc,GAA2C;IAC7D,CAAC,gCAAgC,EAAE,6DAA6D,CAAC;IACjG,CAAC,YAAY,EAAE,kEAAkE,CAAC;IAClF,CAAC,mBAAmB,EAAE,0DAA0D,CAAC;IACjF,CAAC,iBAAiB,EAAE,mEAAmE,CAAC;IACxF,CAAC,YAAY,EAAE,uCAAuC,CAAC;IACvD,CAAC,gBAAgB,EAAE,2DAA2D,CAAC;IAC/E,CAAC,gBAAgB,EAAE,mCAAmC,CAAC;IACvD,CAAC,aAAa,EAAE,8CAA8C,CAAC;IAC/D,CAAC,iBAAiB,EAAE,4CAA4C,CAAC;CAClE,CAAC;AAEF,MAAM,cAAc,GAA2C;IAC7D,CAAC,qBAAqB,EAAE,4FAA4F,CAAC;IACrH,CAAC,SAAS,EAAE,gFAAgF,CAAC;IAC7F,CAAC,QAAQ,EAAE,sDAAsD,CAAC;IAClE,CAAC,mBAAmB,EAAE,mEAAmE,CAAC;IAC1F,CAAC,WAAW,EAAE,iEAAiE,CAAC;IAChF,CAAC,4BAA4B,EAAE,iFAAiF,CAAC;CAClH,CAAC;AAEF,MAAM,cAAc,GAA2C;IAC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