@vibedev-si/dsh-vibedev 0.11.6 → 0.13.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/README.md +53 -3
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/client/client.account-center.js +6 -1
- package/client/client.js +101 -3
- package/lib/account/index.d.ts +2 -0
- package/lib/audio/request.d.ts +3 -2
- package/lib/auth/login.d.ts +58 -0
- package/lib/auth/remote-callback.d.ts +34 -0
- package/lib/auth/sign-in-state.d.ts +8 -2
- package/lib/gateway/catalog.d.ts +55 -3
- package/lib/gateway/paid-path.d.ts +1 -1
- package/lib/index.d.ts +9 -0
- package/lib/index.js +1771 -313
- package/lib/llm/adapter.d.ts +3 -0
- package/lib/llm/context.d.ts +2 -0
- package/lib/llm/file-placement.d.ts +31 -0
- package/lib/llm/native-files.d.ts +4 -14
- package/lib/llm/verified-files.d.ts +63 -0
- package/lib/pricing.d.ts +48 -10
- package/lib/runtime.d.ts +14 -3
- package/lib/speech/availability.d.ts +39 -0
- package/lib/speech/gateway.d.ts +69 -0
- package/lib/speech/host.d.ts +131 -0
- package/lib/speech/index.d.ts +37 -0
- package/lib/speech/recognition.d.ts +40 -0
- package/lib/speech/sign-in.d.ts +34 -0
- package/lib/speech/synthesis.d.ts +38 -0
- package/lib/speech/wave.d.ts +33 -0
- package/package.json +11 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibedev-tts`: speech synthesis through the VibeDev gateway (`POST /v1/vibedev/speech/tts`), billed to the VibeDev
|
|
3
|
+
* account. The text goes up as `{ text, voice_id, format: 'pcm', filter_markdown: false }`, and the audio streams back
|
|
4
|
+
* as headerless 24 kHz signed 16-bit little-endian mono PCM, in chunks passed on as they arrive (the first one after
|
|
5
|
+
* about two seconds).
|
|
6
|
+
* @module dsh-vibedev/speech/synthesis
|
|
7
|
+
*/
|
|
8
|
+
import type { CredentialAvailability } from './availability.js';
|
|
9
|
+
import { type SpeechGateway } from './gateway.js';
|
|
10
|
+
import type { ClassifiedErrorClass, SynthesisFailureCode, SynthesisProvider } from './host.js';
|
|
11
|
+
/** The provider id the VibeDev desktop's read-aloud recognizes as VibeDev's. */
|
|
12
|
+
export declare const SYNTHESIS_PROVIDER_ID = "vibedev-tts";
|
|
13
|
+
/** The gateway's synthesis endpoint. */
|
|
14
|
+
export declare const TTS_PATH = "/v1/vibedev/speech/tts";
|
|
15
|
+
/** The gateway's voices, in menu order: `stella` (the default) and `tide`. */
|
|
16
|
+
export declare const SYNTHESIS_VOICES: readonly string[];
|
|
17
|
+
/** Sample rate of the gateway's `pcm` format. */
|
|
18
|
+
export declare const SYNTHESIS_SAMPLE_RATE = 24000;
|
|
19
|
+
/** Longest text one request takes. */
|
|
20
|
+
export declare const SYNTHESIS_MAX_CHARACTERS = 5000;
|
|
21
|
+
/** Longest wait for the next audio while someone is asking for it, the first audio included. */
|
|
22
|
+
export declare const SYNTHESIS_IDLE_TIMEOUT_MS = 30000;
|
|
23
|
+
/** What the synthesizer is built from. */
|
|
24
|
+
export interface SynthesisOptions {
|
|
25
|
+
readonly gateway: SpeechGateway;
|
|
26
|
+
/** The Host's `SpeechSynthesisError`: the registry classifies failures with `instanceof` against it. */
|
|
27
|
+
readonly errorClass: ClassifiedErrorClass<SynthesisFailureCode>;
|
|
28
|
+
/** The sign-in state, published as the synthesizer's availability and checked again after a refused sign-in. */
|
|
29
|
+
readonly availability: CredentialAvailability;
|
|
30
|
+
/** Idle deadline (test seam). */
|
|
31
|
+
readonly idleTimeoutMs?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Build the synthesizer.
|
|
35
|
+
* @param options - the gateway, the Host's error class and the sign-in state.
|
|
36
|
+
* @returns the provider to register with `ctx.textToSpeech`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createSynthesis(options: SynthesisOptions): SynthesisProvider;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The recordings `POST /v1/vibedev/speech/asr` accepts, checked before anything is sent: 16-bit PCM WAV, mono or
|
|
3
|
+
* stereo, 8–48 kHz, at most 8 MiB and 120 seconds (the Host sends 16 kHz mono). And the request body: one
|
|
4
|
+
* multipart `file` field.
|
|
5
|
+
* @module dsh-vibedev/speech/wave
|
|
6
|
+
*/
|
|
7
|
+
/** Largest recording file the gateway accepts. */
|
|
8
|
+
export declare const MAX_RECORDING_BYTES: number;
|
|
9
|
+
/** Longest recording the gateway accepts. */
|
|
10
|
+
export declare const MAX_RECORDING_SECONDS = 120;
|
|
11
|
+
/** A recording the gateway would refuse; the message names the broken rule and carries no audio. */
|
|
12
|
+
export declare class RecordingRejected extends Error {
|
|
13
|
+
readonly name = "RecordingRejected";
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Check a recording against the gateway's limits.
|
|
17
|
+
* @param audio - the WAV file, sent unchanged.
|
|
18
|
+
* @returns its duration in seconds.
|
|
19
|
+
* @throws {@link RecordingRejected} for anything the gateway would refuse.
|
|
20
|
+
*/
|
|
21
|
+
export declare function recordingSeconds(audio: Uint8Array): number;
|
|
22
|
+
/** One encoded `multipart/form-data` body. */
|
|
23
|
+
export interface MultipartBody {
|
|
24
|
+
readonly body: Uint8Array;
|
|
25
|
+
readonly contentType: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Encode the recording as the gateway's single `file` field. Bytes rather than `FormData`: a request cancelled before
|
|
29
|
+
* undici reads a `FormData` body leaves its pump rejecting unhandled, and a busy retry sends the same bytes again.
|
|
30
|
+
* @param recording - the WAV file.
|
|
31
|
+
* @returns the body and its content type.
|
|
32
|
+
*/
|
|
33
|
+
export declare function multipartBody(recording: Uint8Array): MultipartBody;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibedev-si/dsh-vibedev",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "VibeDev 账号与模型:在 DeepSeek Harness 里登录 VibeDev,与 DeepSeek 账号并存,使用 VibeDev 网关的模型(Claude、GPT 等),并生成图片、视频、音乐和播客 · VibeDev account and models for DeepSeek Harness: sign in to VibeDev next to the DeepSeek account and use the VibeDev gateway's models (Claude, GPT and more), plus image, video, music and podcast generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -88,13 +88,23 @@
|
|
|
88
88
|
"@deepseek-ai/dsh-attachment": ">=0.2.0-rc.2 <0.3.0",
|
|
89
89
|
"@deepseek-ai/dsh-brand": ">=0.2.0-rc.2 <0.3.0",
|
|
90
90
|
"@deepseek-ai/dsh-credentials": ">=0.2.0-rc.2 <0.3.0",
|
|
91
|
+
"@deepseek-ai/dsh-experimental-speech-to-text": ">=0.2.0-rc.2 <0.3.0",
|
|
91
92
|
"@deepseek-ai/dsh-llm": ">=0.2.0-rc.2 <0.3.0",
|
|
93
|
+
"@deepseek-ai/dsh-text-to-speech": ">=0.2.0-rc.2 <0.3.0",
|
|
92
94
|
"@deepseek-ai/dsh-timeout": ">=0.2.0-rc.2 <0.3.0",
|
|
93
95
|
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2 <0.3.0",
|
|
94
96
|
"@deepseek-ai/dsh-web": ">=0.2.0-rc.2 <0.3.0",
|
|
95
97
|
"@deepseek-ai/dsh-web-fetch-http": ">=0.2.0-rc.2 <0.3.0",
|
|
96
98
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
97
99
|
},
|
|
100
|
+
"peerDependenciesMeta": {
|
|
101
|
+
"@deepseek-ai/dsh-experimental-speech-to-text": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"@deepseek-ai/dsh-text-to-speech": {
|
|
105
|
+
"optional": true
|
|
106
|
+
}
|
|
107
|
+
},
|
|
98
108
|
"devDependencies": {
|
|
99
109
|
"@deepseek-ai/cordis": "4.0.6-alpha.1",
|
|
100
110
|
"@deepseek-ai/cordis-plugin-include": "1.0.11-alpha.1",
|