@allmodels/dsh-speech 0.1.1 → 0.1.3

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/index.d.ts CHANGED
@@ -13,8 +13,14 @@ interface SpeechSettings {
13
13
  provider?: string;
14
14
  language?: string;
15
15
  context?: string;
16
+ ttsModel?: string;
17
+ ttsProvider?: string;
18
+ ttsVoice?: string;
19
+ ttsEnabled?: boolean;
20
+ autoPlay?: boolean;
21
+ autoplayInlineRevealed?: boolean;
16
22
  }
17
- type SpeechUserSettings = Pick<SpeechSettings, 'model' | 'provider' | 'language' | 'context'>;
23
+ type SpeechUserSettings = Pick<SpeechSettings, 'model' | 'provider' | 'language' | 'context' | 'ttsModel' | 'ttsProvider' | 'ttsVoice' | 'ttsEnabled' | 'autoPlay' | 'autoplayInlineRevealed'>;
18
24
  interface CatalogBinding {
19
25
  provider: string;
20
26
  model: string;
@@ -27,8 +33,19 @@ interface CatalogBinding {
27
33
  }
28
34
  interface CatalogResponse {
29
35
  bindings: CatalogBinding[];
36
+ ttsBindings?: TtsCatalogBinding[];
30
37
  fetchedAt: number;
31
38
  }
39
+ interface TtsCatalogBinding {
40
+ provider: string;
41
+ model: string;
42
+ canonical: string;
43
+ isProviderDefault: boolean;
44
+ defaultVoice?: string;
45
+ formats: readonly string[];
46
+ streaming?: boolean;
47
+ aliases?: readonly string[];
48
+ }
32
49
  interface BalanceSummary {
33
50
  state?: string;
34
51
  paidUsd: number;
@@ -40,6 +57,10 @@ interface BalanceSummary {
40
57
  }
41
58
  /** Normalize only bindings this client can feed with its fixed PCM16/16 kHz pipeline. */
42
59
  declare function normalizeCatalog(raw: unknown, fetchedAt?: number): CatalogResponse;
60
+ declare function selectTtsBinding(bindings: readonly TtsCatalogBinding[], preferred?: {
61
+ model?: string;
62
+ provider?: string;
63
+ }): TtsCatalogBinding | undefined;
43
64
  declare function selectBinding(bindings: readonly CatalogBinding[], locale: string, preferred?: {
44
65
  model?: string;
45
66
  provider?: string;
@@ -74,4 +95,4 @@ declare const Config: z<Config>;
74
95
  declare const UserSettingsConfig: z<SpeechUserSettings>;
75
96
  declare function apply(ctx: Context, config: Config): void;
76
97
  //#endregion
77
- export { Config, SPEECH_SETTINGS_NS, UserSettingsConfig, appendTranscript, apply, applyTranscriptEvent, createTranscript, inject, name, normalizeCatalog, selectBinding, summarizeBalance, transcriptText };
98
+ export { Config, SPEECH_SETTINGS_NS, UserSettingsConfig, appendTranscript, apply, applyTranscriptEvent, createTranscript, inject, name, normalizeCatalog, selectBinding, selectTtsBinding, summarizeBalance, transcriptText };