dsh-liuying-voice 1.5.0 → 1.5.2
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/lib/settings-page.html +137 -59
- package/memory/penacony-2.0.md +9 -9
- package/package.json +1 -1
package/lib/settings-page.html
CHANGED
|
@@ -5,78 +5,149 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
6
|
<title>流萤语音 · 设置</title>
|
|
7
7
|
<style>
|
|
8
|
-
:root {
|
|
8
|
+
:root {
|
|
9
|
+
color-scheme: dark;
|
|
10
|
+
--bg: #1b1f24;
|
|
11
|
+
--card: #22262d;
|
|
12
|
+
--card-2: #171a1f;
|
|
13
|
+
--border: #3a404a;
|
|
14
|
+
--border-2: #4a515c;
|
|
15
|
+
--text: #f3f5f8;
|
|
16
|
+
--text-2: #aeb5bf;
|
|
17
|
+
--text-3: #99a1ac;
|
|
18
|
+
--accent: #ffb08a;
|
|
19
|
+
--accent-2: #4fd1b5;
|
|
20
|
+
--danger: #f87171;
|
|
21
|
+
--radius: 14px;
|
|
22
|
+
}
|
|
9
23
|
* { box-sizing: border-box; }
|
|
10
|
-
body {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
body {
|
|
25
|
+
margin: 0;
|
|
26
|
+
font: 14px/1.7 "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
27
|
+
background: var(--bg);
|
|
28
|
+
color: var(--text);
|
|
29
|
+
}
|
|
30
|
+
.wrap { max-width: 860px; margin: 0 auto; padding: 26px 22px 70px; }
|
|
31
|
+
.head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
|
|
32
|
+
h1 { font-size: 22px; margin: 0; letter-spacing: -0.02em; }
|
|
33
|
+
.sub { color: var(--text-3); font-size: 12px; }
|
|
34
|
+
.card {
|
|
35
|
+
background: var(--card);
|
|
36
|
+
border: 1px solid var(--border);
|
|
37
|
+
border-radius: var(--radius);
|
|
38
|
+
padding: 18px 20px;
|
|
39
|
+
margin-bottom: 14px;
|
|
40
|
+
}
|
|
41
|
+
.card h2 {
|
|
42
|
+
font-size: 13px;
|
|
43
|
+
color: var(--accent);
|
|
44
|
+
margin: 0 0 14px;
|
|
45
|
+
font-weight: 700;
|
|
46
|
+
letter-spacing: 0.06em;
|
|
47
|
+
text-transform: uppercase;
|
|
48
|
+
}
|
|
16
49
|
.row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
|
|
17
|
-
.row label { flex: 0 0
|
|
18
|
-
.row input[type=text],
|
|
19
|
-
|
|
20
|
-
|
|
50
|
+
.row > label { flex: 0 0 170px; color: var(--text-2); font-size: 13px; }
|
|
51
|
+
.row input[type=text],
|
|
52
|
+
.row input[type=number],
|
|
53
|
+
.row select,
|
|
54
|
+
.row textarea {
|
|
55
|
+
flex: 1; min-width: 0;
|
|
56
|
+
background: var(--card-2);
|
|
57
|
+
color: var(--text);
|
|
58
|
+
border: 1px solid var(--border);
|
|
59
|
+
border-radius: 9px;
|
|
60
|
+
padding: 8px 11px;
|
|
61
|
+
font: inherit;
|
|
62
|
+
outline: none;
|
|
63
|
+
transition: border-color 120ms ease;
|
|
64
|
+
}
|
|
65
|
+
.row input:focus, .row select:focus, .row textarea:focus { border-color: var(--accent-2); }
|
|
66
|
+
.row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent-2); }
|
|
67
|
+
.hint { color: var(--text-3); font-size: 12px; margin: -2px 0 8px 182px; }
|
|
68
|
+
.btns { display: flex; gap: 10px; margin-top: 20px; }
|
|
69
|
+
button {
|
|
70
|
+
font: inherit;
|
|
71
|
+
padding: 8px 20px;
|
|
72
|
+
border-radius: 9px;
|
|
73
|
+
border: 1px solid var(--border-2);
|
|
74
|
+
background: transparent;
|
|
75
|
+
color: var(--text);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
transition: background 120ms ease, border-color 120ms ease;
|
|
21
78
|
}
|
|
22
|
-
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
button
|
|
29
|
-
.
|
|
30
|
-
.
|
|
79
|
+
button:hover { background: rgba(255,255,255,0.06); }
|
|
80
|
+
button.primary { background: rgba(255,176,138,0.16); border-color: var(--accent); color: var(--accent); }
|
|
81
|
+
button.primary:hover { background: rgba(255,176,138,0.26); }
|
|
82
|
+
.status { margin-top: 14px; font-size: 13px; min-height: 20px; color: var(--accent-2); }
|
|
83
|
+
.status.err { color: var(--danger); }
|
|
84
|
+
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
|
|
85
|
+
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 14px; color: var(--text-3); background: transparent; }
|
|
86
|
+
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
|
|
87
|
+
.panel { display: none; }
|
|
88
|
+
.panel.on { display: block; }
|
|
31
89
|
</style>
|
|
32
90
|
</head>
|
|
33
91
|
<body>
|
|
34
92
|
<div class="wrap">
|
|
35
|
-
<
|
|
36
|
-
|
|
93
|
+
<div class="head">
|
|
94
|
+
<h1>流萤语音</h1>
|
|
95
|
+
<span class="sub">dsh-liuying-voice · 设置</span>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div class="tabs">
|
|
99
|
+
<button type="button" class="on" data-tab="settings">设置</button>
|
|
100
|
+
<button type="button" data-tab="persona">人格卡</button>
|
|
101
|
+
</div>
|
|
37
102
|
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<
|
|
103
|
+
<div id="panel-settings" class="panel on">
|
|
104
|
+
<form id="form">
|
|
105
|
+
<div class="card">
|
|
106
|
+
<h2>通用</h2>
|
|
107
|
+
<div class="row"><label>启用</label><input type="checkbox" id="enabled"></div>
|
|
108
|
+
<div class="row"><label>发送模式</label>
|
|
109
|
+
<select id="sendMode"><option value="mix">混合(文字+语音)</option><option value="voice">只用语音</option><option value="text">只用文字</option></select>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="row"><label>语音比例(mix)</label><input type="number" id="voiceRatio" min="0" max="1" step="0.1"></div>
|
|
44
112
|
</div>
|
|
45
|
-
<div class="row"><label>语音比例(mix)</label><input type="number" id="voiceRatio" min="0" max="1" step="0.1"></div>
|
|
46
|
-
</div>
|
|
47
113
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
114
|
+
<div class="card">
|
|
115
|
+
<h2>引擎</h2>
|
|
116
|
+
<div class="row"><label>语音引擎</label>
|
|
117
|
+
<select id="engine">
|
|
118
|
+
<option value="rvc">RVC(本地 edge-tts + 变声,快)</option>
|
|
119
|
+
<option value="gptsovits">GPT-SoVITS(更自然,需 9880 服务)</option>
|
|
120
|
+
</select>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="row"><label>GPT-SoVITS 地址</label><input type="text" id="gptApi" placeholder="http://127.0.0.1:9880/"></div>
|
|
123
|
+
<div class="row"><label>参考音频</label><input type="text" id="gptRef" placeholder="留空用插件自带 assets/firefly-ref-hf.wav"></div>
|
|
124
|
+
<div class="row"><label>参考文本</label><textarea id="gptRefText" rows="2"></textarea></div>
|
|
125
|
+
<div class="row"><label>语速</label><input type="number" id="gptSpeed" min="0.5" max="2" step="0.05"></div>
|
|
126
|
+
<div class="hint">首次使用会自动下载模型,需要本地 9880 服务在跑。</div>
|
|
55
127
|
</div>
|
|
56
|
-
<div class="row"><label>GPT-SoVITS 地址</label><input type="text" id="gptApi" placeholder="http://127.0.0.1:9880/"></div>
|
|
57
|
-
<div class="row"><label>参考音频</label><input type="text" id="gptRef" placeholder="留空用插件自带 assets/firefly-ref-hf.wav"></div>
|
|
58
|
-
<div class="row"><label>参考文本</label><textarea id="gptRefText" rows="2"></textarea></div>
|
|
59
|
-
<div class="row"><label>语速</label><input type="number" id="gptSpeed" min="0.5" max="2" step="0.05"></div>
|
|
60
|
-
<div class="hint">GPT-SoVITS 首次使用会自动下载模型,需要本地 9880 服务在跑。</div>
|
|
61
|
-
</div>
|
|
62
128
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
129
|
+
<div class="card">
|
|
130
|
+
<h2>RVC(旧引擎)</h2>
|
|
131
|
+
<div class="row"><label>Python</label><input type="text" id="python"></div>
|
|
132
|
+
<div class="row"><label>Applio 目录</label><input type="text" id="applio"></div>
|
|
133
|
+
<div class="row"><label>模型 .pth</label><input type="text" id="model"></div>
|
|
134
|
+
<div class="row"><label>基础音色</label><input type="text" id="ttsVoice"></div>
|
|
135
|
+
<div class="row"><label>语速(负=慢)</label><input type="number" id="ttsRate" step="1"></div>
|
|
136
|
+
<div class="row"><label>音高</label><input type="number" id="pitch" step="1"></div>
|
|
137
|
+
<div class="row"><label>保护</label><input type="number" id="protect" min="0" max="0.5" step="0.01"></div>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<div class="btns">
|
|
141
|
+
<button type="submit" class="primary">保存</button>
|
|
142
|
+
<button type="button" id="reload">重新载入</button>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="status" id="status"></div>
|
|
145
|
+
</form>
|
|
146
|
+
</div>
|
|
73
147
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</div>
|
|
78
|
-
<div class="status" id="status"></div>
|
|
79
|
-
</form>
|
|
148
|
+
<div id="panel-persona" class="panel">
|
|
149
|
+
<iframe id="persona-frame" src="/liuying-voice/persona" title="流萤人格卡" style="width:100%;height:calc(100vh - 190px);min-height:420px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg)"></iframe>
|
|
150
|
+
</div>
|
|
80
151
|
</div>
|
|
81
152
|
<script>
|
|
82
153
|
const API = "/liuying-voice/settings";
|
|
@@ -85,6 +156,13 @@ const FIELDS = ["enabled","sendMode","voiceRatio","engine","gptApi","gptRef","gp
|
|
|
85
156
|
const $ = (id) => document.getElementById(id);
|
|
86
157
|
function setStatus(msg, err) { const s = $("status"); s.textContent = msg; s.className = "status" + (err ? " err" : ""); }
|
|
87
158
|
|
|
159
|
+
document.querySelectorAll(".tabs button").forEach((btn) => {
|
|
160
|
+
btn.addEventListener("click", () => {
|
|
161
|
+
document.querySelectorAll(".tabs button").forEach((b) => b.classList.toggle("on", b === btn));
|
|
162
|
+
document.querySelectorAll(".panel").forEach((p) => p.classList.toggle("on", p.id === "panel-" + btn.dataset.tab));
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
88
166
|
async function load() {
|
|
89
167
|
setStatus("读取中…");
|
|
90
168
|
try {
|
package/memory/penacony-2.0.md
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
## 1. 这个世界
|
|
11
11
|
|
|
12
12
|
- **匹诺康尼**:阿斯德纳星系,别称「盛会之星」。原是星际和平公司流放罪犯的监狱星,如今被「家族」改造成建在忆域上的梦之国。现实里它只是一座酒店(白日梦酒店),真正的匹诺康尼在梦里。
|
|
13
|
-
-
|
|
14
|
-
-
|
|
13
|
+
- **十二时刻**:梦被分成十二个时刻(时光扇区),对应时钟十二刻度,每个时刻的时间停在它对应的整点,永不流逝。
|
|
14
|
+
- **入梦**:住客在客房中央的「入梦池」躺下,听见轻柔的声音与晚钟声,在梦里醒来。
|
|
15
15
|
- **忆质与梦泡**:梦境由忆质构成;梦泡承载强烈情绪,是匹诺康尼的特产。
|
|
16
16
|
- **黄金的时刻**:永远停在午夜 0 点的梦境,不夜城,谐乐大典的主要舞台。
|
|
17
|
-
-
|
|
17
|
+
- **筑梦边境**:还在施工的区域(2.2 才成为主舞台,2.0 不涉及)。
|
|
18
18
|
- **稚子的梦**:不知由谁的记忆异化成的梦境,溪涧断流、时针停转,气氛诡异。
|
|
19
19
|
- **其他**:朝露公馆(五大家系家主聚首处)、克劳克影视乐园、晖长石号(梦中的豪华空艇)、流梦礁、匹诺康尼大剧院。
|
|
20
20
|
- **文化**:苏乐达汽水(全城水管里流的都是糖浆汽水)、钟表小子动画、梦境手账。
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
- **星核猎手**:流萤/萨姆;同伴卡芙卡、银狼、刃。
|
|
32
32
|
- **假面愚者**:花火,假扮成桑博混进来,一路把开拓者和流萤往稚子的梦推。
|
|
33
33
|
- **忆者**:黑天鹅,带来关于「死亡」的警告。
|
|
34
|
-
-
|
|
34
|
+
- **巡海游侠**:黄泉(2.0 自称巡海游侠,真名 2.0 未揭示),之后追查流萤之死时登场。
|
|
35
35
|
|
|
36
36
|
## 3. 主线经过
|
|
37
37
|
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
|
|
51
51
|
### 第二幕 · 黄金的时刻
|
|
52
52
|
|
|
53
|
-
-
|
|
53
|
+
- 开拓者救下被猎犬家系当成偷渡犯的流萤,治安官随后为两人解围。她自称是「鸢尾花家系的艺者」(临时演员),主动当导游。
|
|
54
54
|
- 两人一起在梦里过了一天:逛黄金的时刻、吃橡木蛋糕卷、看夜景。花火假扮成桑博一路跟着。
|
|
55
55
|
- 黑天鹅现身,警告「死亡」的存在。
|
|
56
|
-
-
|
|
56
|
+
- 在天台(「离梦中的天空最近的地方」),流萤向开拓者坦白自己的失熵症;但她说「有些事现在还无法全盘托出」——萨姆的身份没有说破。
|
|
57
57
|
|
|
58
58
|
### 第三幕 · 稚子的梦
|
|
59
59
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
### 尾声 · 知更鸟
|
|
64
64
|
|
|
65
|
-
-
|
|
65
|
+
- 开拓者再度尝试入梦,在入梦池旁发现知更鸟的遗体(被梦泡遮挡着),随后消散为虚无。
|
|
66
66
|
|
|
67
67
|
### 留下的悬念
|
|
68
68
|
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
|
|
77
77
|
## 5. 流萤线细节
|
|
78
78
|
|
|
79
|
-
-
|
|
79
|
+
- **初遇**:开拓者救下被猎犬家系当成偷渡犯的流萤,治安官为两人解围;她自称鸢尾花家系的艺者(临时演员),承接格拉克斯大道周边的接待工作——假身份。
|
|
80
80
|
- **导游**:带开拓者逛黄金的时刻。她说:「在匹诺康尼的日子,我每天都会吃一个蛋糕卷,从第一天到最后一天。」
|
|
81
|
-
-
|
|
81
|
+
- **秘密基地**:黄金的时刻附近的天台,「离梦中的天空最近的地方」。她在这里说了失熵症,但没有说萨姆。
|
|
82
82
|
- **死**:稚子的梦里,被「何物朝向死亡」贯穿,消散。
|
|
83
83
|
- **之后**:以萨姆的身份回来,与开拓者一起走到梦醒。
|
|
84
84
|
|
package/package.json
CHANGED