siduri 1.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.
- package/LICENSE +6 -0
- package/README.md +84 -0
- package/dist/builtin-manifests.d.ts +2 -0
- package/dist/builtin-manifests.js +524 -0
- package/dist/clean-machine-e2e.test.d.ts +1 -0
- package/dist/clean-machine-e2e.test.js +160 -0
- package/dist/clean-machine-smoke.test.d.ts +1 -0
- package/dist/clean-machine-smoke.test.js +165 -0
- package/dist/colors.d.ts +8 -0
- package/dist/colors.js +11 -0
- package/dist/configurators/behavior.d.ts +2 -0
- package/dist/configurators/behavior.js +77 -0
- package/dist/configurators/body.d.ts +2 -0
- package/dist/configurators/body.js +107 -0
- package/dist/configurators/brain.d.ts +6 -0
- package/dist/configurators/brain.js +80 -0
- package/dist/configurators/ear.d.ts +2 -0
- package/dist/configurators/ear.js +43 -0
- package/dist/configurators/hands.d.ts +2 -0
- package/dist/configurators/hands.js +43 -0
- package/dist/configurators/index.d.ts +24 -0
- package/dist/configurators/index.js +78 -0
- package/dist/configurators/knowledge.d.ts +6 -0
- package/dist/configurators/knowledge.js +146 -0
- package/dist/configurators/memory.d.ts +2 -0
- package/dist/configurators/memory.js +26 -0
- package/dist/configurators/mouth.d.ts +2 -0
- package/dist/configurators/mouth.js +35 -0
- package/dist/configurators/observation.d.ts +2 -0
- package/dist/configurators/observation.js +38 -0
- package/dist/configurators/types.d.ts +12 -0
- package/dist/configurators/types.js +2 -0
- package/dist/configurators/vision.d.ts +2 -0
- package/dist/configurators/vision.js +47 -0
- package/dist/configurators/voice.d.ts +2 -0
- package/dist/configurators/voice.js +373 -0
- package/dist/configurators.test.d.ts +1 -0
- package/dist/configurators.test.js +464 -0
- package/dist/db.d.ts +13 -0
- package/dist/db.js +15 -0
- package/dist/discovery.d.ts +13 -0
- package/dist/discovery.js +85 -0
- package/dist/discovery.test.d.ts +1 -0
- package/dist/discovery.test.js +69 -0
- package/dist/doctor-db.test.d.ts +1 -0
- package/dist/doctor-db.test.js +52 -0
- package/dist/doctor.d.ts +19 -0
- package/dist/doctor.js +266 -0
- package/dist/generator.d.ts +23 -0
- package/dist/generator.js +1094 -0
- package/dist/generator.test.d.ts +1 -0
- package/dist/generator.test.js +252 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +607 -0
- package/dist/manifest.d.ts +33 -0
- package/dist/manifest.js +40 -0
- package/dist/project-dir.test.d.ts +1 -0
- package/dist/project-dir.test.js +37 -0
- package/dist/providers/knowledge-hub.d.ts +44 -0
- package/dist/providers/knowledge-hub.js +162 -0
- package/dist/providers/openrouter.d.ts +32 -0
- package/dist/providers/openrouter.js +201 -0
- package/dist/release-check.d.ts +9 -0
- package/dist/release-check.js +128 -0
- package/dist/runtime-parity.test.d.ts +1 -0
- package/dist/runtime-parity.test.js +141 -0
- package/dist/schema-validator.d.ts +9 -0
- package/dist/schema-validator.js +107 -0
- package/dist/web-dist/404/index.html +1 -0
- package/dist/web-dist/404.html +1 -0
- package/dist/web-dist/__next.__PAGE__.txt +34 -0
- package/dist/web-dist/__next._full.txt +32 -0
- package/dist/web-dist/__next._tree.txt +4 -0
- package/dist/web-dist/_next/static/4aL_iP3FHsLSyHzCnRQYD/_buildManifest.js +1 -0
- package/dist/web-dist/_next/static/4aL_iP3FHsLSyHzCnRQYD/_ssgManifest.js +1 -0
- package/dist/web-dist/_next/static/chunks/136-1d10af93b770a1c8.js +52 -0
- package/dist/web-dist/_next/static/chunks/1629039a.f535b3ff45566416.js +1 -0
- package/dist/web-dist/_next/static/chunks/202.59b8eb8a8c45f711.js +1 -0
- package/dist/web-dist/_next/static/chunks/2be4ccb0.ab2975eb50b4e166.js +1 -0
- package/dist/web-dist/_next/static/chunks/411.d68b2e48424f1e47.js +1 -0
- package/dist/web-dist/_next/static/chunks/426-9f7f6e7fffd4c3c3.js +1 -0
- package/dist/web-dist/_next/static/chunks/563b947f-8e2871a2ab7cd91e.js +1 -0
- package/dist/web-dist/_next/static/chunks/92e71660.11f182d50bce2be0.js +342 -0
- package/dist/web-dist/_next/static/chunks/app/_global-error/page-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/_not-found/page-74658f4988eabcc7.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/chat/page-ab56048b707a3ddd.js +34 -0
- package/dist/web-dist/_next/static/chunks/app/layout-14f1a3f31e58be17.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/operator/page-6b2d0ba884183ad7.js +1 -0
- package/dist/web-dist/_next/static/chunks/app/page-fc4bf56cf33ae27b.js +1 -0
- package/dist/web-dist/_next/static/chunks/framework-7afb7035d9872ea0.js +1 -0
- package/dist/web-dist/_next/static/chunks/main-8553b996986f1210.js +5 -0
- package/dist/web-dist/_next/static/chunks/main-app-9e6a144626e5a5b9.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/app-error-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/forbidden-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/global-error-68ea4ac05dcaf701.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/not-found-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/next/dist/client/components/builtin/unauthorized-bce6d30fb2b1a3b0.js +1 -0
- package/dist/web-dist/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dist/web-dist/_next/static/chunks/webpack-9073f434bc17ce16.js +1 -0
- package/dist/web-dist/_next/static/css/ceeb8e5596664b11.css +1 -0
- package/dist/web-dist/_not-found/__next._full.txt +17 -0
- package/dist/web-dist/_not-found/__next._not-found.__PAGE__.txt +23 -0
- package/dist/web-dist/_not-found/__next._tree.txt +3 -0
- package/dist/web-dist/_not-found/index.html +1 -0
- package/dist/web-dist/_not-found/index.txt +17 -0
- package/dist/web-dist/apple-icon.png +0 -0
- package/dist/web-dist/apple-touch-icon.png +0 -0
- package/dist/web-dist/chat/__next._full.txt +18 -0
- package/dist/web-dist/chat/__next._tree.txt +3 -0
- package/dist/web-dist/chat/__next.chat.__PAGE__.txt +24 -0
- package/dist/web-dist/chat/index.html +1 -0
- package/dist/web-dist/chat/index.txt +18 -0
- package/dist/web-dist/favicon.ico +0 -0
- package/dist/web-dist/favicon.svg +4 -0
- package/dist/web-dist/icon.svg +4 -0
- package/dist/web-dist/index.html +1 -0
- package/dist/web-dist/index.txt +32 -0
- package/dist/web-dist/live2d/live2dcubismcore.min.js +9 -0
- package/dist/web-dist/logo-circle.png +0 -0
- package/dist/web-dist/logo-circle.svg +4 -0
- package/dist/web-dist/logo-white.svg +3 -0
- package/dist/web-dist/logo.png +0 -0
- package/dist/web-dist/logo.svg +3 -0
- package/dist/web-dist/operator/__next._full.txt +18 -0
- package/dist/web-dist/operator/__next._tree.txt +3 -0
- package/dist/web-dist/operator/__next.operator.__PAGE__.txt +24 -0
- package/dist/web-dist/operator/index.html +1 -0
- package/dist/web-dist/operator/index.txt +18 -0
- package/dist/web-template.d.ts +2 -0
- package/dist/web-template.js +589 -0
- package/package.json +44 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configureVoice = configureVoice;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
const colors_1 = require("../colors");
|
|
9
|
+
async function configureVoice(_context) {
|
|
10
|
+
const { provider } = await inquirer_1.default.prompt({
|
|
11
|
+
type: 'list',
|
|
12
|
+
name: 'provider',
|
|
13
|
+
message: 'Voice engine?',
|
|
14
|
+
choices: [
|
|
15
|
+
{
|
|
16
|
+
name: 'VOICEVOX (Pre-trained character voice banks: Zundamon, Shikoku Metan, etc.)',
|
|
17
|
+
value: 'voicevox',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'RVC (Custom character voice model via .pth / .index weights + Base TTS)',
|
|
21
|
+
value: 'rvc',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'None (Disable voice synthesis)',
|
|
25
|
+
value: 'none',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
if (provider === 'none') {
|
|
30
|
+
return {
|
|
31
|
+
config: { provider: 'none' },
|
|
32
|
+
summary: { Provider: 'None (Voice disabled)' },
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (provider === 'rvc') {
|
|
36
|
+
console.log(`\n ${colors_1.colors.cyan}ℹ RVC Voice Model Setup:${colors_1.colors.reset}`);
|
|
37
|
+
console.log(` • ${colors_1.colors.dim}Voice Weights:${colors_1.colors.reset} Place your trained weights (.pth) in: ${colors_1.colors.green}./assets/voice/default/default.pth${colors_1.colors.reset}`);
|
|
38
|
+
console.log(` • ${colors_1.colors.dim}Feature Index:${colors_1.colors.reset} Place optional .index in: ${colors_1.colors.green}./assets/voice/default/default.index${colors_1.colors.reset}`);
|
|
39
|
+
console.log(` • ${colors_1.colors.dim}RVC Service:${colors_1.colors.reset} Ensure your headless RVC microservice is running before voice inference.\n`);
|
|
40
|
+
const rvcAnswers = await inquirer_1.default.prompt([
|
|
41
|
+
{
|
|
42
|
+
type: 'input',
|
|
43
|
+
name: 'modelPath',
|
|
44
|
+
message: 'RVC Model Path (.pth weights):',
|
|
45
|
+
default: './assets/voice/default/default.pth',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: 'input',
|
|
49
|
+
name: 'indexPath',
|
|
50
|
+
message: 'RVC Feature Index Path (.index, optional):',
|
|
51
|
+
default: './assets/voice/default/default.index',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'input',
|
|
55
|
+
name: 'pitchShift',
|
|
56
|
+
message: 'Pitch Shift (semitones, e.g. 0 for neutral, 12 for male-to-female, -12 for female-to-male):',
|
|
57
|
+
default: '0',
|
|
58
|
+
validate: (v) => !isNaN(parseInt(v, 10)) || 'Pitch shift must be an integer.',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'list',
|
|
62
|
+
name: 'f0Method',
|
|
63
|
+
message: 'Pitch Extraction Algorithm (F0 Method):',
|
|
64
|
+
choices: ['rmvpe', 'pm', 'harvest', 'crepe'],
|
|
65
|
+
default: 'rmvpe',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: 'list',
|
|
69
|
+
name: 'baseTts',
|
|
70
|
+
message: 'Base TTS Engine for RVC (Generates initial audio):',
|
|
71
|
+
choices: [
|
|
72
|
+
{ name: 'Edge-TTS (Cloud API, 0MB - streams over network, zero local binary)', value: 'edge-tts' },
|
|
73
|
+
{ name: 'Kokoro TTS (Connects to existing local Kokoro server or CLI)', value: 'kokoro' },
|
|
74
|
+
{ name: 'Piper TTS (Connects to existing local Piper server or CLI)', value: 'piper' },
|
|
75
|
+
],
|
|
76
|
+
default: 'edge-tts',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'input',
|
|
80
|
+
name: 'serviceUrl',
|
|
81
|
+
message: 'RVC Headless Service URL:',
|
|
82
|
+
default: 'http://localhost:50055',
|
|
83
|
+
},
|
|
84
|
+
]);
|
|
85
|
+
const pitchShift = parseInt(rvcAnswers.pitchShift, 10) || 0;
|
|
86
|
+
const config = {
|
|
87
|
+
provider: rvcAnswers.baseTts,
|
|
88
|
+
maxQueueDepth: 50,
|
|
89
|
+
rvc: {
|
|
90
|
+
enabled: true,
|
|
91
|
+
serviceUrl: rvcAnswers.serviceUrl.trim(),
|
|
92
|
+
modelName: 'default',
|
|
93
|
+
modelPath: rvcAnswers.modelPath.trim(),
|
|
94
|
+
indexPath: rvcAnswers.indexPath.trim() || undefined,
|
|
95
|
+
pitchShift,
|
|
96
|
+
f0Method: rvcAnswers.f0Method,
|
|
97
|
+
indexRate: 0.75,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
const summary = {
|
|
101
|
+
Provider: 'RVC (Custom Voice Model)',
|
|
102
|
+
'Base TTS': rvcAnswers.baseTts,
|
|
103
|
+
'Model Path': rvcAnswers.modelPath.trim(),
|
|
104
|
+
'Pitch Shift': pitchShift,
|
|
105
|
+
'F0 Method': rvcAnswers.f0Method,
|
|
106
|
+
'RVC Service': rvcAnswers.serviceUrl.trim(),
|
|
107
|
+
};
|
|
108
|
+
return {
|
|
109
|
+
config,
|
|
110
|
+
summary,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const DEFAULT_VOICEVOX_SPEAKERS = [
|
|
114
|
+
{
|
|
115
|
+
name: '四国めたん (Shikoku Metan)',
|
|
116
|
+
speaker_uuid: '7ffcb7ce-00ec-4bdc-82cd-45a8889e43ff',
|
|
117
|
+
styles: [
|
|
118
|
+
{ id: 2, name: 'ノーマル (Normal)' },
|
|
119
|
+
{ id: 0, name: 'あまあま (Sweet)' },
|
|
120
|
+
{ id: 4, name: 'ツンツン (Tsundere)' },
|
|
121
|
+
{ id: 6, name: 'セクシー (Sexy)' },
|
|
122
|
+
{ id: 36, name: 'ささやき (Whisper)' },
|
|
123
|
+
{ id: 37, name: 'ヒソヒソ (Hisoniso)' },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'ずんだもん (Zundamon)',
|
|
128
|
+
speaker_uuid: '388f24ea-105d-4354-b46e-22d7d7ff4479',
|
|
129
|
+
styles: [
|
|
130
|
+
{ id: 3, name: 'ノーマル (Normal)' },
|
|
131
|
+
{ id: 1, name: 'あまあま (Sweet)' },
|
|
132
|
+
{ id: 5, name: 'ツンツン (Tsundere)' },
|
|
133
|
+
{ id: 7, name: 'セクシー (Sexy)' },
|
|
134
|
+
{ id: 22, name: 'ささやき (Whisper)' },
|
|
135
|
+
{ id: 38, name: 'ヒソヒソ (Hisoniso)' },
|
|
136
|
+
{ id: 75, name: 'ヘロヘロ (Herohero)' },
|
|
137
|
+
{ id: 76, name: 'なみだめ (Namidame)' },
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: '春日部つむぎ (Kasukabe Tsumugi)',
|
|
142
|
+
speaker_uuid: '35b2c544-660e-401e-b033-0ab4756917cd',
|
|
143
|
+
styles: [{ id: 8, name: 'ノーマル (Normal)' }],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: '雨晴はう (Rainy Hau)',
|
|
147
|
+
speaker_uuid: '3474ee95-c274-47f9-aa1a-8322163d77f1',
|
|
148
|
+
styles: [{ id: 10, name: 'ノーマル (Normal)' }],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: '波音リツ (Namine Ritsu)',
|
|
152
|
+
speaker_uuid: 'b1a81618-b27b-40d2-b0ea-27a9ad408c4b',
|
|
153
|
+
styles: [{ id: 9, name: 'ノーマル (Normal)' }],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: '玄野武宏 (Kurono Takehiro)',
|
|
157
|
+
speaker_uuid: 'c30dc15a-0992-4f8d-8bb8-ad3b76579016',
|
|
158
|
+
styles: [
|
|
159
|
+
{ id: 11, name: 'ノーマル (Normal)' },
|
|
160
|
+
{ id: 39, name: '喜び (Joy)' },
|
|
161
|
+
{ id: 40, name: 'ツンツン (Tsundere)' },
|
|
162
|
+
{ id: 41, name: '悲しみ (Sadness)' },
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: '白上虎太郎 (Shirakami Kotaro)',
|
|
167
|
+
speaker_uuid: 'e50289b4-43ff-49e6-9b58-d894c23fb4ac',
|
|
168
|
+
styles: [
|
|
169
|
+
{ id: 12, name: 'ふつう (Normal)' },
|
|
170
|
+
{ id: 32, name: 'わーい (Yay)' },
|
|
171
|
+
{ id: 33, name: 'びくびく (Timid)' },
|
|
172
|
+
{ id: 34, name: 'おこ (Angry)' },
|
|
173
|
+
{ id: 35, name: 'びえーん (Crying)' },
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: '青山龍星 (Aoyama Ryusei)',
|
|
178
|
+
speaker_uuid: '4f51116a-d9ee-4516-925d-02f183e2af8d',
|
|
179
|
+
styles: [
|
|
180
|
+
{ id: 13, name: 'ノーマル (Normal)' },
|
|
181
|
+
{ id: 81, name: '熱血 (Passionate)' },
|
|
182
|
+
{ id: 82, name: '不気味 (Eerie)' },
|
|
183
|
+
{ id: 83, name: '囁き (Whisper)' },
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: '冥鳴ひまり (Meimei Himari)',
|
|
188
|
+
speaker_uuid: '8ea4fcd4-a013-4095-abb3-11b5bf837d37',
|
|
189
|
+
styles: [{ id: 14, name: 'ノーマル (Normal)' }],
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: '九州そら (Kyushu Sora)',
|
|
193
|
+
speaker_uuid: '481fb609-6446-4870-9f46-90c4dd623403',
|
|
194
|
+
styles: [
|
|
195
|
+
{ id: 16, name: 'ノーマル (Normal)' },
|
|
196
|
+
{ id: 15, name: 'あまあま (Sweet)' },
|
|
197
|
+
{ id: 17, name: 'ツンツン (Tsundere)' },
|
|
198
|
+
{ id: 18, name: 'セクシー (Sexy)' },
|
|
199
|
+
{ id: 19, name: 'ささやき (Whisper)' },
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: 'モチノ・キョウコ (Mochino Kyoko)',
|
|
204
|
+
speaker_uuid: 'a402a5d2-085e-4b44-a034-7164ff24a3cf',
|
|
205
|
+
styles: [
|
|
206
|
+
{ id: 20, name: 'ノーマル (Normal)' },
|
|
207
|
+
{ id: 60, name: 'セクシー/タレント (Sexy)' },
|
|
208
|
+
{ id: 61, name: '泣き (Crying)' },
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: '剣崎雌雄 (Kenzaki Mesuo)',
|
|
213
|
+
speaker_uuid: '1a1756a4-263d-42ea-86a2-96f107f474e9',
|
|
214
|
+
styles: [{ id: 21, name: 'ノーマル (Normal)' }],
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: '後鬼 (Goki)',
|
|
218
|
+
speaker_uuid: '80991a54-61c4-4b5f-8700-11234c062085',
|
|
219
|
+
styles: [
|
|
220
|
+
{ id: 27, name: '人間ver. (Human)' },
|
|
221
|
+
{ id: 28, name: '鬼ver. (Oni)' },
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'No.7 (Seven)',
|
|
226
|
+
speaker_uuid: 'c86c757c-cb24-4ea0-b6f7-33c872ff72e2',
|
|
227
|
+
styles: [
|
|
228
|
+
{ id: 29, name: 'ノーマル (Normal)' },
|
|
229
|
+
{ id: 30, name: 'アナウンス (Announce)' },
|
|
230
|
+
{ id: 31, name: '読み聞かせ (Storytelling)' },
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: 'ちび式じい (Chibishiki Jii)',
|
|
235
|
+
speaker_uuid: '1e19d52b-426b-4e12-b250-bfbe55c0c9cb',
|
|
236
|
+
styles: [{ id: 42, name: 'ノーマル (Normal)' }],
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: '櫻歌ミコ (Ouka Miko)',
|
|
240
|
+
speaker_uuid: '06155980-bfab-443b-a9b8-3e4b786c7ccb',
|
|
241
|
+
styles: [
|
|
242
|
+
{ id: 43, name: 'ノーマル (Normal)' },
|
|
243
|
+
{ id: 44, name: '第二形態 (2nd Form)' },
|
|
244
|
+
{ id: 45, name: 'ロリ (Loli)' },
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: '小夜/SAYO',
|
|
249
|
+
speaker_uuid: 'a8fb71e1-8738-4e16-b541-002f23ea3e45',
|
|
250
|
+
styles: [{ id: 46, name: 'ノーマル (Normal)' }],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'ナースロボ_タイプT (Nurse Robot Type T)',
|
|
254
|
+
speaker_uuid: '882a636f-3bac-431a-966d-c5e6bba9f949',
|
|
255
|
+
styles: [
|
|
256
|
+
{ id: 47, name: 'ノーマル (Normal)' },
|
|
257
|
+
{ id: 48, name: '楽々 (Relaxed)' },
|
|
258
|
+
{ id: 49, name: '恐怖 (Fear)' },
|
|
259
|
+
{ id: 50, name: '内緒話 (Secret Talk)' },
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: '猫使アル (Nekotsuka Aru)',
|
|
264
|
+
speaker_uuid: '7253579b-240e-4328-b0a6-574ab57597ea',
|
|
265
|
+
styles: [
|
|
266
|
+
{ id: 55, name: 'ノーマル (Normal)' },
|
|
267
|
+
{ id: 56, name: 'おちつき (Calm)' },
|
|
268
|
+
{ id: 57, name: 'うきうき (Excited)' },
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: '猫使ビィ (Nekotsuka Bi)',
|
|
273
|
+
speaker_uuid: 'cf6204c3-6316-43b9-a095-2eb49e29a914',
|
|
274
|
+
styles: [
|
|
275
|
+
{ id: 58, name: 'ノーマル (Normal)' },
|
|
276
|
+
{ id: 59, name: 'おちつき (Calm)' },
|
|
277
|
+
{ id: 62, name: '人見知り (Shy)' },
|
|
278
|
+
],
|
|
279
|
+
},
|
|
280
|
+
];
|
|
281
|
+
async function getVoicevoxSpeakers(baseUrl) {
|
|
282
|
+
try {
|
|
283
|
+
const controller = new AbortController();
|
|
284
|
+
const timeout = setTimeout(() => controller.abort(), 2000);
|
|
285
|
+
const res = await fetch(new URL('/speakers', baseUrl).toString(), {
|
|
286
|
+
signal: controller.signal,
|
|
287
|
+
});
|
|
288
|
+
clearTimeout(timeout);
|
|
289
|
+
if (res.ok) {
|
|
290
|
+
const data = (await res.json());
|
|
291
|
+
if (Array.isArray(data) && data.length > 0) {
|
|
292
|
+
return data;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
catch (_e) {
|
|
297
|
+
// If local instance is unreachable, fallback to the pre-populated list
|
|
298
|
+
}
|
|
299
|
+
return DEFAULT_VOICEVOX_SPEAKERS;
|
|
300
|
+
}
|
|
301
|
+
function buildSpeakerChoices(speakers) {
|
|
302
|
+
const choices = [];
|
|
303
|
+
for (const speaker of speakers) {
|
|
304
|
+
for (const style of speaker.styles) {
|
|
305
|
+
const label = `${speaker.name} - ${style.name} (ID: ${style.id})`;
|
|
306
|
+
choices.push({
|
|
307
|
+
name: label,
|
|
308
|
+
value: { id: style.id, label },
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return choices;
|
|
313
|
+
}
|
|
314
|
+
// provider === 'voicevox'
|
|
315
|
+
console.log(`\n ${colors_1.colors.cyan}ℹ VOICEVOX Engine Runtime:${colors_1.colors.reset}`);
|
|
316
|
+
console.log(` • ${colors_1.colors.dim}Download timing:${colors_1.colors.reset} Automatically downloaded on first companion run (${colors_1.colors.green}npm start${colors_1.colors.reset}).`);
|
|
317
|
+
console.log(` • ${colors_1.colors.dim}Install path:${colors_1.colors.reset} ~/.voicevox/engine/ (~1.5GB CPU binary, verified SHA-256).`);
|
|
318
|
+
console.log(` • ${colors_1.colors.dim}Engine execution:${colors_1.colors.reset} Siduri auto-spawns and manages the engine in background on port 50021.`);
|
|
319
|
+
console.log(` • ${colors_1.colors.dim}Pre-existing check:${colors_1.colors.reset} If you already run VOICEVOX (desktop/docker), Siduri connects directly without downloading.\n`);
|
|
320
|
+
const urlAnswer = await inquirer_1.default.prompt([
|
|
321
|
+
{
|
|
322
|
+
type: 'input',
|
|
323
|
+
name: 'baseUrl',
|
|
324
|
+
message: 'VOICEVOX Engine Base URL:',
|
|
325
|
+
default: 'http://localhost:50021',
|
|
326
|
+
},
|
|
327
|
+
]);
|
|
328
|
+
const baseUrl = urlAnswer.baseUrl.trim() || 'http://localhost:50021';
|
|
329
|
+
const speakers = await getVoicevoxSpeakers(baseUrl);
|
|
330
|
+
const speakerChoices = buildSpeakerChoices(speakers);
|
|
331
|
+
const speakerAnswer = await inquirer_1.default.prompt([
|
|
332
|
+
{
|
|
333
|
+
type: 'list',
|
|
334
|
+
name: 'speaker',
|
|
335
|
+
message: 'Select VOICEVOX Character Voice Bank & Style:',
|
|
336
|
+
choices: speakerChoices,
|
|
337
|
+
pageSize: 15,
|
|
338
|
+
},
|
|
339
|
+
]);
|
|
340
|
+
let speakerId = 1;
|
|
341
|
+
let speakerLabel = '四国めたん (Shikoku Metan) - ノーマル (Normal) (ID: 2)';
|
|
342
|
+
if (speakerAnswer && speakerAnswer.speaker) {
|
|
343
|
+
if (typeof speakerAnswer.speaker === 'object' && 'id' in speakerAnswer.speaker) {
|
|
344
|
+
speakerId = speakerAnswer.speaker.id;
|
|
345
|
+
speakerLabel = speakerAnswer.speaker.label;
|
|
346
|
+
}
|
|
347
|
+
else if (typeof speakerAnswer.speaker === 'number') {
|
|
348
|
+
speakerId = speakerAnswer.speaker;
|
|
349
|
+
speakerLabel = `Speaker ID: ${speakerId}`;
|
|
350
|
+
}
|
|
351
|
+
else if (typeof speakerAnswer.speaker === 'string') {
|
|
352
|
+
speakerId = parseInt(speakerAnswer.speaker, 10) || 1;
|
|
353
|
+
speakerLabel = `Speaker ID: ${speakerId}`;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
const config = {
|
|
357
|
+
provider: 'voicevox',
|
|
358
|
+
baseUrl,
|
|
359
|
+
speakerId,
|
|
360
|
+
maxQueueDepth: 50,
|
|
361
|
+
};
|
|
362
|
+
const summary = {
|
|
363
|
+
Provider: 'VOICEVOX (Stock Voice Bank)',
|
|
364
|
+
'Voice Bank': speakerLabel,
|
|
365
|
+
'Speaker ID': speakerId,
|
|
366
|
+
'Base URL': baseUrl,
|
|
367
|
+
'Engine Runtime': 'Auto-downloads to ~/.voicevox/engine/ on first npm start (if port free)',
|
|
368
|
+
};
|
|
369
|
+
return {
|
|
370
|
+
config,
|
|
371
|
+
summary,
|
|
372
|
+
};
|
|
373
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|