dsh-voice 0.9.0 → 0.10.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/lib/web.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  /**
2
- * 本地受鉴权 Voice Studio 后端路由:复用宿主 connection/webServer 载体,提供音色列表、即时试听、麦克风转写与安全配置更新。
2
+ * 本地受鉴权 Voice Studio 后端路由:复用宿主 connection/webServer 载体,提供音色列表、即时试听、
3
+ * 8 秒录音直出克隆角色、多角色对话合成、工作区成品库、麦克风转写与安全配置更新。
3
4
  * 绝不向前端返回 asrApiKey / ttsApiKey / proxyUrl 等敏感凭据原文。
4
5
  *
5
6
  * @module dsh-voice/web
6
7
  */
7
8
  import type { IncomingMessage, ServerResponse } from 'node:http';
8
9
  import { type AsrEngine, type CustomVoiceAlias, type ResolvedVoiceConfig, type TtsEngine } from './config.js';
9
- import { fetchEdgeVoices, synthesizeSpeech } from './edge-tts.js';
10
+ import { fetchEdgeVoices, synthesizeSpeech, synthesizeSpeechWithMetadata } from './edge-tts.js';
10
11
  import { synthesizeOpenAiSpeech } from './openai-tts.js';
11
12
  import { transcribe } from './stt.js';
12
13
  export declare const VOICE_STUDIO_SETTINGS_ROUTE = "/_dsh/dsh-voice/studio";
@@ -23,7 +24,9 @@ export interface StudioPronunciationRule {
23
24
  export interface VoiceStudioBackendOptions {
24
25
  updateSettings?: (patch: Record<string, unknown>) => Promise<void>;
25
26
  writable?: () => boolean;
27
+ workspaceDir?: string | (() => string);
26
28
  tts?: typeof synthesizeSpeech;
29
+ ttsWithMeta?: typeof synthesizeSpeechWithMetadata;
27
30
  openaiTts?: typeof synthesizeOpenAiSpeech;
28
31
  fetchVoices?: typeof fetchEdgeVoices;
29
32
  stt?: typeof transcribe;