lumiverse-spindle-types 0.6.58 → 0.6.59
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/dist/dom.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/text-to-speech.d.ts +36 -0
- package/dist/text-to-speech.js +2 -0
- package/package.json +1 -1
package/dist/dom.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SpindleSTTAPI } from "./speech-to-text.js";
|
|
2
|
+
import type { SpindleTTSAPI } from "./text-to-speech.js";
|
|
2
3
|
import type { SpindleSystemAudioAPI } from "./system-audio.js";
|
|
3
4
|
import type { SpindleClientAPI } from "./client.js";
|
|
4
5
|
import type { SpindleComposerAPI } from "./composer.js";
|
|
@@ -1117,6 +1118,8 @@ export interface SpindleFrontendContext {
|
|
|
1117
1118
|
readonly composer?: SpindleComposerAPI;
|
|
1118
1119
|
/** Host-managed STT. Feature-detect speech-to-text-v1; unavailable on older hosts. */
|
|
1119
1120
|
readonly stt?: SpindleSTTAPI;
|
|
1121
|
+
/** Host-managed TTS playback. Feature-detect text-to-speech-v1; unavailable on older hosts. */
|
|
1122
|
+
readonly tts?: SpindleTTSAPI;
|
|
1120
1123
|
/** Host-managed system-audio analysis (spectrum only). Feature-detect system-audio-v1; desktop client only. */
|
|
1121
1124
|
readonly systemAudio?: SpindleSystemAudioAPI;
|
|
1122
1125
|
/** Per-document routing identity, available with frontend-session-origin-v1. */
|
package/dist/index.d.ts
CHANGED
|
@@ -34,5 +34,7 @@ export type { CouncilMember, CouncilMemberContext, SidecarConfig, CouncilSidecar
|
|
|
34
34
|
export { SIDECAR_DEFAULTS, COUNCIL_SIDECAR_DEFAULTS, COUNCIL_TOOLS_DEFAULTS, COUNCIL_SETTINGS_DEFAULTS, } from "./council.js";
|
|
35
35
|
export type { SpindleSTTProvider, SpindleSTTProviderOption, SpindleSTTStatus, SpindleSTTResult, SpindleSTTAudioFrame, SpindleSTTTranscript, SpindleSTTPcmAudio, SpindleSTTOptions, SpindleSTTStartOptions, SpindleSTTSession, SpindleSTTAPI, SpindleSTTWord, SpindleSTTTranscribeOptions, } from "./speech-to-text.js";
|
|
36
36
|
export { SPINDLE_STT_HOST_CAPABILITIES } from "./speech-to-text.js";
|
|
37
|
+
export type { SpindleTTSSpeakInput, SpindleTTSSpeakOptions, SpindleTTSAPI } from "./text-to-speech.js";
|
|
38
|
+
export { SPINDLE_TTS_HOST_CAPABILITIES } from "./text-to-speech.js";
|
|
37
39
|
export type { SpindleSystemAudioUnavailableReason, SpindleSystemAudioAvailability, SpindleSystemAudioFrame, SpindleSystemAudioChannelFrame, SpindleSystemAudioEndReason, SpindleSystemAudioStartOptions, SpindleSystemAudioSession, SpindleSystemAudioAPI, } from "./system-audio.js";
|
|
38
40
|
export { SPINDLE_SYSTEM_AUDIO_HOST_CAPABILITIES } from "./system-audio.js";
|
package/dist/index.js
CHANGED
|
@@ -12,4 +12,5 @@ export { PERMISSION_DENIED_PREFIX } from "./api.js";
|
|
|
12
12
|
export { SPINDLE_CONNECTION_KINDS_HOST_CAPABILITIES } from "./dom.js";
|
|
13
13
|
export { SIDECAR_DEFAULTS, COUNCIL_SIDECAR_DEFAULTS, COUNCIL_TOOLS_DEFAULTS, COUNCIL_SETTINGS_DEFAULTS, } from "./council.js";
|
|
14
14
|
export { SPINDLE_STT_HOST_CAPABILITIES } from "./speech-to-text.js";
|
|
15
|
+
export { SPINDLE_TTS_HOST_CAPABILITIES } from "./text-to-speech.js";
|
|
15
16
|
export { SPINDLE_SYSTEM_AUDIO_HOST_CAPABILITIES } from "./system-audio.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Host-managed text-to-speech playback for frontend Spindle extensions. */
|
|
2
|
+
/** Speak caller text, or a chat message of the active chat with the host's per-character voices. */
|
|
3
|
+
export type SpindleTTSSpeakInput = {
|
|
4
|
+
text: string;
|
|
5
|
+
messageId?: never;
|
|
6
|
+
} | {
|
|
7
|
+
messageId: string;
|
|
8
|
+
text?: never;
|
|
9
|
+
};
|
|
10
|
+
export interface SpindleTTSSpeakOptions {
|
|
11
|
+
/** TTS connection for text input. Defaults to the user's TTS connection. Not used with messageId. */
|
|
12
|
+
connectionId?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Host-managed TTS playback, available with text-to-speech-v1. */
|
|
15
|
+
export interface SpindleTTSAPI {
|
|
16
|
+
/**
|
|
17
|
+
* Requires media. Stops current host TTS playback, then speaks. Text is spoken as given
|
|
18
|
+
* with the connection's default voice. A message plays like its Play button: saved audio
|
|
19
|
+
* when the message has it, otherwise the host's voice pipeline (which may save the audio
|
|
20
|
+
* to the message). Resolves when this playback ends or is stopped; rejects when it cannot start
|
|
21
|
+
* or synthesis fails.
|
|
22
|
+
*/
|
|
23
|
+
speak(input: SpindleTTSSpeakInput): Promise<void>;
|
|
24
|
+
speak(input: Extract<SpindleTTSSpeakInput, {
|
|
25
|
+
text: string;
|
|
26
|
+
}>, options?: SpindleTTSSpeakOptions): Promise<void>;
|
|
27
|
+
/** Requires media. Stops all host TTS playback, including chat auto-play and saved message audio. */
|
|
28
|
+
stop(): void;
|
|
29
|
+
/** Free. True while any host TTS audio plays or is being prepared for playback. */
|
|
30
|
+
isSpeaking(): boolean;
|
|
31
|
+
/** Free. Called with the new state whenever host TTS playback starts or stops. Returns an unsubscribe function. */
|
|
32
|
+
subscribe(listener: (speaking: boolean) => void): () => void;
|
|
33
|
+
}
|
|
34
|
+
export declare const SPINDLE_TTS_HOST_CAPABILITIES: Readonly<{
|
|
35
|
+
'text-to-speech-v1': 1;
|
|
36
|
+
}>;
|