@vxnus/siduri 0.1.7 → 0.1.8

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 (98) hide show
  1. package/package.json +1 -1
  2. package/dist/builtin-manifests.d.ts +0 -2
  3. package/dist/builtin-manifests.js +0 -464
  4. package/dist/clean-machine-e2e.test.d.ts +0 -1
  5. package/dist/clean-machine-e2e.test.js +0 -230
  6. package/dist/configurators/behavior.d.ts +0 -2
  7. package/dist/configurators/behavior.js +0 -36
  8. package/dist/configurators/body.d.ts +0 -2
  9. package/dist/configurators/body.js +0 -60
  10. package/dist/configurators/brain.d.ts +0 -6
  11. package/dist/configurators/brain.js +0 -80
  12. package/dist/configurators/ear.d.ts +0 -2
  13. package/dist/configurators/ear.js +0 -28
  14. package/dist/configurators/hands.d.ts +0 -2
  15. package/dist/configurators/hands.js +0 -27
  16. package/dist/configurators/index.d.ts +0 -23
  17. package/dist/configurators/index.js +0 -74
  18. package/dist/configurators/knowledge.d.ts +0 -6
  19. package/dist/configurators/knowledge.js +0 -100
  20. package/dist/configurators/memory.d.ts +0 -2
  21. package/dist/configurators/memory.js +0 -44
  22. package/dist/configurators/observation.d.ts +0 -2
  23. package/dist/configurators/observation.js +0 -12
  24. package/dist/configurators/types.d.ts +0 -12
  25. package/dist/configurators/types.js +0 -2
  26. package/dist/configurators/vision.d.ts +0 -2
  27. package/dist/configurators/vision.js +0 -39
  28. package/dist/configurators/voice.d.ts +0 -2
  29. package/dist/configurators/voice.js +0 -363
  30. package/dist/configurators.test.d.ts +0 -1
  31. package/dist/configurators.test.js +0 -299
  32. package/dist/db.d.ts +0 -25
  33. package/dist/db.js +0 -152
  34. package/dist/discovery.d.ts +0 -13
  35. package/dist/discovery.js +0 -87
  36. package/dist/discovery.test.d.ts +0 -1
  37. package/dist/discovery.test.js +0 -67
  38. package/dist/doctor-db.test.d.ts +0 -1
  39. package/dist/doctor-db.test.js +0 -141
  40. package/dist/doctor.d.ts +0 -19
  41. package/dist/doctor.js +0 -225
  42. package/dist/generator.d.ts +0 -21
  43. package/dist/generator.js +0 -542
  44. package/dist/generator.test.d.ts +0 -1
  45. package/dist/generator.test.js +0 -197
  46. package/dist/index.d.ts +0 -20
  47. package/dist/index.js +0 -401
  48. package/dist/manifest.d.ts +0 -33
  49. package/dist/manifest.js +0 -40
  50. package/dist/providers/knowledge-hub.d.ts +0 -37
  51. package/dist/providers/knowledge-hub.js +0 -141
  52. package/dist/providers/openrouter.d.ts +0 -32
  53. package/dist/providers/openrouter.js +0 -201
  54. package/dist/release-check.d.ts +0 -9
  55. package/dist/release-check.js +0 -131
  56. package/dist/runtime-parity.test.d.ts +0 -1
  57. package/dist/runtime-parity.test.js +0 -140
  58. package/dist/web-dist/404/index.html +0 -1
  59. package/dist/web-dist/404.html +0 -1
  60. package/dist/web-dist/__next.__PAGE__.txt +0 -34
  61. package/dist/web-dist/__next._full.txt +0 -31
  62. package/dist/web-dist/__next._tree.txt +0 -3
  63. package/dist/web-dist/_next/static/chunks/0bncolc2nuzmo.css +0 -1
  64. package/dist/web-dist/_next/static/chunks/0cz1d0mv5g_q7.js +0 -1
  65. package/dist/web-dist/_next/static/chunks/0uwih7sydv413.js +0 -1
  66. package/dist/web-dist/_next/static/chunks/0xe6aaej0xsj8.js +0 -30
  67. package/dist/web-dist/_next/static/chunks/10rmct1ax-opq.js +0 -1
  68. package/dist/web-dist/_next/static/chunks/1_yae15ffa5f6.js +0 -1
  69. package/dist/web-dist/_next/static/chunks/2kcqevsmv6kh2.js +0 -31
  70. package/dist/web-dist/_next/static/chunks/2s3d1bfr0l4b0.js +0 -1
  71. package/dist/web-dist/_next/static/chunks/32z87id9k6i2z.js +0 -22
  72. package/dist/web-dist/_next/static/chunks/3bx2gs3idjmo1.js +0 -1
  73. package/dist/web-dist/_next/static/chunks/turbopack-3eipe4c-imn5l.js +0 -1
  74. package/dist/web-dist/_next/static/media/favicon.2vob68tjqpejf.ico +0 -0
  75. package/dist/web-dist/_next/static/uvsK8ULhL7fHQMR8sr_JL/_buildManifest.js +0 -11
  76. package/dist/web-dist/_next/static/uvsK8ULhL7fHQMR8sr_JL/_clientMiddlewareManifest.js +0 -1
  77. package/dist/web-dist/_next/static/uvsK8ULhL7fHQMR8sr_JL/_ssgManifest.js +0 -1
  78. package/dist/web-dist/_not-found/__next._full.txt +0 -17
  79. package/dist/web-dist/_not-found/__next._not-found.__PAGE__.txt +0 -23
  80. package/dist/web-dist/_not-found/__next._tree.txt +0 -3
  81. package/dist/web-dist/_not-found/index.html +0 -1
  82. package/dist/web-dist/_not-found/index.txt +0 -17
  83. package/dist/web-dist/chat/__next._full.txt +0 -18
  84. package/dist/web-dist/chat/__next._tree.txt +0 -3
  85. package/dist/web-dist/chat/__next.chat.__PAGE__.txt +0 -24
  86. package/dist/web-dist/chat/index.html +0 -1
  87. package/dist/web-dist/chat/index.txt +0 -18
  88. package/dist/web-dist/favicon.ico +0 -0
  89. package/dist/web-dist/index.html +0 -1
  90. package/dist/web-dist/index.txt +0 -31
  91. package/dist/web-dist/live2d/live2dcubismcore.min.js +0 -9
  92. package/dist/web-dist/operator/__next._full.txt +0 -18
  93. package/dist/web-dist/operator/__next._tree.txt +0 -3
  94. package/dist/web-dist/operator/__next.operator.__PAGE__.txt +0 -24
  95. package/dist/web-dist/operator/index.html +0 -1
  96. package/dist/web-dist/operator/index.txt +0 -18
  97. package/dist/web-template.d.ts +0 -2
  98. package/dist/web-template.js +0 -556
@@ -1,100 +0,0 @@
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.configureKnowledge = configureKnowledge;
7
- const inquirer_1 = __importDefault(require("inquirer"));
8
- const knowledge_hub_1 = require("../providers/knowledge-hub");
9
- async function configureKnowledge(_context, options = {}) {
10
- const client = options.client || new knowledge_hub_1.KnowledgeHubClient();
11
- const { source } = await inquirer_1.default.prompt({
12
- type: 'list',
13
- name: 'source',
14
- message: 'Knowledge source?',
15
- choices: [
16
- { name: 'E Knowledge Hub (Search and attach remote factual pack)', value: 'e-hub' },
17
- { name: 'Do not use knowledge', value: 'none' },
18
- ],
19
- });
20
- if (source === 'none') {
21
- return {
22
- config: {
23
- provider: 'none',
24
- },
25
- summary: {
26
- Source: 'Do not use knowledge',
27
- },
28
- };
29
- }
30
- // E Knowledge Hub flow
31
- while (true) {
32
- const { packId } = await inquirer_1.default.prompt({
33
- type: 'input',
34
- name: 'packId',
35
- message: 'Search E Knowledge Hub or enter package ID:',
36
- default: '@vxnus/e-teyvat',
37
- validate: (val) => val.trim().length > 0 || 'Please enter a package ID.',
38
- });
39
- const trimmedPackId = packId.trim();
40
- let manifest;
41
- try {
42
- process.stdout.write('\u001b[2mSearching E Knowledge Hub...\u001b[0m');
43
- manifest = await client.resolveProvider(trimmedPackId);
44
- process.stdout.write('\r\u001b[32m✓\u001b[0m Checking provider manifest\n');
45
- }
46
- catch (err) {
47
- process.stdout.write('\r\u001b[33m!\u001b[0m Provider resolution failed\n');
48
- console.log(`\u001b[33mReason:\u001b[0m ${err.message}\n`);
49
- const { failureAction } = await inquirer_1.default.prompt({
50
- type: 'list',
51
- name: 'failureAction',
52
- message: 'What would you like to do?',
53
- choices: [
54
- { name: 'Try again / Search another provider', value: 'retry' },
55
- { name: 'Do not use knowledge', value: 'skip' },
56
- { name: 'Cancel', value: 'cancel' },
57
- ],
58
- });
59
- if (failureAction === 'retry') {
60
- continue;
61
- }
62
- if (failureAction === 'skip') {
63
- return {
64
- config: { provider: 'none' },
65
- summary: { Source: 'Do not use knowledge' },
66
- };
67
- }
68
- throw new Error('Knowledge configuration cancelled.');
69
- }
70
- // Display provider summary
71
- (0, knowledge_hub_1.displayKnowledgeProviderSummary)(manifest, trimmedPackId);
72
- const { confirmProvider } = await inquirer_1.default.prompt({
73
- type: 'list',
74
- name: 'confirmProvider',
75
- message: 'Use this knowledge provider?',
76
- choices: [
77
- { name: 'Yes, use this provider', value: 'yes' },
78
- { name: 'Choose another provider', value: 'retry' },
79
- ],
80
- });
81
- if (confirmProvider === 'yes') {
82
- return {
83
- config: {
84
- provider: 'e-hub',
85
- registryUrl: 'https://e.vxnus.xyz/api/v1/knowledge',
86
- packId: trimmedPackId,
87
- },
88
- summary: {
89
- Source: 'E Knowledge Hub',
90
- Provider: manifest.displayName || manifest.name,
91
- Package: trimmedPackId,
92
- Version: manifest.version,
93
- },
94
- metadata: {
95
- manifest,
96
- },
97
- };
98
- }
99
- }
100
- }
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureMemory(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,44 +0,0 @@
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.configureMemory = configureMemory;
7
- const inquirer_1 = __importDefault(require("inquirer"));
8
- async function configureMemory(_context) {
9
- const { database } = await inquirer_1.default.prompt({
10
- type: 'list',
11
- name: 'database',
12
- message: 'Memory database?',
13
- choices: [
14
- { name: 'PostgreSQL (FTS relational claims with ACID durability)', value: 'postgres' },
15
- ],
16
- });
17
- const { deployment } = await inquirer_1.default.prompt({
18
- type: 'list',
19
- name: 'deployment',
20
- message: 'PostgreSQL deployment target?',
21
- choices: [
22
- { name: 'Supabase (Hosted Postgres with connection pooling)', value: 'supabase' },
23
- { name: 'Neon (Serverless Postgres with branch-per-companion)', value: 'neon' },
24
- { name: 'Local PostgreSQL (Docker or system service)', value: 'local' },
25
- { name: 'Other PostgreSQL URL', value: 'other' },
26
- ],
27
- });
28
- const deploymentDisplayNames = {
29
- supabase: 'Supabase',
30
- neon: 'Neon',
31
- local: 'Local PostgreSQL',
32
- other: 'Other PostgreSQL',
33
- };
34
- return {
35
- config: {
36
- provider: database,
37
- deployment,
38
- },
39
- summary: {
40
- Database: 'PostgreSQL',
41
- Deploy: deploymentDisplayNames[deployment] || deployment,
42
- },
43
- };
44
- }
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureObservation(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configureObservation = configureObservation;
4
- async function configureObservation(_context) {
5
- return {
6
- config: {},
7
- summary: {
8
- Provider: 'Grounded Observation Ingest',
9
- Deduplication: 'Cryptographic SHA-256 Hashing',
10
- },
11
- };
12
- }
@@ -1,12 +0,0 @@
1
- import { OrganManifest } from '../manifest';
2
- export interface OrganConfigurationResult {
3
- config: Record<string, unknown>;
4
- summary?: Record<string, unknown>;
5
- metadata?: Record<string, unknown>;
6
- }
7
- export interface OrganConfiguratorContext {
8
- companionName: string;
9
- manifest: OrganManifest;
10
- existingConfig?: Record<string, unknown>;
11
- }
12
- export type OrganConfigurator = (context: OrganConfiguratorContext) => Promise<OrganConfigurationResult>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureVision(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,39 +0,0 @@
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.configureVision = configureVision;
7
- const inquirer_1 = __importDefault(require("inquirer"));
8
- async function configureVision(_context) {
9
- const { model } = await inquirer_1.default.prompt({
10
- type: 'list',
11
- name: 'model',
12
- message: 'Vision model:',
13
- choices: [
14
- { name: 'GPT-4 Vision / GPT-4o (Multimodal OCR & Object Inspection)', value: 'gpt-4-vision' },
15
- { name: 'Claude 3.5 Sonnet Vision', value: 'anthropic/claude-3.5-sonnet' },
16
- { name: 'Custom Vision Model', value: 'custom' },
17
- ],
18
- });
19
- let selectedModel = model;
20
- if (model === 'custom') {
21
- const { customModel } = await inquirer_1.default.prompt({
22
- type: 'input',
23
- name: 'customModel',
24
- message: 'Vision Model ID:',
25
- default: 'gpt-4-vision',
26
- });
27
- selectedModel = customModel.trim();
28
- }
29
- return {
30
- config: {
31
- provider: 'openrouter',
32
- model: selectedModel,
33
- },
34
- summary: {
35
- Provider: 'OpenRouter Vision',
36
- Model: selectedModel,
37
- },
38
- };
39
- }
@@ -1,2 +0,0 @@
1
- import { OrganConfiguratorContext, OrganConfigurationResult } from './types';
2
- export declare function configureVoice(_context: OrganConfiguratorContext): Promise<OrganConfigurationResult>;
@@ -1,363 +0,0 @@
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
- async function configureVoice(_context) {
9
- const companionSlug = _context.companionName.toLowerCase().replace(/[^a-z0-9_-]/g, '') || 'default';
10
- const { provider } = await inquirer_1.default.prompt({
11
- type: 'list',
12
- name: 'provider',
13
- message: 'Voice provider?',
14
- choices: [
15
- {
16
- name: 'RVC (Custom user-owned voice model via .pth / .index weights)',
17
- value: 'rvc',
18
- },
19
- {
20
- name: 'VOICEVOX (Standard VOICEVOX stock character voice banks)',
21
- value: 'voicevox',
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
- const rvcAnswers = await inquirer_1.default.prompt([
37
- {
38
- type: 'input',
39
- name: 'modelPath',
40
- message: 'RVC Model Path (.pth weights):',
41
- default: `./assets/voice/${companionSlug}/${companionSlug}.pth`,
42
- },
43
- {
44
- type: 'input',
45
- name: 'indexPath',
46
- message: 'RVC Feature Index Path (.index, optional):',
47
- default: `./assets/voice/${companionSlug}/${companionSlug}.index`,
48
- },
49
- {
50
- type: 'input',
51
- name: 'pitchShift',
52
- message: 'Pitch Shift (semitones, e.g. 0 for neutral, 12 for male-to-female, -12 for female-to-male):',
53
- default: '0',
54
- validate: (v) => !isNaN(parseInt(v, 10)) || 'Pitch shift must be an integer.',
55
- },
56
- {
57
- type: 'list',
58
- name: 'f0Method',
59
- message: 'Pitch Extraction Algorithm (F0 Method):',
60
- choices: ['rmvpe', 'pm', 'harvest', 'crepe'],
61
- default: 'rmvpe',
62
- },
63
- {
64
- type: 'list',
65
- name: 'baseTts',
66
- message: 'Base TTS Engine for RVC (Generates initial audio):',
67
- choices: [
68
- { name: 'Edge-TTS (Cloud API, 0MB)', value: 'edge-tts' },
69
- { name: 'Kokoro TTS (Local, ~80MB)', value: 'kokoro' },
70
- { name: 'Piper TTS (Local, ~20MB)', value: 'piper' },
71
- ],
72
- default: 'edge-tts',
73
- },
74
- {
75
- type: 'input',
76
- name: 'serviceUrl',
77
- message: 'RVC Headless Service URL:',
78
- default: 'http://localhost:50055',
79
- },
80
- ]);
81
- const pitchShift = parseInt(rvcAnswers.pitchShift, 10) || 0;
82
- const config = {
83
- provider: rvcAnswers.baseTts,
84
- maxQueueDepth: 50,
85
- rvc: {
86
- enabled: true,
87
- serviceUrl: rvcAnswers.serviceUrl.trim(),
88
- modelName: companionSlug,
89
- modelPath: rvcAnswers.modelPath.trim(),
90
- indexPath: rvcAnswers.indexPath.trim() || undefined,
91
- pitchShift,
92
- f0Method: rvcAnswers.f0Method,
93
- indexRate: 0.75,
94
- },
95
- };
96
- const summary = {
97
- Provider: 'RVC (Custom Voice Model)',
98
- 'Base TTS': rvcAnswers.baseTts,
99
- 'Model Path': rvcAnswers.modelPath.trim(),
100
- 'Pitch Shift': pitchShift,
101
- 'F0 Method': rvcAnswers.f0Method,
102
- 'RVC Service': rvcAnswers.serviceUrl.trim(),
103
- };
104
- return {
105
- config,
106
- summary,
107
- };
108
- }
109
- const DEFAULT_VOICEVOX_SPEAKERS = [
110
- {
111
- name: '四国めたん (Shikoku Metan)',
112
- speaker_uuid: '7ffcb7ce-00ec-4bdc-82cd-45a8889e43ff',
113
- styles: [
114
- { id: 2, name: 'ノーマル (Normal)' },
115
- { id: 0, name: 'あまあま (Sweet)' },
116
- { id: 4, name: 'ツンツン (Tsundere)' },
117
- { id: 6, name: 'セクシー (Sexy)' },
118
- { id: 36, name: 'ささやき (Whisper)' },
119
- { id: 37, name: 'ヒソヒソ (Hisoniso)' },
120
- ],
121
- },
122
- {
123
- name: 'ずんだもん (Zundamon)',
124
- speaker_uuid: '388f24ea-105d-4354-b46e-22d7d7ff4479',
125
- styles: [
126
- { id: 3, name: 'ノーマル (Normal)' },
127
- { id: 1, name: 'あまあま (Sweet)' },
128
- { id: 5, name: 'ツンツン (Tsundere)' },
129
- { id: 7, name: 'セクシー (Sexy)' },
130
- { id: 22, name: 'ささやき (Whisper)' },
131
- { id: 38, name: 'ヒソヒソ (Hisoniso)' },
132
- { id: 75, name: 'ヘロヘロ (Herohero)' },
133
- { id: 76, name: 'なみだめ (Namidame)' },
134
- ],
135
- },
136
- {
137
- name: '春日部つむぎ (Kasukabe Tsumugi)',
138
- speaker_uuid: '35b2c544-660e-401e-b033-0ab4756917cd',
139
- styles: [{ id: 8, name: 'ノーマル (Normal)' }],
140
- },
141
- {
142
- name: '雨晴はう (Rainy Hau)',
143
- speaker_uuid: '3474ee95-c274-47f9-aa1a-8322163d77f1',
144
- styles: [{ id: 10, name: 'ノーマル (Normal)' }],
145
- },
146
- {
147
- name: '波音リツ (Namine Ritsu)',
148
- speaker_uuid: 'b1a81618-b27b-40d2-b0ea-27a9ad408c4b',
149
- styles: [{ id: 9, name: 'ノーマル (Normal)' }],
150
- },
151
- {
152
- name: '玄野武宏 (Kurono Takehiro)',
153
- speaker_uuid: 'c30dc15a-0992-4f8d-8bb8-ad3b76579016',
154
- styles: [
155
- { id: 11, name: 'ノーマル (Normal)' },
156
- { id: 39, name: '喜び (Joy)' },
157
- { id: 40, name: 'ツンツン (Tsundere)' },
158
- { id: 41, name: '悲しみ (Sadness)' },
159
- ],
160
- },
161
- {
162
- name: '白上虎太郎 (Shirakami Kotaro)',
163
- speaker_uuid: 'e50289b4-43ff-49e6-9b58-d894c23fb4ac',
164
- styles: [
165
- { id: 12, name: 'ふつう (Normal)' },
166
- { id: 32, name: 'わーい (Yay)' },
167
- { id: 33, name: 'びくびく (Timid)' },
168
- { id: 34, name: 'おこ (Angry)' },
169
- { id: 35, name: 'びえーん (Crying)' },
170
- ],
171
- },
172
- {
173
- name: '青山龍星 (Aoyama Ryusei)',
174
- speaker_uuid: '4f51116a-d9ee-4516-925d-02f183e2af8d',
175
- styles: [
176
- { id: 13, name: 'ノーマル (Normal)' },
177
- { id: 81, name: '熱血 (Passionate)' },
178
- { id: 82, name: '不気味 (Eerie)' },
179
- { id: 83, name: '囁き (Whisper)' },
180
- ],
181
- },
182
- {
183
- name: '冥鳴ひまり (Meimei Himari)',
184
- speaker_uuid: '8ea4fcd4-a013-4095-abb3-11b5bf837d37',
185
- styles: [{ id: 14, name: 'ノーマル (Normal)' }],
186
- },
187
- {
188
- name: '九州そら (Kyushu Sora)',
189
- speaker_uuid: '481fb609-6446-4870-9f46-90c4dd623403',
190
- styles: [
191
- { id: 16, name: 'ノーマル (Normal)' },
192
- { id: 15, name: 'あまあま (Sweet)' },
193
- { id: 17, name: 'ツンツン (Tsundere)' },
194
- { id: 18, name: 'セクシー (Sexy)' },
195
- { id: 19, name: 'ささやき (Whisper)' },
196
- ],
197
- },
198
- {
199
- name: 'モチノ・キョウコ (Mochino Kyoko)',
200
- speaker_uuid: 'a402a5d2-085e-4b44-a034-7164ff24a3cf',
201
- styles: [
202
- { id: 20, name: 'ノーマル (Normal)' },
203
- { id: 60, name: 'セクシー/タレント (Sexy)' },
204
- { id: 61, name: '泣き (Crying)' },
205
- ],
206
- },
207
- {
208
- name: '剣崎雌雄 (Kenzaki Mesuo)',
209
- speaker_uuid: '1a1756a4-263d-42ea-86a2-96f107f474e9',
210
- styles: [{ id: 21, name: 'ノーマル (Normal)' }],
211
- },
212
- {
213
- name: '後鬼 (Goki)',
214
- speaker_uuid: '80991a54-61c4-4b5f-8700-11234c062085',
215
- styles: [
216
- { id: 27, name: '人間ver. (Human)' },
217
- { id: 28, name: '鬼ver. (Oni)' },
218
- ],
219
- },
220
- {
221
- name: 'No.7 (Seven)',
222
- speaker_uuid: 'c86c757c-cb24-4ea0-b6f7-33c872ff72e2',
223
- styles: [
224
- { id: 29, name: 'ノーマル (Normal)' },
225
- { id: 30, name: 'アナウンス (Announce)' },
226
- { id: 31, name: '読み聞かせ (Storytelling)' },
227
- ],
228
- },
229
- {
230
- name: 'ちび式じい (Chibishiki Jii)',
231
- speaker_uuid: '1e19d52b-426b-4e12-b250-bfbe55c0c9cb',
232
- styles: [{ id: 42, name: 'ノーマル (Normal)' }],
233
- },
234
- {
235
- name: '櫻歌ミコ (Ouka Miko)',
236
- speaker_uuid: '06155980-bfab-443b-a9b8-3e4b786c7ccb',
237
- styles: [
238
- { id: 43, name: 'ノーマル (Normal)' },
239
- { id: 44, name: '第二形態 (2nd Form)' },
240
- { id: 45, name: 'ロリ (Loli)' },
241
- ],
242
- },
243
- {
244
- name: '小夜/SAYO',
245
- speaker_uuid: 'a8fb71e1-8738-4e16-b541-002f23ea3e45',
246
- styles: [{ id: 46, name: 'ノーマル (Normal)' }],
247
- },
248
- {
249
- name: 'ナースロボ_タイプT (Nurse Robot Type T)',
250
- speaker_uuid: '882a636f-3bac-431a-966d-c5e6bba9f949',
251
- styles: [
252
- { id: 47, name: 'ノーマル (Normal)' },
253
- { id: 48, name: '楽々 (Relaxed)' },
254
- { id: 49, name: '恐怖 (Fear)' },
255
- { id: 50, name: '内緒話 (Secret Talk)' },
256
- ],
257
- },
258
- {
259
- name: '猫使アル (Nekotsuka Aru)',
260
- speaker_uuid: '7253579b-240e-4328-b0a6-574ab57597ea',
261
- styles: [
262
- { id: 55, name: 'ノーマル (Normal)' },
263
- { id: 56, name: 'おちつき (Calm)' },
264
- { id: 57, name: 'うきうき (Excited)' },
265
- ],
266
- },
267
- {
268
- name: '猫使ビィ (Nekotsuka Bi)',
269
- speaker_uuid: 'cf6204c3-6316-43b9-a095-2eb49e29a914',
270
- styles: [
271
- { id: 58, name: 'ノーマル (Normal)' },
272
- { id: 59, name: 'おちつき (Calm)' },
273
- { id: 62, name: '人見知り (Shy)' },
274
- ],
275
- },
276
- ];
277
- async function getVoicevoxSpeakers(baseUrl) {
278
- try {
279
- const controller = new AbortController();
280
- const timeout = setTimeout(() => controller.abort(), 2000);
281
- const res = await fetch(new URL('/speakers', baseUrl).toString(), {
282
- signal: controller.signal,
283
- });
284
- clearTimeout(timeout);
285
- if (res.ok) {
286
- const data = (await res.json());
287
- if (Array.isArray(data) && data.length > 0) {
288
- return data;
289
- }
290
- }
291
- }
292
- catch (_e) {
293
- // If local instance is unreachable, fallback to the pre-populated list
294
- }
295
- return DEFAULT_VOICEVOX_SPEAKERS;
296
- }
297
- function buildSpeakerChoices(speakers) {
298
- const choices = [];
299
- for (const speaker of speakers) {
300
- for (const style of speaker.styles) {
301
- const label = `${speaker.name} - ${style.name} (ID: ${style.id})`;
302
- choices.push({
303
- name: label,
304
- value: { id: style.id, label },
305
- });
306
- }
307
- }
308
- return choices;
309
- }
310
- // provider === 'voicevox'
311
- const urlAnswer = await inquirer_1.default.prompt([
312
- {
313
- type: 'input',
314
- name: 'baseUrl',
315
- message: 'VOICEVOX Engine Base URL:',
316
- default: 'http://localhost:50021',
317
- },
318
- ]);
319
- const baseUrl = urlAnswer.baseUrl.trim() || 'http://localhost:50021';
320
- const speakers = await getVoicevoxSpeakers(baseUrl);
321
- const speakerChoices = buildSpeakerChoices(speakers);
322
- const speakerAnswer = await inquirer_1.default.prompt([
323
- {
324
- type: 'list',
325
- name: 'speaker',
326
- message: 'Select VOICEVOX Character Voice Bank & Style:',
327
- choices: speakerChoices,
328
- pageSize: 15,
329
- },
330
- ]);
331
- let speakerId = 1;
332
- let speakerLabel = '四国めたん (Shikoku Metan) - ノーマル (Normal) (ID: 2)';
333
- if (speakerAnswer && speakerAnswer.speaker) {
334
- if (typeof speakerAnswer.speaker === 'object' && 'id' in speakerAnswer.speaker) {
335
- speakerId = speakerAnswer.speaker.id;
336
- speakerLabel = speakerAnswer.speaker.label;
337
- }
338
- else if (typeof speakerAnswer.speaker === 'number') {
339
- speakerId = speakerAnswer.speaker;
340
- speakerLabel = `Speaker ID: ${speakerId}`;
341
- }
342
- else if (typeof speakerAnswer.speaker === 'string') {
343
- speakerId = parseInt(speakerAnswer.speaker, 10) || 1;
344
- speakerLabel = `Speaker ID: ${speakerId}`;
345
- }
346
- }
347
- const config = {
348
- provider: 'voicevox',
349
- baseUrl,
350
- speakerId,
351
- maxQueueDepth: 50,
352
- };
353
- const summary = {
354
- Provider: 'VOICEVOX (Stock Voice Bank)',
355
- 'Voice Bank': speakerLabel,
356
- 'Speaker ID': speakerId,
357
- 'Base URL': baseUrl,
358
- };
359
- return {
360
- config,
361
- summary,
362
- };
363
- }
@@ -1 +0,0 @@
1
- export {};