@absolutejs/voice-deepgram 0.0.20-beta.94 → 0.0.20-beta.95

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.
@@ -1,3 +1,3 @@
1
- import type { STTAdapter } from '@absolutejs/voice';
2
- import type { DeepgramSTTOptions } from './types';
1
+ import type { STTAdapter } from "@absolutejs/voice";
2
+ import type { DeepgramSTTOptions } from "./types";
3
3
  export declare const deepgram: (config: DeepgramSTTOptions) => STTAdapter;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { deepgram } from './deepgram';
2
- export type { DeepgramModel, DeepgramSTTOptions } from './types';
1
+ export { deepgram } from "./deepgram";
2
+ export type { DeepgramConversationalOptions, DeepgramFluxModel, DeepgramModel, DeepgramNovaModel, DeepgramSTTOptions, DeepgramTranscriptionOptions, } from "./types";
package/dist/index.js CHANGED
@@ -319,7 +319,10 @@ var createTransport = async (url, apiKey, authMode = "header") => {
319
319
  const globalWebSocket = globalThis.WebSocket;
320
320
  if (typeof globalWebSocket === "function") {
321
321
  if (authMode === "protocol") {
322
- return new globalWebSocket(url, ["token", apiKey]);
322
+ return new globalWebSocket(url, [
323
+ "token",
324
+ apiKey
325
+ ]);
323
326
  }
324
327
  return new globalWebSocket(url, {
325
328
  headers: {
package/dist/types.d.ts CHANGED
@@ -1,26 +1,51 @@
1
- export type DeepgramModel = 'nova-3' | 'nova-2' | 'flux' | 'flux-general-en' | 'flux-general-multi' | (string & {});
2
- export type DeepgramSTTOptions = {
1
+ export type DeepgramFluxModel = "flux" | "flux-general-en" | "flux-general-multi";
2
+ export type DeepgramNovaModel = "nova-3" | "nova-2";
3
+ export type DeepgramModel = DeepgramFluxModel | DeepgramNovaModel;
4
+ type DeepgramSharedOptions = {
3
5
  apiKey: string;
4
- model: DeepgramModel;
5
- authMode?: 'header' | 'protocol';
6
+ authMode?: "header" | "protocol";
6
7
  language?: string;
8
+ keyterm?: string | string[];
9
+ keyterms?: string | string[];
10
+ keepAliveMs?: number;
11
+ connectTimeoutMs?: number;
12
+ tag?: string | string[];
13
+ extra?: Record<string, string>;
14
+ };
15
+ export type DeepgramConversationalOptions = DeepgramSharedOptions & {
16
+ model: DeepgramFluxModel;
17
+ eotThreshold?: number;
18
+ eagerEotThreshold?: number;
19
+ eotTimeoutMs?: number;
20
+ };
21
+ export type DeepgramTranscriptionOptions = DeepgramSharedOptions & {
22
+ model: DeepgramNovaModel;
23
+ interimResults?: boolean;
24
+ endpointing?: number | false;
25
+ utteranceEndMs?: number;
26
+ vadEvents?: boolean;
27
+ diarize?: boolean;
7
28
  punctuate?: boolean;
8
29
  smartFormat?: boolean;
30
+ numerals?: boolean;
31
+ profanityFilter?: boolean;
32
+ redact?: string | string[];
33
+ };
34
+ export type DeepgramSTTOptions = DeepgramConversationalOptions | DeepgramTranscriptionOptions;
35
+ export type DeepgramResolvedSTTOptions = DeepgramSharedOptions & {
36
+ model: DeepgramModel;
9
37
  interimResults?: boolean;
10
38
  endpointing?: number | false;
11
39
  utteranceEndMs?: number;
12
40
  vadEvents?: boolean;
13
41
  diarize?: boolean;
42
+ punctuate?: boolean;
43
+ smartFormat?: boolean;
14
44
  numerals?: boolean;
15
45
  profanityFilter?: boolean;
16
46
  redact?: string | string[];
17
- keyterm?: string | string[];
18
- keyterms?: string | string[];
19
47
  eotThreshold?: number;
20
48
  eagerEotThreshold?: number;
21
49
  eotTimeoutMs?: number;
22
- keepAliveMs?: number;
23
- connectTimeoutMs?: number;
24
- tag?: string | string[];
25
- extra?: Record<string, string>;
26
50
  };
51
+ export {};
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
1
  {
2
- "name": "@absolutejs/voice-deepgram",
3
- "version": "0.0.20-beta.94",
4
- "description": "Deepgram speech-to-text adapter for @absolutejs/voice",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/absolutejs/voice-adapters.git",
8
- "directory": "deepgram"
9
- },
10
- "files": [
11
- "dist",
12
- "README.md"
13
- ],
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
16
- "exports": {
17
- ".": {
18
- "import": "./dist/index.js",
19
- "types": "./dist/index.d.ts"
20
- }
21
- },
22
- "license": "Apache-2.0",
23
- "author": "Alex Kahn",
24
- "scripts": {
25
- "build": "rm -rf dist && bun build ./src/index.ts --outdir dist --target bun --external @absolutejs/voice && tsc --emitDeclarationOnly --project tsconfig.json",
26
- "format": "prettier --write \"./**/*.{js,ts,json,md}\"",
27
- "release": "bun run format && bun run build && bun publish",
28
- "test": "bun test",
29
- "typecheck": "bun run tsc --noEmit"
30
- },
31
- "dependencies": {
32
- "@absolutejs/voice": "0.0.22-beta.474"
33
- },
34
- "devDependencies": {
35
- "@absolutejs/absolute": "0.19.0-beta.648",
36
- "@types/bun": "1.3.9",
37
- "typescript": "^5.9.3"
38
- }
2
+ "name": "@absolutejs/voice-deepgram",
3
+ "version": "0.0.20-beta.95",
4
+ "description": "Deepgram speech-to-text adapter for @absolutejs/voice",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/absolutejs/voice-adapters.git",
8
+ "directory": "deepgram"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "README.md"
13
+ ],
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/index.js",
19
+ "types": "./dist/index.d.ts"
20
+ }
21
+ },
22
+ "license": "Apache-2.0",
23
+ "author": "Alex Kahn",
24
+ "scripts": {
25
+ "build": "rm -rf dist && bun build ./src/index.ts --outdir dist --target bun --external @absolutejs/voice && tsc --emitDeclarationOnly --project tsconfig.json",
26
+ "format": "prettier --write \"./**/*.{js,ts,json,md}\"",
27
+ "release": "bun run format && bun run build && bun publish",
28
+ "test": "bun test",
29
+ "typecheck": "bun run tsc --noEmit"
30
+ },
31
+ "dependencies": {
32
+ "@absolutejs/voice": "0.0.22-beta.474"
33
+ },
34
+ "devDependencies": {
35
+ "@absolutejs/absolute": "0.19.0-beta.648",
36
+ "@types/bun": "1.3.9",
37
+ "typescript": "^5.9.3"
38
+ }
39
39
  }