dsh-mimo-speak 0.0.0-stage → 0.1.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 (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -2
  3. package/README.zh.md +166 -0
  4. package/cordis.patch.yml +20 -0
  5. package/icon.svg +6 -0
  6. package/lib/client.js +3607 -0
  7. package/lib/client.js.map +1 -0
  8. package/lib/node/brief.d.ts +23 -0
  9. package/lib/node/brief.js +110 -0
  10. package/lib/node/brief.js.map +1 -0
  11. package/lib/node/client/BundleConfigCard.d.ts +15 -0
  12. package/lib/node/client/BundleConfigCard.js +22 -0
  13. package/lib/node/client/BundleConfigCard.js.map +1 -0
  14. package/lib/node/client/PlayerBar.d.ts +45 -0
  15. package/lib/node/client/PlayerBar.js +83 -0
  16. package/lib/node/client/PlayerBar.js.map +1 -0
  17. package/lib/node/client/SettingsSectionCard.d.ts +14 -0
  18. package/lib/node/client/SettingsSectionCard.js +19 -0
  19. package/lib/node/client/SettingsSectionCard.js.map +1 -0
  20. package/lib/node/client/SpeakAction.d.ts +32 -0
  21. package/lib/node/client/SpeakAction.js +651 -0
  22. package/lib/node/client/SpeakAction.js.map +1 -0
  23. package/lib/node/client/SpeakerIcon.d.ts +11 -0
  24. package/lib/node/client/SpeakerIcon.js +5 -0
  25. package/lib/node/client/SpeakerIcon.js.map +1 -0
  26. package/lib/node/client/TtsSettingsForm.d.ts +27 -0
  27. package/lib/node/client/TtsSettingsForm.js +164 -0
  28. package/lib/node/client/TtsSettingsForm.js.map +1 -0
  29. package/lib/node/client/api.d.ts +89 -0
  30. package/lib/node/client/api.js +247 -0
  31. package/lib/node/client/api.js.map +1 -0
  32. package/lib/node/client/audio-bus.d.ts +29 -0
  33. package/lib/node/client/audio-bus.js +91 -0
  34. package/lib/node/client/audio-bus.js.map +1 -0
  35. package/lib/node/client/chat-text.d.ts +32 -0
  36. package/lib/node/client/chat-text.js +90 -0
  37. package/lib/node/client/chat-text.js.map +1 -0
  38. package/lib/node/client/highlight.d.ts +45 -0
  39. package/lib/node/client/highlight.js +198 -0
  40. package/lib/node/client/highlight.js.map +1 -0
  41. package/lib/node/client/index.d.ts +26 -0
  42. package/lib/node/client/index.js +89 -0
  43. package/lib/node/client/index.js.map +1 -0
  44. package/lib/node/client/locales.d.ts +19 -0
  45. package/lib/node/client/locales.js +180 -0
  46. package/lib/node/client/locales.js.map +1 -0
  47. package/lib/node/client/panel-visibility.d.ts +24 -0
  48. package/lib/node/client/panel-visibility.js +16 -0
  49. package/lib/node/client/panel-visibility.js.map +1 -0
  50. package/lib/node/client/settings-controller.d.ts +116 -0
  51. package/lib/node/client/settings-controller.js +201 -0
  52. package/lib/node/client/settings-controller.js.map +1 -0
  53. package/lib/node/client/settings-registration.d.ts +24 -0
  54. package/lib/node/client/settings-registration.js +21 -0
  55. package/lib/node/client/settings-registration.js.map +1 -0
  56. package/lib/node/client/slots.d.ts +48 -0
  57. package/lib/node/client/slots.js +15 -0
  58. package/lib/node/client/slots.js.map +1 -0
  59. package/lib/node/client/speech-cache.d.ts +59 -0
  60. package/lib/node/client/speech-cache.js +68 -0
  61. package/lib/node/client/speech-cache.js.map +1 -0
  62. package/lib/node/client/split-speech.d.ts +20 -0
  63. package/lib/node/client/split-speech.js +100 -0
  64. package/lib/node/client/split-speech.js.map +1 -0
  65. package/lib/node/client/status.d.ts +28 -0
  66. package/lib/node/client/status.js +60 -0
  67. package/lib/node/client/status.js.map +1 -0
  68. package/lib/node/client/stream-dispose.d.ts +119 -0
  69. package/lib/node/client/stream-dispose.js +249 -0
  70. package/lib/node/client/stream-dispose.js.map +1 -0
  71. package/lib/node/client/styles.d.ts +19 -0
  72. package/lib/node/client/styles.js +176 -0
  73. package/lib/node/client/styles.js.map +1 -0
  74. package/lib/node/client/use-audio-player.d.ts +44 -0
  75. package/lib/node/client/use-audio-player.js +102 -0
  76. package/lib/node/client/use-audio-player.js.map +1 -0
  77. package/lib/node/client/use-audio-queue.d.ts +44 -0
  78. package/lib/node/client/use-audio-queue.js +151 -0
  79. package/lib/node/client/use-audio-queue.js.map +1 -0
  80. package/lib/node/client/use-stream-player.d.ts +41 -0
  81. package/lib/node/client/use-stream-player.js +60 -0
  82. package/lib/node/client/use-stream-player.js.map +1 -0
  83. package/lib/node/edge-tts.d.ts +21 -0
  84. package/lib/node/edge-tts.js +111 -0
  85. package/lib/node/edge-tts.js.map +1 -0
  86. package/lib/node/index.d.ts +97 -0
  87. package/lib/node/index.js +463 -0
  88. package/lib/node/index.js.map +1 -0
  89. package/lib/node/normalize.d.ts +30 -0
  90. package/lib/node/normalize.js +72 -0
  91. package/lib/node/normalize.js.map +1 -0
  92. package/lib/node/settings.d.ts +186 -0
  93. package/lib/node/settings.js +74 -0
  94. package/lib/node/settings.js.map +1 -0
  95. package/lib/node/summarize.d.ts +29 -0
  96. package/lib/node/summarize.js +131 -0
  97. package/lib/node/summarize.js.map +1 -0
  98. package/lib/node/tool.d.ts +54 -0
  99. package/lib/node/tool.js +123 -0
  100. package/lib/node/tool.js.map +1 -0
  101. package/lib/node/tts.d.ts +127 -0
  102. package/lib/node/tts.js +361 -0
  103. package/lib/node/tts.js.map +1 -0
  104. package/lib/node/wav.d.ts +32 -0
  105. package/lib/node/wav.js +63 -0
  106. package/lib/node/wav.js.map +1 -0
  107. package/locale/en.json +6 -0
  108. package/locale/zh.json +6 -0
  109. package/package.json +122 -4
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Microsoft Edge TTS (readaloud) fallback engine.
3
+ *
4
+ * Edge's browser TTS is keyless, but its auth handshake changes often (the
5
+ * token endpoint retired in 2026 and the WebSocket moved to a Sec-MS-GEC v2
6
+ * handshake). Rather than chase that protocol here, this module shells out to
7
+ * the maintained `edge-tts` CLI when it is installed, and reports a clear
8
+ * error otherwise. The CLI tracks Microsoft's changes upstream.
9
+ * @module dsh-mimo-speak/edge-tts
10
+ */
11
+ /** Resolve an Edge voice, defaulting to {@link DEFAULT_EDGE_VOICE}. */
12
+ export declare function resolveEdgeVoice(voice: string | undefined): string;
13
+ /**
14
+ * Synthesize one text with Edge TTS.
15
+ * @param text - plain text to speak.
16
+ * @param voice - Edge voice name (e.g. `zh-CN-XiaoxiaoNeural`).
17
+ * @param timeoutMs - upper bound on the whole round-trip.
18
+ * @returns complete MP3 bytes.
19
+ * @throws {TtsError} when the CLI is missing or the synthesis fails.
20
+ */
21
+ export declare function synthesizeEdge(text: string, voice: string | undefined, timeoutMs: number): Promise<Uint8Array>;
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Microsoft Edge TTS (readaloud) fallback engine.
3
+ *
4
+ * Edge's browser TTS is keyless, but its auth handshake changes often (the
5
+ * token endpoint retired in 2026 and the WebSocket moved to a Sec-MS-GEC v2
6
+ * handshake). Rather than chase that protocol here, this module shells out to
7
+ * the maintained `edge-tts` CLI when it is installed, and reports a clear
8
+ * error otherwise. The CLI tracks Microsoft's changes upstream.
9
+ * @module dsh-mimo-speak/edge-tts
10
+ */
11
+ import { execFile } from 'node:child_process';
12
+ import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
13
+ import { homedir, tmpdir } from 'node:os';
14
+ import { join } from 'node:path';
15
+ import { promisify } from 'node:util';
16
+ import { DEFAULT_EDGE_VOICE } from "./settings.js";
17
+ import { TtsError } from "./tts.js";
18
+ const execFileAsync = promisify(execFile);
19
+ /**
20
+ * Well-known locations of the `edge-tts` executable, in lookup order. The
21
+ * pipx install (`~/.local/bin`) is listed explicitly: the desktop Host is
22
+ * launched by launchd and usually does not inherit the shell's PATH, so a
23
+ * `which` probe alone would miss an installed CLI.
24
+ */
25
+ const CANDIDATE_BINARIES = [
26
+ 'edge-tts',
27
+ join(homedir(), '.local', 'bin', 'edge-tts'),
28
+ join(homedir(), '.local', 'pipx', 'venvs', 'edge-tts', 'bin', 'edge-tts'),
29
+ '/opt/homebrew/bin/edge-tts',
30
+ '/usr/local/bin/edge-tts',
31
+ '/usr/bin/edge-tts',
32
+ ];
33
+ /** Resolved CLI path, cached: probing spawns a process, so do it once. */
34
+ let located = null;
35
+ /** Resolve an Edge voice, defaulting to {@link DEFAULT_EDGE_VOICE}. */
36
+ export function resolveEdgeVoice(voice) {
37
+ return (voice ?? '').trim() || DEFAULT_EDGE_VOICE;
38
+ }
39
+ /** Find the first `edge-tts` binary the shell would actually run. */
40
+ async function locateEdgeTts() {
41
+ if (located !== null)
42
+ return located;
43
+ for (const candidate of CANDIDATE_BINARIES) {
44
+ if (candidate.includes('/')) {
45
+ try {
46
+ await execFileAsync(candidate, ['--version']);
47
+ located = candidate;
48
+ return candidate;
49
+ }
50
+ catch {
51
+ continue;
52
+ }
53
+ }
54
+ // A bare name: ask the shell where it lives.
55
+ try {
56
+ const { stdout } = await execFileAsync('which', [candidate]);
57
+ const resolved = stdout.trim();
58
+ if (resolved !== '') {
59
+ located = resolved;
60
+ return resolved;
61
+ }
62
+ }
63
+ catch {
64
+ continue;
65
+ }
66
+ }
67
+ throw new TtsError('upstream-error', 'Edge fallback needs the `edge-tts` CLI. Install it with: pipx install edge-tts (or brew install edge-tts).');
68
+ }
69
+ /**
70
+ * Synthesize one text with Edge TTS.
71
+ * @param text - plain text to speak.
72
+ * @param voice - Edge voice name (e.g. `zh-CN-XiaoxiaoNeural`).
73
+ * @param timeoutMs - upper bound on the whole round-trip.
74
+ * @returns complete MP3 bytes.
75
+ * @throws {TtsError} when the CLI is missing or the synthesis fails.
76
+ */
77
+ export async function synthesizeEdge(text, voice, timeoutMs) {
78
+ if (text.trim() === '') {
79
+ throw new TtsError('bad-request', 'Edge TTS received no speakable text.');
80
+ }
81
+ const binary = await locateEdgeTts();
82
+ const dir = await mkdtemp(join(tmpdir(), 'dsh-mimo-edge-'));
83
+ const textPath = join(dir, 'input.txt');
84
+ const mediaPath = join(dir, 'out.mp3');
85
+ try {
86
+ await writeFile(textPath, text, 'utf8');
87
+ await execFileAsync(binary, [
88
+ '--voice', resolveEdgeVoice(voice),
89
+ '--file', textPath,
90
+ '--write-media', mediaPath,
91
+ ], { timeout: timeoutMs, maxBuffer: 10 * 1024 * 1024 });
92
+ const mp3 = await readFile(mediaPath);
93
+ if (mp3.length === 0) {
94
+ throw new TtsError('invalid-audio', 'Edge TTS produced no audio.');
95
+ }
96
+ return new Uint8Array(mp3);
97
+ }
98
+ catch (cause) {
99
+ if (cause instanceof TtsError)
100
+ throw cause;
101
+ const message = cause instanceof Error ? cause.message : String(cause);
102
+ if (message.includes('ETIMEDOUT') || message.includes('timed out')) {
103
+ throw new TtsError('timeout', `Edge TTS did not finish within ${timeoutMs} ms.`, cause);
104
+ }
105
+ throw new TtsError('upstream-error', `Edge TTS failed: ${message.slice(0, 300)}`, cause);
106
+ }
107
+ finally {
108
+ await rm(dir, { recursive: true, force: true }).catch(() => { });
109
+ }
110
+ }
111
+ //# sourceMappingURL=edge-tts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-tts.js","sourceRoot":"","sources":["../../src/edge-tts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG;IACzB,UAAU;IACV,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC;IAC5C,IAAI,CAA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AC,MAAM,CAAC,KAAK,CAAC,CAAA;QACtE,IAAI,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACnE,MAAM,IAAI,QAAQ,CAAC,SAAS,EAAE,kCAAkC,SAAS,MAAM,EAAE,KAAK,CAAC,CAAA;QACzF,CAAC;QACD,MAAM,IAAI,QAAQ,CAAC,gBAAgB,EAAE,oBAAoB,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;IAC1F,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;IACjE,CAAC;AACH,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * MiMo TTS speech synthesis, Host half.
3
+ *
4
+ * The Host answers the browser's synthesis questions (`/api/mimo-speak/status`,
5
+ * `/synthesize`, `/synthesize-stream`, `/test`, `/summary`) and registers the
6
+ * `mimo-tts-say` agent tool that writes WAV files into the session
7
+ * workspace. The API key never leaves the Host — the browser sends text and
8
+ * receives WAV bytes.
9
+ *
10
+ * Settings are ordinary volatile Config fields, so the settings service
11
+ * projects them into the configuration form the browser half renders on its
12
+ * own Plugins-page card (`plugins.bundle.config`); the automatic card is
13
+ * turned off because this plugin contributes that card itself.
14
+ * @module dsh-mimo-speak
15
+ */
16
+ import type { Context, Volatile } from '@deepseek-ai/cordis';
17
+ import z from '@deepseek-ai/schemastery';
18
+ import type { FallbackEngine, ReadScope } from './settings.ts';
19
+ /** Cordis plugin name used by loader diagnostics. */
20
+ export declare const name = "mimo-speak";
21
+ /** Runtime settings projected into the configuration form. */
22
+ export interface Config {
23
+ /** Credential reference naming the MiMo API key in the credentials store. */
24
+ apiKeyEnv: Volatile<string | undefined>;
25
+ /** Endpoint base; `/chat/completions` is appended. */
26
+ baseUrl: Volatile<string | undefined>;
27
+ /** MiMo TTS model id. */
28
+ model: Volatile<string | undefined>;
29
+ /** Preset voice name used when no clone sample is configured. */
30
+ voice: Volatile<string | undefined>;
31
+ /** Host-local WAV (24 kHz / 16-bit / mono, 5–15 s) used as the voice-clone reference. */
32
+ voiceSamplePath: Volatile<string | undefined>;
33
+ /** Default speaking-style phrase (e.g. `开心`, `语速慢`, `东北话`). */
34
+ style: Volatile<string | undefined>;
35
+ /** Longest text one synthesis accepts, in characters. */
36
+ maxChars: Volatile<number>;
37
+ /** Longest single playback chunk, in characters. */
38
+ chunkChars: Volatile<number>;
39
+ /** Upper bound on one upstream round-trip, in milliseconds. */
40
+ timeoutMs: Volatile<number>;
41
+ /** Read each newly finalized assistant reply aloud automatically. */
42
+ autoRead: Volatile<boolean>;
43
+ /** Fallback engine used when MiMo synthesis fails. */
44
+ fallbackEngine: Volatile<FallbackEngine>;
45
+ /** Edge-TTS voice used by the fallback engine. */
46
+ edgeVoice: Volatile<string | undefined>;
47
+ /** Which parts of a reply are read aloud. */
48
+ readScope: Volatile<ReadScope>;
49
+ /** Highlight the sentence being read inside the message. */
50
+ highlight: Volatile<boolean>;
51
+ /** Show the seekable progress bar in the floating player. */
52
+ progressBar: Volatile<boolean>;
53
+ muteWhileRecording: Volatile<boolean>;
54
+ }
55
+ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
56
+ apiKeyEnv: z<string, string, "volatile-defined">;
57
+ baseUrl: z<string, string, "volatile-defined">;
58
+ model: z<string, string, "volatile-defined">;
59
+ voice: z<string, string, "volatile-defined">;
60
+ voiceSamplePath: z<string, string, "volatile">;
61
+ style: z<string, string, "volatile">;
62
+ maxChars: z<number, number, "volatile-defined">;
63
+ chunkChars: z<number, number, "volatile-defined">;
64
+ timeoutMs: z<number, number, "volatile-defined">;
65
+ autoRead: z<boolean, boolean, "volatile-defined">;
66
+ fallbackEngine: z<"none" | "edge", "none" | "edge", "volatile-defined">;
67
+ edgeVoice: z<string, string, "volatile-defined">;
68
+ readScope: z<"text" | "all" | "smart" | "brief", "text" | "all" | "smart" | "brief", "volatile-defined">;
69
+ highlight: z<boolean, boolean, "volatile-defined">;
70
+ progressBar: z<boolean, boolean, "volatile-defined">;
71
+ muteWhileRecording: z<boolean, boolean, "volatile-defined">;
72
+ }>>, Schemastery.ObjectT<NoInfer<{
73
+ apiKeyEnv: z<string, string, "volatile-defined">;
74
+ baseUrl: z<string, string, "volatile-defined">;
75
+ model: z<string, string, "volatile-defined">;
76
+ voice: z<string, string, "volatile-defined">;
77
+ voiceSamplePath: z<string, string, "volatile">;
78
+ style: z<string, string, "volatile">;
79
+ maxChars: z<number, number, "volatile-defined">;
80
+ chunkChars: z<number, number, "volatile-defined">;
81
+ timeoutMs: z<number, number, "volatile-defined">;
82
+ autoRead: z<boolean, boolean, "volatile-defined">;
83
+ fallbackEngine: z<"none" | "edge", "none" | "edge", "volatile-defined">;
84
+ edgeVoice: z<string, string, "volatile-defined">;
85
+ readScope: z<"text" | "all" | "smart" | "brief", "text" | "all" | "smart" | "brief", "volatile-defined">;
86
+ highlight: z<boolean, boolean, "volatile-defined">;
87
+ progressBar: z<boolean, boolean, "volatile-defined">;
88
+ muteWhileRecording: z<boolean, boolean, "volatile-defined">;
89
+ }>>, "plain">;
90
+ /**
91
+ * Host registration: the settings presentation policy, the agent tool, and
92
+ * the Web routes.
93
+ * @param ctx - plugin context; the routes appear when `webServer` and
94
+ * `connection` exist (Web and Desktop GUI compositions).
95
+ * @param config - live volatile settings.
96
+ */
97
+ export declare function apply(ctx: Context, config: Config): void;