cortico-world-agent-speed 0.2.0 → 0.2.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.
Files changed (189) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +0 -14
  3. package/README.md +29 -11
  4. package/THIRD_PARTY_NOTICES.md +69 -0
  5. package/activity.d.ts +15 -0
  6. package/activity.js +88 -3
  7. package/describe.json +806 -0
  8. package/dist/webui.css +2 -0
  9. package/dist/webui.css.map +7 -0
  10. package/dist/webui.js +2 -0
  11. package/dist/webui.js.map +7 -0
  12. package/host/app-store.cjs +68 -0
  13. package/host/cursor.cjs +67 -0
  14. package/host/electron-main.cjs +666 -0
  15. package/host/input-shape.cjs +63 -0
  16. package/host/mouse-lease.cjs +77 -0
  17. package/host/overlay.cjs +139 -0
  18. package/host/portrait.cjs +52 -0
  19. package/host/preload.cjs +60 -14
  20. package/host/renderer-gone.cjs +24 -0
  21. package/host/windows.cjs +251 -0
  22. package/package.json +27 -7
  23. package/scripts/build-webui.mjs +40 -0
  24. package/scripts/speech-bank/build.py +166 -0
  25. package/scripts/speech-bank/dicts.py +76 -0
  26. package/src/ENV_PROMPT.en.md +51 -0
  27. package/src/ENV_PROMPT.md +51 -0
  28. package/src/asr/address.ts +25 -0
  29. package/src/asr/hotkey.ts +335 -0
  30. package/src/asr/result.ts +51 -0
  31. package/src/asr/segmenter.ts +269 -0
  32. package/src/asr/sherpa.ts +280 -0
  33. package/src/asr/simplify.ts +38 -0
  34. package/src/asr/system-recognizer.ts +292 -0
  35. package/src/asr/system-sapi.ps1 +173 -0
  36. package/src/asr/transcription-api.ts +176 -0
  37. package/src/chat.ts +212 -0
  38. package/src/config.ts +481 -0
  39. package/src/cua/ENV_PROMPT.en.md +29 -0
  40. package/src/cua/ENV_PROMPT.md +29 -0
  41. package/src/cua/config.ts +88 -0
  42. package/src/cua/cua.ts +712 -0
  43. package/src/cua/engine/darwin.ts +410 -0
  44. package/src/cua/engine/display.ts +55 -0
  45. package/src/cua/engine/fail.ts +15 -0
  46. package/src/cua/engine/foreground.ts +8 -0
  47. package/src/cua/engine/image.ts +57 -0
  48. package/src/cua/engine/keys.ts +70 -0
  49. package/src/cua/engine/linux-keys.ts +29 -0
  50. package/src/cua/engine/linux.ts +343 -0
  51. package/src/cua/engine/mac-keys.ts +57 -0
  52. package/src/cua/engine/user-activity.ts +54 -0
  53. package/src/cua/engine/wait-idle.ts +31 -0
  54. package/src/cua/engine/win32.ts +299 -0
  55. package/src/cua/engine-child.ts +274 -0
  56. package/src/cua/engine-ipc.ts +140 -0
  57. package/src/cua/i18n/de.ts +53 -0
  58. package/src/cua/i18n/en.ts +63 -0
  59. package/src/cua/i18n/es-419.ts +53 -0
  60. package/src/cua/i18n/fr.ts +53 -0
  61. package/src/cua/i18n/index.ts +26 -0
  62. package/src/cua/i18n/it.ts +53 -0
  63. package/src/cua/i18n/ja.ts +53 -0
  64. package/src/cua/i18n/ko.ts +53 -0
  65. package/src/cua/i18n/pt-BR.ts +53 -0
  66. package/src/cua/i18n/ru.ts +59 -0
  67. package/src/cua/i18n/zh-Hant.ts +53 -0
  68. package/src/cua/i18n/zh.ts +59 -0
  69. package/src/cua/model-text.ts +252 -0
  70. package/src/cua/terminal.ts +31 -0
  71. package/src/cua/tools.ts +153 -0
  72. package/src/definition.ts +146 -0
  73. package/src/host-reason.ts +32 -0
  74. package/src/i18n/de.ts +409 -0
  75. package/src/i18n/en.ts +443 -0
  76. package/src/i18n/es-419.ts +409 -0
  77. package/src/i18n/fr.ts +409 -0
  78. package/src/i18n/index.ts +56 -0
  79. package/src/i18n/it.ts +409 -0
  80. package/src/i18n/ja.ts +409 -0
  81. package/src/i18n/ko.ts +409 -0
  82. package/src/i18n/pt-BR.ts +409 -0
  83. package/src/i18n/ru.ts +415 -0
  84. package/src/i18n/zh-Hant.ts +409 -0
  85. package/src/i18n/zh.ts +440 -0
  86. package/src/index.ts +15 -0
  87. package/src/model-text.ts +344 -0
  88. package/src/moves.ts +101 -0
  89. package/src/pack-import.ts +361 -0
  90. package/src/packs.ts +449 -0
  91. package/src/runtime/download.ts +29 -0
  92. package/src/runtime/store.ts +293 -0
  93. package/src/script.ts +202 -0
  94. package/src/self.ts +247 -0
  95. package/src/server.ts +479 -0
  96. package/src/speech/data/CMUDICT-LICENSE +33 -0
  97. package/src/speech/data/IPADIC-COPYING +71 -0
  98. package/src/speech/data/UNICODE-LICENSE +39 -0
  99. package/src/speech/data/en.tsv.gz +0 -0
  100. package/src/speech/data/ja-ipadic.tsv.gz +0 -0
  101. package/src/speech/data/ja-unihan.tsv.gz +0 -0
  102. package/src/speech/data/zh.json +1 -0
  103. package/src/speech/index.ts +204 -0
  104. package/src/speech/ipa.ts +83 -0
  105. package/src/speech/japanese.ts +105 -0
  106. package/src/speech/jukujikun.ts +22 -0
  107. package/src/speech/korean.ts +35 -0
  108. package/src/speech/lang.ts +151 -0
  109. package/src/speech/rules.ts +72 -0
  110. package/src/speech/syllable.ts +76 -0
  111. package/src/status.ts +164 -0
  112. package/src/tools.ts +110 -0
  113. package/src/webui/api-rows.css +2 -0
  114. package/src/webui/api-rows.ts +44 -0
  115. package/src/webui/client.ts +451 -0
  116. package/src/webui/dress-dialog.css +14 -0
  117. package/src/webui/dress-dialog.ts +117 -0
  118. package/src/webui/dress-panel.ts +160 -0
  119. package/src/webui/key-capture.ts +60 -0
  120. package/src/webui/shared/modal.css +13 -0
  121. package/src/webui/shared/modal.ts +77 -0
  122. package/src/webui/shared/problem.css +15 -0
  123. package/src/webui/shared/problem.ts +217 -0
  124. package/src/webui/shared/strings.ts +5 -0
  125. package/src/webui/style.css +50 -0
  126. package/src/window-host.ts +116 -0
  127. package/src/world.ts +2926 -0
  128. package/web/activity-motion.js +117 -0
  129. package/web/appearance.js +60 -0
  130. package/web/body-host.js +257 -0
  131. package/web/coo/coo.js +384 -0
  132. package/web/coo/figure.js +15 -0
  133. package/web/coo/figure.json +1224 -0
  134. package/web/dist/dress-dialog.css +1 -0
  135. package/web/dist/dress-dialog.js +1 -0
  136. package/web/drag-row.js +49 -0
  137. package/web/drag.js +149 -0
  138. package/web/dress.css +170 -0
  139. package/web/dress.html +37 -0
  140. package/web/dress.js +786 -0
  141. package/web/figure-frame.html +16 -0
  142. package/web/figure-frame.js +128 -0
  143. package/web/frame-loop.js +55 -0
  144. package/web/hints.js +77 -0
  145. package/web/i18n/de.js +170 -0
  146. package/web/i18n/en.js +177 -0
  147. package/web/i18n/es-419.js +170 -0
  148. package/web/i18n/fr.js +170 -0
  149. package/web/i18n/it.js +170 -0
  150. package/web/i18n/ja.js +170 -0
  151. package/web/i18n/ko.js +170 -0
  152. package/web/i18n/pt-BR.js +170 -0
  153. package/web/i18n/ru.js +170 -0
  154. package/web/i18n/zh-Hant.js +170 -0
  155. package/web/i18n/zh.js +175 -0
  156. package/web/i18n.js +54 -0
  157. package/{renderer/vendor → web}/kit/body.js +31 -58
  158. package/web/looks.js +70 -0
  159. package/web/mic-worklet.js +36 -0
  160. package/web/mic.js +117 -0
  161. package/web/motion-frames.js +80 -0
  162. package/web/motion-level.js +40 -0
  163. package/web/new-year-2027.svg +238 -0
  164. package/web/overlay.html +16 -0
  165. package/web/overlay.js +100 -0
  166. package/web/pet-app.js +3000 -0
  167. package/web/pet.css +642 -0
  168. package/web/pet.html +21 -0
  169. package/web/scale-slider.js +259 -0
  170. package/web/show-hide.js +49 -0
  171. package/web/sound.js +245 -0
  172. package/web/speech/zh.json +1 -0
  173. package/web/speech/zh.ogg +0 -0
  174. package/web/speech.js +197 -0
  175. package/web/stage.js +160 -0
  176. package/web/swap-motion.js +119 -0
  177. package/web/ui.js +195 -0
  178. package/host/launch.js +0 -187
  179. package/host/library.cjs +0 -638
  180. package/host/main.cjs +0 -389
  181. package/index.js +0 -93
  182. package/renderer/index.html +0 -22
  183. package/renderer/pet-sandbox.html +0 -11
  184. package/renderer/pet.css +0 -38
  185. package/renderer/pet.js +0 -251
  186. package/renderer/vendor/activity-motion.js +0 -101
  187. package/renderer/vendor/figure-frame.js +0 -115
  188. package/renderer/vendor/pack.css +0 -2
  189. /package/{renderer/vendor → web}/kit/rig.js +0 -0
@@ -0,0 +1,409 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { PetText } from './index.ts';
3
+
4
+ const zhHant: Translation<PetText> = {
5
+ defaultUser: '夥伴',
6
+
7
+ menu: {
8
+ quit: '結束',
9
+ quitPrompt: (label: string) => `${label}?`,
10
+ },
11
+
12
+ busy: '在忙',
13
+
14
+ voice: {
15
+ serviceStopped: '識別服務已停止,目前無法語音輸入',
16
+ recorded: '錄音已投遞',
17
+ recordingUnavailable: '錄音無法投遞,且沒有可用的轉寫',
18
+ starting: '辨識服務啟動中',
19
+ notRunning: '辨識服務沒有執行',
20
+ modelMissing: (mb: number) => `辨識模型尚未下載(約 ${mb} MB),請在「語音輸入」頁下載`,
21
+ badKey: (hotkey: string) => `無法辨識按鍵「${hotkey}」`,
22
+ keyProblem: (problem: string) => `說話鍵無法使用,暫不辨識說話:${problem}`,
23
+ always: '持續收音,直接說話即可',
24
+ toggleTaps: (label: string, taps: number) => `${label} 開始收音,再按${taps === 2 ? '兩' : '三'}下停止`,
25
+ toggle: (key: string) => `按一下 ${key} 開始收音,再按一下停止`,
26
+ holdTaps: (key: string, taps: number) => `快速按${taps === 2 ? '一' : '兩'}下 ${key},緊接著按住說話,放開即送出`,
27
+ hold: (key: string) => `按住 ${key} 說話,放開即送出`,
28
+ failedLine: (error: string) => `[失敗] ${error}`,
29
+ },
30
+
31
+ keys: {
32
+ LeftCtrl: '左 Ctrl', RightCtrl: '右 Ctrl', LeftAlt: '左 Alt', RightAlt: '右 Alt', LeftShift: '左 Shift', RightShift: '右 Shift',
33
+ RightWin: '右 Win', Backquote: '`', Mouse3: '滑鼠中鍵', Mouse4: '滑鼠側鍵 4', Mouse5: '滑鼠側鍵 5',
34
+ },
35
+ macKeys: {
36
+ Ctrl: 'Control', LeftCtrl: '左 Control', RightCtrl: '右 Control',
37
+ Alt: 'Option', LeftAlt: '左 Option', RightAlt: '右 Option', Win: 'Command', RightWin: '右 Command',
38
+ },
39
+ taps: (taps: number, keys: string) => `${taps === 2 ? '按兩下' : '按三下'} ${keys}`,
40
+
41
+ hotkey: {
42
+ cannotRead: (why: string) => `無法讀取鍵盤狀態:${why}`,
43
+ macNoKey: 'Mac 上沒有這個按鍵,請更換說話鍵',
44
+ macPermission: '沒有「輸入監控」權限:在「系統設定 → 隱私權與安全性 → 輸入監控」裡開啟 Coopanion,再重新啟動它;已經開啟的話,先用「−」把 Coopanion 移出列表再加回來:更新後的新版本不會沿用舊的授權',
45
+ linuxNoKey: 'Linux 上無法讀取該按鍵(不支援滑鼠側鍵),請更換說話鍵',
46
+ linuxNoDisplay: '按鍵收音在 Linux 上需要 X11(或 XWayland):沒有設定 DISPLAY',
47
+ linuxNoX11: '按鍵收音連不上 X11 顯示',
48
+ unsupported: '按鍵收音只能在 Windows、macOS 和 Linux 上使用',
49
+ },
50
+ typeKey: {
51
+ macNoKey: 'Mac 上沒有這個按鍵,請更換打字鍵',
52
+ linuxNoKey: 'Linux 上無法讀取該按鍵(不支援滑鼠側鍵),請更換打字鍵',
53
+ linuxNoDisplay: '打字鍵在 Linux 上需要 X11(或 XWayland):沒有設定 DISPLAY',
54
+ linuxNoX11: '打字鍵連不上 X11 顯示',
55
+ unsupported: '打字鍵只能在 Windows、macOS 和 Linux 上使用',
56
+ },
57
+ throughPauseKey: {
58
+ macNoKey: 'Mac 上沒有這個按鍵,請更換暫停穿透鍵',
59
+ linuxNoKey: 'Linux 上無法讀取該按鍵(不支援滑鼠側鍵),請更換暫停穿透鍵',
60
+ linuxNoDisplay: '暫停穿透鍵在 Linux 上需要 X11(或 XWayland):沒有設定 DISPLAY',
61
+ linuxNoX11: '暫停穿透鍵連不上 X11 顯示',
62
+ unsupported: '暫停穿透鍵只能在 Windows、macOS 和 Linux 上使用',
63
+ sharesTalk: '和說話鍵的按法相同:按住時也會開始收音,請更換其中一個',
64
+ },
65
+
66
+ system: {
67
+ name: (culture: string) => (culture ? `Windows 語音辨識(${culture})` : 'Windows 語音辨識'),
68
+ noSpeech: '系統語音元件 System.Speech 無法載入',
69
+ noRecognizer: (language: string) => `系統裡沒有${language === 'auto' ? '' : `「${language}」的`}語音辨識器:請在 Windows 設定 → 時間與語言 → 語言裡為該語言安裝「語音辨識」`,
70
+ windowsOnly: '系統語音辨識只能在 Windows 上使用',
71
+ startFailed: (why: string) => `啟動失敗:${why}`,
72
+ exited: '系統語音辨識處理程序結束了',
73
+ exitedCode: (code: number | null) => `系統語音辨識處理程序結束(結束代碼 ${code})`,
74
+ notReady: '系統語音辨識沒有在時限內就緒',
75
+ notRunning: '系統語音辨識沒有執行',
76
+ timeout: (ms: number) => `辨識逾時(${ms} ms)`,
77
+ stopped: '系統語音辨識已停止',
78
+ },
79
+
80
+ sherpa: {
81
+ incomplete: '辨識模型檔案不完整,請重新下載',
82
+ noRuntime: (platform: string) => `這個平台(${platform})沒有 sherpa-onnx 的執行程式庫`,
83
+ loadFailed: (why: string) => `辨識模型載入失敗:${why}`,
84
+ notLoaded: '辨識模型沒有載入',
85
+ },
86
+
87
+ /** OpenAI 相容的轉寫介面(引擎 api) */
88
+ transcription: {
89
+ noUrl: '還沒有填寫轉寫介面的位址',
90
+ badUrl: (url: string) => `介面位址不是 http 或 https 網址:${url}`,
91
+ httpRemote: '遠端位址只能用 https:http 不加密,API Key 和錄音會以明文傳輸。本機和區域網路的位址可以用 http。',
92
+ noModel: '還沒有填寫轉寫模型',
93
+ notRunning: '轉寫介面沒有啟動',
94
+ status: (status: number, message: string) => (message ? `HTTP ${status}:${message}` : `HTTP ${status}`),
95
+ timeout: (ms: number) => `介面在 ${ms} ms 內沒有回應`,
96
+ network: (why: string) => `連不上介面:${why}`,
97
+ noText: '介面的回應裡沒有 text',
98
+ },
99
+
100
+ store: {
101
+ noBuild: (platform: string) => `沒有 ${platform} 的預先編譯套件`,
102
+ downloading: (file: string) => `下載 ${file}`,
103
+ unpacking: '解壓縮',
104
+ downloadingModel: '下載辨識模型',
105
+ downloadingFrom: (file: string, host: string) => `下載 ${file}(${host})`,
106
+ verifying: (file: string) => `驗證 ${file}`,
107
+ mismatch: (sum: string) => `檢查碼不符:${sum}…`,
108
+ failed: (file: string, why: string) => `${file} 下載失敗(${why})`,
109
+ exitCode: (cmd: string, code: number | null, out: string) => `${cmd} 結束代碼 ${code}:${out}`,
110
+ },
111
+
112
+ packs: {
113
+ noManifest: (file: string) => `沒有 ${file}`,
114
+ badJson: (file: string, why: string) => `${file} 不是有效的 JSON:${why}`,
115
+ notInteger: (key: string, got: string) => `${key} 應為整數,卻是 ${got}`,
116
+ tooNew: (key: string, v: number, now: number) => `${key} 是 ${v},這一版只認得到 ${now}:請先更新應用程式`,
117
+ tooOld: (key: string, v: number, oldest: number) => `${key} ${v} 是 ${oldest} 之前的測試格式,無法讀取`,
118
+ badId: (got: string) => `id 無效:${got}`,
119
+ noName: '缺少 name',
120
+ noAbout: '缺少 about',
121
+ badEntry: 'entry 或 export 無效',
122
+ badModel: 'model 路徑無效',
123
+ badThumb: 'thumb 路徑無效',
124
+ badAxis: (got: string) => `axes 裡有一項無效:${got}`,
125
+ badOption: (axis: string, got: string) => `axes.${axis} 裡有無效的選項:${got}`,
126
+ badPreset: (got: string) => `presets 裡有一項無效:${got}`,
127
+ presetMissing: (preset: string, axis: string) => `presets.${preset} 沒有選 ${axis} 的選項`,
128
+ vocabNotArray: 'vocab 應為陣列',
129
+ badWordId: (got: string) => `vocab 裡有無效的 id:${got}`,
130
+ unknownKind: (id: string, kind: string) => `vocab.${id}.kind 是 ${kind},這一版不認得,這個詞不給 bot 用`,
131
+ namesNotArray: (id: string, lang: string) => `vocab.${id}.names.${lang} 應為陣列`,
132
+ badWordName: (id: string, got: string) => `vocab.${id} 的名字無效:${got}`,
133
+ nameTaken: (name: string) => `vocab 裡 ${name} 指了不只一個詞`,
134
+ noWordAbout: (id: string) => `缺少 vocab.${id}.about`,
135
+ badSeconds: (id: string) => `vocab.${id}.seconds 應為正數`,
136
+ soundsNotObject: 'sounds 應為物件',
137
+ badSoundName: (got: string) => `sounds 裡的名字無效:${got}`,
138
+ badSoundFile: (name: string) => `sounds.${name}.file 應為形象包裡的檔案`,
139
+ badVolume: (name: string) => `sounds.${name}.volume 應為 0–1`,
140
+ soundType: (name: string, file: string) => `sounds.${name} 的 ${file} 不是這一版能播放的 .ogg、.mp3 或 .wav,這個聲音不會響`,
141
+ soundKind: (name: string, kind: string, kinds: readonly string[]) => `sounds.${name}.kind 是 ${kind},這一版只認得 ${kinds.join('、')},這個聲音不會響`,
142
+ soundMissing: (name: string, file: string) => `sounds.${name} 的 ${file} 不存在,這個聲音不會響`,
143
+ soundRepeat: (name: string, got: string, values: readonly string[]) => `sounds.${name}.repeat 是 ${got},這一版只認得 ${values.join('、')},按 overlap 播放`,
144
+ badWalk: (got: string) => `can.walk 是 ${got},這一版不認得,當作會走路處理`,
145
+ movesNotArray: 'moves 應為陣列',
146
+ tooManyMoves: (max: number) => `moves 最多 ${max} 項`,
147
+ badMoveId: (got: string) => `moves 裡有不合法的 id:${got}(left、center、right、cursor 和數字是預設目標)`,
148
+ moveTaken: (id: string) => `moves 裡有不只一個 ${id}`,
149
+ noMoveText: (id: string) => `moves.${id} 缺少 name 或 about`,
150
+ badMoveParams: (id: string, max: number) => `moves.${id}.params 應為最多 ${max} 項的陣列,每項有 id、about 和 min 小於 max 的數值`,
151
+ needsNotArray: 'needs 應為陣列',
152
+ unknownNeed: (got: string) => `needs 裡的 ${got} 這一版不認識,不提供`,
153
+ idTaken: (id: string, builtin: boolean) => `id ${id} 已被${builtin ? '內建形象' : '另一個形象包'}佔用`,
154
+ },
155
+
156
+ importing: {
157
+ badZip: (why: string) => `這不是能讀取的 zip:${why}`,
158
+ truncated: '上傳的內容不完整',
159
+ badPath: (path: string) => `有一個路徑不能用:${path}`,
160
+ builtinId: (id: string) => `id ${id} 屬於內建形象,更換 id 才能匯入`,
161
+ duplicateId: (id: string) => `id ${id} 和這次匯入的另一個形象包重複`,
162
+ unpackFailed: (why: string) => `無法解壓縮:${why}`,
163
+ expired: '這次匯入已經過期,請重新選擇',
164
+ noneChosen: '沒有選擇要匯入的形象包',
165
+ zipOrFolder: '只能匯入 zip 或資料夾',
166
+ },
167
+
168
+ removing: {
169
+ notInstalled: (id: string) => `沒有 id 為 ${id} 的形象包`,
170
+ builtin: (id: string) => `${id} 是內建形象,無法解除安裝`,
171
+ elsewhere: (id: string) => `${id} 不在形象包的安裝目錄中,無法在這裡解除安裝`,
172
+ failed: (why: string) => `無法刪除:${why}`,
173
+ },
174
+
175
+ consent: {
176
+ question: (items: string[]) => `我想${items.join('、')},可以嗎?`,
177
+ choices: ['可以', '以後都可以', '不用了'] as [yes: string, always: string, no: string],
178
+ list: (items: string[]) => items.join('、'),
179
+ pick: (axis: string, option: string) => `${axis}:${option}`,
180
+ figure: (to: string) => `換成${to}的樣子`,
181
+ scheme: (figure: string, look: string) => `換一身${figure}的裝扮(${look})`,
182
+ roam: { free: '常走動', calm: '多待著', off: '不亂動' },
183
+ roamTo: (to: string) => `走動改成「${to}」`,
184
+ snore: (seconds: number) => (seconds === 0 ? '睡著時一直打呼到醒' : `每次睡著打 ${seconds} 秒呼`),
185
+ sound: (on: boolean) => (on ? '開啟音效' : '關閉音效'),
186
+ scale: (from: number, to: number) => `把大小從 ${from} 倍改成 ${to} 倍`,
187
+ bubbleSize: (from: number, to: number) => `把氣泡尺寸從 ${from} 倍改成 ${to} 倍`,
188
+ fontSize: (from: number, to: number) => `把字體尺寸從 ${from} 倍改成 ${to} 倍`,
189
+ theme: { dark: '換成夜間模式', light: '換成白天模式' },
190
+ hover: (list: string) => `把懸停按鈕換成${list}`,
191
+ hoverNone: '拿掉所有懸停按鈕',
192
+ actions: { chat: '打字', voice: '語音輸入', roam: '走動', theme: '夜間模式', sound: '音效', size: '大小', fade: "透明度", dress: '裝扮', cua: "電腦操作", hide: '隱藏桌寵', through: '滑鼠穿透', worlds: '我的 World' },
193
+ user: (to: string) => `改叫你「${to}」`,
194
+ },
195
+
196
+ portsTaken: (from: number, to: number, why: string) => `連接埠 ${from}–${to} 都被佔用:${why}`,
197
+
198
+ console: {
199
+ label: '桌寵',
200
+ window: '桌寵視窗',
201
+ connected: '頁面已連線',
202
+ notOpen: '未開啟',
203
+ noBody: (reason: string) => `頁面已連線,形象無法繪製:${reason}`,
204
+ alsoBrowser: (hint: string) => `${hint};瀏覽器頁面已連線`,
205
+ voice: '語音辨識',
206
+ notStarted: '未啟動',
207
+ viewInBrowser: '在瀏覽器中查看桌寵',
208
+ dress: '裝扮',
209
+ panels: {
210
+ pet: { title: '桌寵', description: '視窗、裝扮與視窗執行環境。' },
211
+ voice: { title: '語音輸入', description: '辨識引擎、音量與辨識結果。' },
212
+ },
213
+ envPrompt: { title: '桌寵環境', description: '描述桌寵的身體、工具與輸入事件。' },
214
+ vars: {
215
+ 'pet.user': '對使用者的稱呼',
216
+ 'pet.vocab': '目前形象的表情與動作詞表',
217
+ 'pet.moves': '目前形象自帶的 speed_pet_move_to 目標;沒有時為空',
218
+ 'pet.voice': '語音輸入開著還是關著',
219
+ 'pet.body': '目前形象的樣子',
220
+ 'pet.dress': 'speed_pet_set 能選的形象與裝扮',
221
+ 'pet.self': '「自主設定權限」:哪些設定直接修改、哪些先徵得同意,或都不能修改',
222
+ 'pet.chat': '應用程式提供對話頁時,對它的說明;沒有時為空',
223
+ 'pet.reply': '應用程式語言既不是簡體中文也不是英文時,讓 bot 用那種語言說話的一句;否則為空',
224
+ 'pet.cua': '電腦操作一節:截圖座標、何時先詢問使用者、讓位規則;電腦操作關閉時為空',
225
+ },
226
+ noGuide: '這個應用程式沒有引導',
227
+ unknownMethod: (name: string) => `未知的方法 ${name}`,
228
+ },
229
+
230
+ config: {
231
+ group: '桌寵',
232
+ soundGroup: '音效',
233
+ asrGroup: '語音輸入',
234
+ user: { title: '稱呼', description: (max: number) => `語音、打字和互動事件裡用這個名字稱呼你,最多 ${max} 個字。留空時使用預設稱呼。` },
235
+ roam: { title: '走動', description: 'free 常走動;calm 多待著;off 只做被要求的動作。' },
236
+ theme: { title: '夜間模式', description: 'dark 夜間:淺色身體、深色氣泡;light 白天:深色身體、淺色氣泡。' },
237
+ rememberPosition: { title: '記住位置', description: '結束時記下桌寵的橫向位置,下次啟動回到那裡;有多個螢幕時一律在主螢幕上啟動。' },
238
+ hoverButtons: { title: '懸停按鈕', description: (max: number, ids: string) => `滑鼠停在桌寵身上時旁邊出現的按鈕,最多 ${max} 個,以逗號分隔:${ids}。` },
239
+ doubleClickChat: { title: '點兩下開啟打字框', description: '在桌寵上點兩下開啟打字框。' },
240
+ statusBubble: { title: '狀態氣泡', description: '想事情、翻記憶、操作電腦時顯示在做什麼,會顯示檔名。' },
241
+ saidBubbles: { title: '輸入氣泡', description: '打字、語音和對話頁送出的訊息顯示在桌寵頭頂。關閉時語音只在辨識中顯示。' },
242
+ saidBubbleHoldSec: { title: '輸入氣泡停留時間', description: '從送出或辨識完成時起停留的秒數;0 為自動,回覆後淡出。' },
243
+ selfAdjust: { title: '自主設定權限', description: 'off 禁止:不能自行修改設定,也不能臨時安靜;default 預設:形象、配色、走動和打呼直接修改,大小、氣泡尺寸、字體尺寸、音效、夜間模式、懸停按鈕和稱呼先徵得你同意;any 任意:都直接修改;custom 自訂:照「習慣」頁裡的勾選,勾上的直接修改,其餘先徵得你同意。' },
244
+ windowEnabled: { title: '啟動時開啟桌寵視窗' },
245
+ scale: { title: '大小' },
246
+ bubbleSize: { title: '氣泡尺寸', description: '桌寵和你的氣泡的寬度、留白、圓角和尾巴,1 為預設;字級不變。' },
247
+ fontSize: { title: '字體尺寸', description: '氣泡裡文字的大小,1 為預設;氣泡寬度不變。' },
248
+ bubbleSpeed: { title: '氣泡速度', description: '桌寵的氣泡逐字出現和自動停留的速度,1 為預設,越大越快。' },
249
+ sayBubbleHoldSec: { title: '台詞氣泡停留時間', description: '每段台詞出完字後停留的秒數;0 為自動,依字數和氣泡速度計算。' },
250
+ glow: { title: '外發光', description: '桌寵和身後的顏色相近時,身體周圍出現的淺色外發光向外延伸多少像素;0 為關閉。' },
251
+ frameRate: { title: '幀率', description: '走動、被拎著、跳起時每秒畫幾幀;0 跟隨螢幕更新率。超過螢幕更新率時以螢幕的為準。「習慣」頁可選 60、120、144 和不限。' },
252
+ lockFrameRate: { title: '幀率鎖定', description: '靜止時也依「幀率」繪製桌寵。關閉時站著、坐著、睡著會降到每秒 30 幀。' },
253
+ motion: { title: "動態效果", description: "介面動畫的多寡,設定視窗和桌寵視窗一起改變:system 跟隨系統的「減少動態效果」(要求減少時為 low,否則為 high),low 只保留顏色變化和載入指示,medium 去掉回彈和裝飾性的動畫,high 全部保留。Coo 的走動不受影響,見 roam。" },
254
+ fade: { title: "透明度", description: "桌寵的透明程度:0 為不透明,最高 95%,每 5% 一檔。" },
255
+ hideWhenFullscreen: { title: '全螢幕時自動隱藏', description: '開啟時,前景視窗以全螢幕鋪滿桌寵所在的那個螢幕(遊戲、全螢幕影片、瀏覽器全螢幕)就把 Coo 藏起來,離開全螢幕後再放回來;最大化的視窗不算。關閉時一律浮在最上層。' },
256
+ passWhenFullscreen: { title: "全螢幕時滑鼠穿透", description: "開啟時,前景視窗以全螢幕鋪滿桌寵所在的那個螢幕期間 Coo 照常顯示,點擊全部穿過 Coo 落到下方的視窗,離開全螢幕後恢復;最大化的視窗不算。與全螢幕時自動隱藏同時開啟時 Coo 會隱藏。" },
257
+ fadeWhenFullscreen: { title: "全螢幕時變淡", description: "開啟時,前景視窗以全螢幕鋪滿桌寵所在的那個螢幕期間改用「全螢幕時透明度」,離開全螢幕後恢復;最大化的視窗不算。" },
258
+ fullscreenFade: { title: "全螢幕時透明度" },
259
+ overTaskbar: { title: "顯示在工作列上", description: "開啟時桌寵視窗向下蓋住螢幕底部的工作列,形象繪製在地面以下的部分(坐下時垂下的腿)顯示在工作列上;關閉時視窗到工作列上緣為止。" },
260
+ hideFromCapture: { title: "不出現在截圖和錄影裡", description: "開啟時 Coo 不出現在截圖、螢幕錄影、直播和 Coo 自己的截圖裡。開啟時 NVIDIA 即時重播的桌面擷取可能無法開啟。" },
261
+ exportOverlay: { title: 'OBS 畫面', description: '在 /overlay 提供桌寵視窗的透明畫面,供 OBS「瀏覽器」來源使用;關閉時不提供。' },
262
+ electronFile: { title: 'Electron 程式', description: "獨立 Electron 程式的路徑。留空則使用此面板安裝的執行環境。" },
263
+ port: { title: '頁面連接埠', description: '被佔用時往上順延到下一個空的連接埠。' },
264
+ touchEnabled: { title: '互動送成事件', description: '戳、摸、拎起來甩出去。' },
265
+ touchWakeOn: { title: '回應模式', description: 'poke:只有戳一下馬上回應,其餘互動等下次回應時一併送達;all:所有互動都馬上回應;none:所有互動都等下次回應時一併送達;custom:依「習慣」頁勾選的互動馬上回應。一次互動得到回應之後、本輪結束之前的互動,都等下次回應時一併送達。' },
266
+ sound: { title: '音效總開關', description: '桌寵選單裡的音效按鈕切換的就是這個。' },
267
+ volume: { title: '音量' },
268
+ sounds: {
269
+ move: { title: '動作', description: '走路、跑、跳、落地、被甩出去、點頭、搖頭、轉圈、頭暈、發抖、跳舞、張望。' },
270
+ touch: { title: '互動', description: '被拎起來、拎著晃、被摸、被戳。' },
271
+ face: { title: '表情', description: '開心、眨眼、喜歡、驚訝、生氣、難過、害羞、打哈欠。' },
272
+ snore: { title: '打呼', description: '' },
273
+ talk: { title: '說話', description: '氣泡文字逐字冒出時的嘰咕聲、選項卡片彈出的聲音。' },
274
+ ui: { title: '按鈕與提示', description: '點按鈕、氣泡彈出、選取、開始和結束聽你說話。' },
275
+ alert: { title: '提醒', description: '請你確認時響一聲。' },
276
+ },
277
+ snoreSeconds: { title: '打呼時長', suffix: '秒', description: '每次睡著後打呼這麼久就安靜下來,Z 照樣飄;0 = 一直打到醒來。' },
278
+ panByPosition: { title: '依位置分配左右聲道', description: '聲音偏向 Coo 所在的一側,關閉後置中播放。' },
279
+ speech: { title: '說話聲', description: '開啟後氣泡逐字冒出時念出音節,代替「說話」類的嘰咕聲;「說話」類關掉時也不出聲。' },
280
+ speechPitch: { title: '說話聲音高', description: (a: number, b: number, c: number) => `low、mid、high 依次為 ${a}、${b}、${c} Hz;custom 用自訂音高。` },
281
+ speechPitchHz: { title: '自訂音高' },
282
+ speechSpeed: { title: '說話聲語速', description: (a: number, b: number, c: number) => `每秒最多念幾個音節:low、mid、high 依次為 ${a}、${b}、${c};custom 用自訂語速。比文字慢時,聲音在文字打完後才念完。` },
283
+ speechRate: { title: '自訂語速', suffix: '音節/秒' },
284
+ asrEnabled: { title: '語音輸入總開關' },
285
+ asrServiceEnabled: { title: '開啟識別服務', description: '語音輸入開啟時啟動識別服務;關閉後,支援音訊的模型仍可接收僅錄音輸入。' },
286
+ asrEngine: { title: '辨識引擎', description: 'funasr 使用 FunASR 的 SenseVoiceSmall,支援中文、英文、日文、韓文和粵語,第一次要下載約 240 MB 的模型;whisper 使用 OpenAI 的 Whisper small,支援法語、德語、西班牙語、葡萄牙語、義大利語、俄語等近百種語言,第一次要下載約 360 MB 的模型,一句說完才出字;這兩個都在本機辨識。system 使用 Windows 內建的語音辨識,不用下載,準確度低一些(只在 Windows 上有)。api 把每句錄音傳送到 OpenAI 相容的轉寫介面辨識,一句說完才出字;位址和模型在下面填寫,API Key 在「語音輸入」頁填寫。留空時依應用程式語言選擇:中文、英文、日文、韓文用 funasr,其餘用 whisper。' },
287
+ asrLanguage: { title: '語言', description: 'ISO 639-1 語言代碼,或 auto 讓模型自己判斷;留空時跟隨應用程式語言。FunASR 認得 zh、en、ja、ko、yue,Whisper 認得 fr、de、es、pt、it、ru 等近百種,不認得的代碼當作 auto。轉寫介面只在代碼是兩個字母時帶上語言。' },
288
+ asrApiUrl: { title: '轉寫介面位址', description: '引擎為 api 時,每句錄音傳送到這個位址後面的 /audio/transcriptions,例如 https://api.example.com/v1。遠端位址只能用 https,本機和區域網路的位址可以用 http。' },
289
+ asrApiModel: { title: '轉寫模型', description: '引擎為 api 時請求裡的模型名稱。' },
290
+ asrThreads: { title: 'CPU 執行緒', description: 'FunASR 和 Whisper 一次辨識使用幾個執行緒;0 = 2。' },
291
+ asrSimplified: { title: '轉成簡體', description: '應用程式語言是簡體中文時,把辨識出的繁體字轉成簡體。' },
292
+ thresholdDb: { title: '說話門檻' },
293
+ silenceMs: { title: '一句結束的靜音' },
294
+ maxUtteranceMs: { title: '一句最長' },
295
+ recording: { title: '投遞錄音', description: '目前的模型支援音訊輸入(audio/wav)時,每批語音的錄音作為附件傳送給模型服務,並保存在部署的資料目錄;模型不支援音訊輸入時只傳送文字,這一項不起作用。' },
296
+ recordingTranscript: { title: '投遞轉寫', description: '傳送錄音時一併附上辨識出的文字;關閉後只傳送錄音。不傳送錄音時照常傳送文字。' },
297
+ recordingMaxMinutes: { title: '錄音上限', description: '一批語音的錄音超過這個時長時只傳送文字。', suffix: '分鐘' },
298
+ },
299
+
300
+ windowReason: {
301
+ noElectronFile: (file: string) => `Electron 程式不存在:${file}`,
302
+ noElectron: '沒有可用的 Electron:在桌寵面板安裝視窗執行環境,或在設定裡指定 Electron 程式',
303
+ startFailed: (why: string) => `啟動失敗:${why}`,
304
+ closed: '視窗已關閉',
305
+ exited: (code: number | null) => `視窗處理程序結束(結束代碼 ${code})`,
306
+ },
307
+
308
+ panel: {
309
+ window: '桌寵視窗',
310
+ openWindow: '開啟視窗',
311
+ closeWindow: '關閉視窗',
312
+ runtime: '視窗執行環境',
313
+ install: '安裝',
314
+ dress: '裝扮',
315
+ dressHint: '變更會立即儲存,並同步到桌寵視窗',
316
+ connected: '已連線',
317
+ starting: '啟動中',
318
+ cannotOpen: '無法開啟',
319
+ notOpen: '未開啟',
320
+ external: '使用外部程式',
321
+ installed: '已安裝',
322
+ downloading: (progress: string) => `下載中 ${progress}`,
323
+ installFailed: '安裝失敗',
324
+ notInstalled: '未安裝',
325
+ noBuild: '此平台沒有預先編譯套件',
326
+ electronSize: 'Electron 44.4.4,約 150 MB',
327
+
328
+ enable: '開啟語音輸入',
329
+ enabledHint: '麥克風保持開啟,依收音方式傳送給 Coo',
330
+ enabledHintOnPress: '按住說話鍵時開啟麥克風,放開後關閉',
331
+ disabledHint: '已關閉:不開啟麥克風,下面的設定暫不生效',
332
+ engine: '辨識引擎',
333
+ funasr: 'FunASR(本機辨識)',
334
+ system: 'Windows 內建',
335
+ whisper: 'Whisper(本機辨識)',
336
+ systemHint: '不用下載,準確度普通;想要更準確請更換為 FunASR 或 Whisper',
337
+ funasrHint: 'SenseVoiceSmall,在本機辨識,支援中文、英文、日文、韓文和粵語',
338
+ whisperHint: 'Whisper small,在本機辨識,支援法語、德語、西班牙語、葡萄牙語、義大利語、俄語等;一句說完才出字',
339
+ api: '轉寫介面(OpenAI 相容)',
340
+ apiName: '轉寫介面',
341
+ apiHint: '每句錄音傳送到下面填寫的介面辨識,一句說完才出字',
342
+ apiUrl: '介面位址',
343
+ apiModel: '模型',
344
+ apiKey: 'API Key',
345
+ keySaved: '已儲存',
346
+ keyMissing: '未填寫',
347
+ server: '辨識服務',
348
+ start: '啟動',
349
+ stop: '停止',
350
+ ready: '就緒',
351
+ error: '錯誤',
352
+ stopped: '已停止',
353
+ model: '辨識模型',
354
+ download: '下載',
355
+ retry: '重試',
356
+ downloadFailed: '下載失敗',
357
+ downloaded: '已下載',
358
+ notDownloaded: '未下載',
359
+ modelSource: (size: string) => `約 ${size},從 ModelScope 下載`,
360
+ mic: '麥克風',
361
+ micStates: { on: '收音中', off: '未收音', denied: '被拒絕', error: '錯誤' },
362
+ defaultDevice: '系統預設',
363
+ missingDevice: '之前選的裝置(現在找不到)',
364
+ micN: (n: number) => `麥克風 ${n}`,
365
+ mode: '收音方式',
366
+ modes: { hold: '按住說話鍵時收音', toggle: '用說話鍵切換收音', always: '持續收音' },
367
+ openOnPress: '按住時才開啟麥克風',
368
+ openOnPressHint: '使用藍牙耳機等一開啟麥克風就切到通話模式的耳機時開啟;按下後稍等再說話,否則開頭的字可能聽不到',
369
+ recording: '投遞錄音',
370
+ recordingHint: '每批語音的錄音作為附件傳送給目前的模型服務,並保存在本機的資料目錄',
371
+ recordingNoAudio: '目前的模型不支援音訊輸入,只傳送辨識出的文字,這一項不起作用',
372
+ transcript: '投遞轉寫',
373
+ transcriptHint: '傳送錄音時一併附上辨識出的文字;關閉後只傳送錄音。不傳送錄音時照常傳送文字',
374
+ recordingMax: '錄音上限',
375
+ recordingMaxHint: '一批語音的錄音超過這個時長時只傳送文字',
376
+ minutes: '分鐘',
377
+ switchOn: '已開啟',
378
+ switchOff: '已關閉',
379
+ presses: {
380
+ 2: { hold: '按兩下再按住', toggle: '按兩下開始,再按兩下停止' },
381
+ 1: { hold: '直接按住', toggle: '按一下開始,再按一下停止' },
382
+ 3: { hold: '按三下再按住', toggle: '按三下開始,再按三下停止' },
383
+ },
384
+ capture: '按下新的說話鍵,可以是組合鍵或滑鼠側鍵…(Esc 取消)',
385
+ listening: '正在傾聽',
386
+ waitingKey: '等待說話鍵',
387
+ results: '辨識結果',
388
+ resultsHint: '劃線的項目過短或疑似幻覺,未送出',
389
+ talkKeyName: '說話鍵',
390
+ changeKey: '變更',
391
+ cancelKey: '取消',
392
+ level: '輸入音量',
393
+ thresholdHint: '比這條線響的聲音才算說話;別人說話和你一樣響時也會被辨識',
394
+ noResults: '尚無辨識結果',
395
+ },
396
+
397
+ chat: {
398
+ badImages: '圖片格式不對',
399
+ tooManyImages: (max: number) => `一次最多 ${max} 張圖`,
400
+ badMime: (mime: string) => `不支援的圖片格式 ${mime}`,
401
+ emptyImage: '有一張圖是空的',
402
+ bigImage: (mb: number) => `單張圖不能超過 ${mb} MB`,
403
+ offline: '尚未連線',
404
+ notSent: '傳送失敗',
405
+ tooLate: '該訊息已送達,無法收回。',
406
+ },
407
+ };
408
+
409
+ export default zhHant;