@deepgram/sdk 1.2.2 → 1.3.1-beta
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/.devcontainer/Dockerfile +16 -0
- package/.devcontainer/devcontainer.json +29 -0
- package/CHANGELOG.md +196 -163
- package/CODE_OF_CONDUCT.md +127 -127
- package/CONTRIBUTING.md +50 -50
- package/LICENSE +21 -21
- package/README.md +151 -151
- package/dist/billing.d.ts +18 -0
- package/dist/billing.js +73 -0
- package/dist/billing.js.map +1 -0
- package/dist/constants/defaultOptions.d.ts +6 -6
- package/dist/constants/defaultOptions.js +9 -9
- package/dist/constants/defaultOptions.js.map +0 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +17 -13
- package/dist/constants/index.js.map +1 -1
- package/dist/enums/alternatives.d.ts +4 -4
- package/dist/enums/alternatives.js +2 -2
- package/dist/enums/alternatives.js.map +0 -0
- package/dist/enums/connectionState.d.ts +6 -6
- package/dist/enums/connectionState.js +10 -10
- package/dist/enums/connectionState.js.map +0 -0
- package/dist/enums/diarization.d.ts +4 -4
- package/dist/enums/diarization.js +2 -2
- package/dist/enums/diarization.js.map +0 -0
- package/dist/enums/index.d.ts +7 -7
- package/dist/enums/index.js +23 -19
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/liveTranscriptionEvents.d.ts +6 -6
- package/dist/enums/liveTranscriptionEvents.js +2 -2
- package/dist/enums/liveTranscriptionEvents.js.map +0 -0
- package/dist/enums/models.d.ts +5 -5
- package/dist/enums/models.js +2 -2
- package/dist/enums/models.js.map +0 -0
- package/dist/enums/punctuation.d.ts +4 -4
- package/dist/enums/punctuation.js +2 -2
- package/dist/enums/punctuation.js.map +0 -0
- package/dist/enums/searchKind.d.ts +4 -4
- package/dist/enums/searchKind.js +2 -2
- package/dist/enums/searchKind.js.map +0 -0
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +17 -13
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/secondsToTimestamp.d.ts +1 -1
- package/dist/helpers/secondsToTimestamp.js +7 -7
- package/dist/helpers/secondsToTimestamp.js.map +0 -0
- package/dist/httpRequest.d.ts +3 -3
- package/dist/httpRequest.js +90 -90
- package/dist/httpRequest.js.map +1 -1
- package/dist/index.d.ts +25 -17
- package/dist/index.js +40 -32
- package/dist/index.js.map +1 -1
- package/dist/invitation.d.ts +29 -0
- package/dist/invitation.js +99 -0
- package/dist/invitation.js.map +1 -0
- package/dist/keys.d.ts +32 -32
- package/dist/keys.js +131 -111
- package/dist/keys.js.map +1 -1
- package/dist/members.d.ts +18 -0
- package/dist/members.js +73 -0
- package/dist/members.js.map +1 -0
- package/dist/projects.d.ts +21 -21
- package/dist/projects.js +81 -81
- package/dist/projects.js.map +1 -1
- package/dist/scopes.d.ts +20 -0
- package/dist/scopes.js +77 -0
- package/dist/scopes.js.map +1 -0
- package/dist/transcription/index.d.ts +18 -18
- package/dist/transcription/index.js +71 -71
- package/dist/transcription/index.js.map +0 -0
- package/dist/transcription/liveTranscription.d.ts +23 -23
- package/dist/transcription/liveTranscription.js +82 -82
- package/dist/transcription/liveTranscription.js.map +1 -1
- package/dist/transcription/preRecordedTranscription.d.ts +8 -8
- package/dist/transcription/preRecordedTranscription.js +113 -113
- package/dist/transcription/preRecordedTranscription.js.map +1 -1
- package/dist/types/balance.d.ts +6 -0
- package/dist/types/balance.js +3 -0
- package/dist/types/balance.js.map +1 -0
- package/dist/types/balanceList.d.ts +4 -0
- package/dist/types/balanceList.js +3 -0
- package/dist/types/balanceList.js.map +1 -0
- package/dist/types/channel.d.ts +25 -25
- package/dist/types/channel.js +2 -2
- package/dist/types/channel.js.map +0 -0
- package/dist/types/createKeyOptions.d.ts +13 -13
- package/dist/types/createKeyOptions.js +2 -2
- package/dist/types/createKeyOptions.js.map +0 -0
- package/dist/types/hit.d.ts +21 -21
- package/dist/types/hit.js +2 -2
- package/dist/types/hit.js.map +0 -0
- package/dist/types/index.d.ts +35 -28
- package/dist/types/index.js +51 -40
- package/dist/types/index.js.map +1 -1
- package/dist/types/invitationList.d.ts +4 -0
- package/dist/types/invitationList.js +3 -0
- package/dist/types/invitationList.js.map +1 -0
- package/dist/types/invitationOptions.d.ts +4 -0
- package/dist/types/invitationOptions.js +3 -0
- package/dist/types/invitationOptions.js.map +1 -0
- package/dist/types/key.d.ts +25 -25
- package/dist/types/key.js +2 -2
- package/dist/types/key.js.map +0 -0
- package/dist/types/keyResponse.d.ts +50 -10
- package/dist/types/keyResponse.js +2 -2
- package/dist/types/keyResponse.js.map +0 -0
- package/dist/types/keyword.d.ts +4 -4
- package/dist/types/keyword.js +2 -2
- package/dist/types/keyword.js.map +0 -0
- package/dist/types/liveTranscriptionOptions.d.ts +148 -148
- package/dist/types/liveTranscriptionOptions.js +2 -2
- package/dist/types/liveTranscriptionOptions.js.map +0 -0
- package/dist/types/liveTranscriptionResponse.d.ts +9 -9
- package/dist/types/liveTranscriptionResponse.js +2 -2
- package/dist/types/liveTranscriptionResponse.js.map +0 -0
- package/dist/types/member.d.ts +7 -6
- package/dist/types/member.js +2 -2
- package/dist/types/member.js.map +0 -0
- package/dist/types/memberList.d.ts +4 -0
- package/dist/types/memberList.js +3 -0
- package/dist/types/memberList.js.map +1 -0
- package/dist/types/message.d.ts +3 -0
- package/dist/types/message.js +3 -0
- package/dist/types/message.js.map +1 -0
- package/dist/types/metadata.d.ts +8 -8
- package/dist/types/metadata.js +2 -2
- package/dist/types/metadata.js.map +0 -0
- package/dist/types/prerecordedTranscriptionOptions.d.ts +126 -126
- package/dist/types/prerecordedTranscriptionOptions.js +2 -2
- package/dist/types/prerecordedTranscriptionOptions.js.map +0 -0
- package/dist/types/prerecordedTranscriptionResponse.d.ts +25 -25
- package/dist/types/prerecordedTranscriptionResponse.js +50 -50
- package/dist/types/prerecordedTranscriptionResponse.js.map +1 -1
- package/dist/types/project.d.ts +17 -17
- package/dist/types/project.js +2 -2
- package/dist/types/project.js.map +0 -0
- package/dist/types/projectPatchResponse.d.ts +6 -6
- package/dist/types/projectPatchResponse.js +2 -2
- package/dist/types/projectPatchResponse.js.map +0 -0
- package/dist/types/projectResponse.d.ts +4 -4
- package/dist/types/projectResponse.js +2 -2
- package/dist/types/projectResponse.js.map +0 -0
- package/dist/types/scopeList.d.ts +3 -0
- package/dist/types/scopeList.js +3 -0
- package/dist/types/scopeList.js.map +1 -0
- package/dist/types/search.d.ts +14 -14
- package/dist/types/search.js +2 -2
- package/dist/types/search.js.map +0 -0
- package/dist/types/transcriptionSource.d.ts +14 -14
- package/dist/types/transcriptionSource.js +2 -2
- package/dist/types/transcriptionSource.js.map +0 -0
- package/dist/types/usageCallback.d.ts +4 -4
- package/dist/types/usageCallback.js +2 -2
- package/dist/types/usageCallback.js.map +0 -0
- package/dist/types/usageField.d.ts +7 -7
- package/dist/types/usageField.js +2 -2
- package/dist/types/usageField.js.map +0 -0
- package/dist/types/usageFieldOptions.d.ts +4 -4
- package/dist/types/usageFieldOptions.js +2 -2
- package/dist/types/usageFieldOptions.js.map +0 -0
- package/dist/types/usageOptions.d.ts +23 -23
- package/dist/types/usageOptions.js +2 -2
- package/dist/types/usageOptions.js.map +0 -0
- package/dist/types/usageRequest.d.ts +11 -11
- package/dist/types/usageRequest.js +2 -2
- package/dist/types/usageRequest.js.map +0 -0
- package/dist/types/usageRequestDetail.d.ts +30 -30
- package/dist/types/usageRequestDetail.js +2 -2
- package/dist/types/usageRequestDetail.js.map +0 -0
- package/dist/types/usageRequestList.d.ts +6 -6
- package/dist/types/usageRequestList.js +2 -2
- package/dist/types/usageRequestList.js.map +0 -0
- package/dist/types/usageRequestListOptions.d.ts +7 -7
- package/dist/types/usageRequestListOptions.js +2 -2
- package/dist/types/usageRequestListOptions.js.map +0 -0
- package/dist/types/usageRequestMessage.d.ts +3 -3
- package/dist/types/usageRequestMessage.js +2 -2
- package/dist/types/usageRequestMessage.js.map +0 -0
- package/dist/types/usageResponse.d.ts +10 -10
- package/dist/types/usageResponse.js +2 -2
- package/dist/types/usageResponse.js.map +0 -0
- package/dist/types/usageResponseDetail.d.ts +6 -6
- package/dist/types/usageResponseDetail.js +2 -2
- package/dist/types/usageResponseDetail.js.map +0 -0
- package/dist/types/utterance.d.ts +39 -39
- package/dist/types/utterance.js +2 -2
- package/dist/types/utterance.js.map +0 -0
- package/dist/types/wordBase.d.ts +8 -8
- package/dist/types/wordBase.js +2 -2
- package/dist/types/wordBase.js.map +0 -0
- package/dist/usage.d.ts +34 -34
- package/dist/usage.js +121 -121
- package/dist/usage.js.map +1 -1
- package/dist/userAgent.d.ts +1 -1
- package/dist/userAgent.js +19 -20
- package/dist/userAgent.js.map +1 -1
- package/package.json +59 -57
package/dist/projects.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Projects = void 0;
|
|
40
|
-
var httpRequest_1 = require("./httpRequest");
|
|
41
|
-
var Projects = /** @class */ (function () {
|
|
42
|
-
function Projects(_credentials, _apiUrl) {
|
|
43
|
-
this._credentials = _credentials;
|
|
44
|
-
this._apiUrl = _apiUrl;
|
|
45
|
-
this.apiPath = "/v1/projects";
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Returns all projects accessible by the API key
|
|
49
|
-
*/
|
|
50
|
-
Projects.prototype.list = function () {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, this.apiPath)];
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves a specific project based on the provided projectId
|
|
59
|
-
* @param projectId Unique identifier of the project to retrieve
|
|
60
|
-
*/
|
|
61
|
-
Projects.prototype.get = function (projectId) {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
-
return __generator(this, function (_a) {
|
|
64
|
-
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, this.apiPath
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Update a specific project
|
|
70
|
-
* @param project project to update
|
|
71
|
-
*/
|
|
72
|
-
Projects.prototype.update = function (project) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
return [2 /*return*/, (0, httpRequest_1._request)("PATCH", this._credentials, this._apiUrl, this.apiPath
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
return Projects;
|
|
80
|
-
}());
|
|
81
|
-
exports.Projects = Projects;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Projects = void 0;
|
|
40
|
+
var httpRequest_1 = require("./httpRequest");
|
|
41
|
+
var Projects = /** @class */ (function () {
|
|
42
|
+
function Projects(_credentials, _apiUrl) {
|
|
43
|
+
this._credentials = _credentials;
|
|
44
|
+
this._apiUrl = _apiUrl;
|
|
45
|
+
this.apiPath = "/v1/projects";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns all projects accessible by the API key
|
|
49
|
+
*/
|
|
50
|
+
Projects.prototype.list = function () {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, this.apiPath)];
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Retrieves a specific project based on the provided projectId
|
|
59
|
+
* @param projectId Unique identifier of the project to retrieve
|
|
60
|
+
*/
|
|
61
|
+
Projects.prototype.get = function (projectId) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId))];
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Update a specific project
|
|
70
|
+
* @param project project to update
|
|
71
|
+
*/
|
|
72
|
+
Projects.prototype.update = function (project) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
+
return __generator(this, function (_a) {
|
|
75
|
+
return [2 /*return*/, (0, httpRequest_1._request)("PATCH", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(project.project_id))];
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return Projects;
|
|
80
|
+
}());
|
|
81
|
+
exports.Projects = Projects;
|
|
82
82
|
//# sourceMappingURL=projects.js.map
|
package/dist/projects.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/projects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,kBAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;OAEG;IACG,uBAAI,GAAV;;;gBACE,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,CACb,EAAC;;;KACH;IAED;;;OAGG;IACG,sBAAG,GAAT,UAAU,SAAiB;;;gBACzB,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/projects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,kBAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;OAEG;IACG,uBAAI,GAAV;;;gBACE,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,CACb,EAAC;;;KACH;IAED;;;OAGG;IACG,sBAAG,GAAT,UAAU,SAAiB;;;gBACzB,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,CAAE,CAC/B,EAAC;;;KACH;IAED;;;OAGG;IACG,yBAAM,GAAZ,UAAa,OAAgB;;;gBAC3B,sBAAO,IAAA,sBAAQ,EACb,OAAO,EACP,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,OAAO,CAAC,UAAU,CAAE,CACxC,EAAC;;;KACH;IACH,eAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,4BAAQ"}
|
package/dist/scopes.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ScopeList, Message } from "./types";
|
|
2
|
+
export declare class Scopes {
|
|
3
|
+
private _credentials;
|
|
4
|
+
private _apiUrl;
|
|
5
|
+
constructor(_credentials: string, _apiUrl: string);
|
|
6
|
+
private apiPath;
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves scopes of the specified member in the specified project.
|
|
9
|
+
* @param projectId Unique identifier of the project
|
|
10
|
+
* @param memberId Unique identifier of the member
|
|
11
|
+
*/
|
|
12
|
+
get(projectId: string, memberId: string): Promise<ScopeList>;
|
|
13
|
+
/**
|
|
14
|
+
* Updates the scope for the specified member in the specified project.
|
|
15
|
+
* @param projectId Unique identifier of the project
|
|
16
|
+
* @param memberId Unique identifier of the member being updated
|
|
17
|
+
* @param scope string of the scope to update to
|
|
18
|
+
*/
|
|
19
|
+
update(projectID: string, memberId: string, scope: string): Promise<Message>;
|
|
20
|
+
}
|
package/dist/scopes.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Scopes = void 0;
|
|
40
|
+
var httpRequest_1 = require("./httpRequest");
|
|
41
|
+
var Scopes = /** @class */ (function () {
|
|
42
|
+
function Scopes(_credentials, _apiUrl) {
|
|
43
|
+
this._credentials = _credentials;
|
|
44
|
+
this._apiUrl = _apiUrl;
|
|
45
|
+
this.apiPath = "/v1/projects";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves scopes of the specified member in the specified project.
|
|
49
|
+
* @param projectId Unique identifier of the project
|
|
50
|
+
* @param memberId Unique identifier of the member
|
|
51
|
+
*/
|
|
52
|
+
Scopes.prototype.get = function (projectId, memberId) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
+
return __generator(this, function (_a) {
|
|
55
|
+
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/members/").concat(memberId, "/scopes"))];
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Updates the scope for the specified member in the specified project.
|
|
61
|
+
* @param projectId Unique identifier of the project
|
|
62
|
+
* @param memberId Unique identifier of the member being updated
|
|
63
|
+
* @param scope string of the scope to update to
|
|
64
|
+
*/
|
|
65
|
+
Scopes.prototype.update = function (projectID, memberId, scope) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
return [2 /*return*/, (0, httpRequest_1._request)("PUT", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectID, "/members/").concat(memberId, "/scopes"), JSON.stringify({
|
|
69
|
+
scope: scope,
|
|
70
|
+
}))];
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
return Scopes;
|
|
75
|
+
}());
|
|
76
|
+
exports.Scopes = Scopes;
|
|
77
|
+
//# sourceMappingURL=scopes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,gBAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;;;OAIG;IACG,oBAAG,GAAT,UAAU,SAAiB,EAAE,QAAgB;;;gBAC3C,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,sBAAY,QAAQ,YAAS,CAC1D,EAAC;;;KACH;IAED;;;;;OAKG;IACG,uBAAM,GAAZ,UACE,SAAiB,EACjB,QAAgB,EAChB,KAAa;;;gBAEb,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,sBAAY,QAAQ,YAAS,EACzD,IAAI,CAAC,SAAS,CAAC;wBACb,KAAK,OAAA;qBACN,CAAC,CACH,EAAC;;;KACH;IACH,aAAC;AAAD,CAAC,AAxCD,IAwCC;AAxCY,wBAAM"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { LiveTranscriptionOptions, PrerecordedTranscriptionOptions, PrerecordedTranscriptionResponse, TranscriptionSource } from "../types";
|
|
2
|
-
import { LiveTranscription } from "./liveTranscription";
|
|
3
|
-
export declare class Transcriber {
|
|
4
|
-
private _credentials;
|
|
5
|
-
private _apiUrl;
|
|
6
|
-
constructor(_credentials: string, _apiUrl: string);
|
|
7
|
-
/**
|
|
8
|
-
* Transcribes prerecorded audio from a file or buffer
|
|
9
|
-
* @param source Url or Buffer of file to transcribe
|
|
10
|
-
* @param options Options to modify transcriptions
|
|
11
|
-
*/
|
|
12
|
-
preRecorded(source: TranscriptionSource, options?: PrerecordedTranscriptionOptions): Promise<PrerecordedTranscriptionResponse>;
|
|
13
|
-
/**
|
|
14
|
-
* Opens a websocket to Deepgram's API for live transcriptions
|
|
15
|
-
* @param options Options to modify transcriptions
|
|
16
|
-
*/
|
|
17
|
-
live(options?: LiveTranscriptionOptions): LiveTranscription;
|
|
18
|
-
}
|
|
1
|
+
import { LiveTranscriptionOptions, PrerecordedTranscriptionOptions, PrerecordedTranscriptionResponse, TranscriptionSource } from "../types";
|
|
2
|
+
import { LiveTranscription } from "./liveTranscription";
|
|
3
|
+
export declare class Transcriber {
|
|
4
|
+
private _credentials;
|
|
5
|
+
private _apiUrl;
|
|
6
|
+
constructor(_credentials: string, _apiUrl: string);
|
|
7
|
+
/**
|
|
8
|
+
* Transcribes prerecorded audio from a file or buffer
|
|
9
|
+
* @param source Url or Buffer of file to transcribe
|
|
10
|
+
* @param options Options to modify transcriptions
|
|
11
|
+
*/
|
|
12
|
+
preRecorded(source: TranscriptionSource, options?: PrerecordedTranscriptionOptions): Promise<PrerecordedTranscriptionResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Opens a websocket to Deepgram's API for live transcriptions
|
|
15
|
+
* @param options Options to modify transcriptions
|
|
16
|
+
*/
|
|
17
|
+
live(options?: LiveTranscriptionOptions): LiveTranscription;
|
|
18
|
+
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Transcriber = void 0;
|
|
40
|
-
var liveTranscription_1 = require("./liveTranscription");
|
|
41
|
-
var preRecordedTranscription_1 = require("./preRecordedTranscription");
|
|
42
|
-
var Transcriber = /** @class */ (function () {
|
|
43
|
-
function Transcriber(_credentials, _apiUrl) {
|
|
44
|
-
this._credentials = _credentials;
|
|
45
|
-
this._apiUrl = _apiUrl;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Transcribes prerecorded audio from a file or buffer
|
|
49
|
-
* @param source Url or Buffer of file to transcribe
|
|
50
|
-
* @param options Options to modify transcriptions
|
|
51
|
-
*/
|
|
52
|
-
Transcriber.prototype.preRecorded = function (source, options) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
-
return __generator(this, function (_a) {
|
|
55
|
-
switch (_a.label) {
|
|
56
|
-
case 0: return [4 /*yield*/, (0, preRecordedTranscription_1.preRecordedTranscription)(this._credentials, this._apiUrl || "", source, options)];
|
|
57
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Opens a websocket to Deepgram's API for live transcriptions
|
|
64
|
-
* @param options Options to modify transcriptions
|
|
65
|
-
*/
|
|
66
|
-
Transcriber.prototype.live = function (options) {
|
|
67
|
-
return new liveTranscription_1.LiveTranscription(this._credentials, this._apiUrl || "", options);
|
|
68
|
-
};
|
|
69
|
-
return Transcriber;
|
|
70
|
-
}());
|
|
71
|
-
exports.Transcriber = Transcriber;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Transcriber = void 0;
|
|
40
|
+
var liveTranscription_1 = require("./liveTranscription");
|
|
41
|
+
var preRecordedTranscription_1 = require("./preRecordedTranscription");
|
|
42
|
+
var Transcriber = /** @class */ (function () {
|
|
43
|
+
function Transcriber(_credentials, _apiUrl) {
|
|
44
|
+
this._credentials = _credentials;
|
|
45
|
+
this._apiUrl = _apiUrl;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Transcribes prerecorded audio from a file or buffer
|
|
49
|
+
* @param source Url or Buffer of file to transcribe
|
|
50
|
+
* @param options Options to modify transcriptions
|
|
51
|
+
*/
|
|
52
|
+
Transcriber.prototype.preRecorded = function (source, options) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
+
return __generator(this, function (_a) {
|
|
55
|
+
switch (_a.label) {
|
|
56
|
+
case 0: return [4 /*yield*/, (0, preRecordedTranscription_1.preRecordedTranscription)(this._credentials, this._apiUrl || "", source, options)];
|
|
57
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Opens a websocket to Deepgram's API for live transcriptions
|
|
64
|
+
* @param options Options to modify transcriptions
|
|
65
|
+
*/
|
|
66
|
+
Transcriber.prototype.live = function (options) {
|
|
67
|
+
return new liveTranscription_1.LiveTranscription(this._credentials, this._apiUrl || "", options);
|
|
68
|
+
};
|
|
69
|
+
return Transcriber;
|
|
70
|
+
}());
|
|
71
|
+
exports.Transcriber = Transcriber;
|
|
72
72
|
//# sourceMappingURL=index.js.map
|
|
File without changes
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import EventEmitter from "events";
|
|
3
|
-
import { ConnectionState } from "../enums";
|
|
4
|
-
import { LiveTranscriptionOptions } from "../types";
|
|
5
|
-
export declare class LiveTranscription extends EventEmitter {
|
|
6
|
-
private _socket;
|
|
7
|
-
constructor(credentials: string, apiUrl: string, options?: LiveTranscriptionOptions);
|
|
8
|
-
private _bindSocketEvents;
|
|
9
|
-
/**
|
|
10
|
-
* Returns the ready state of the websocket connection
|
|
11
|
-
*/
|
|
12
|
-
getReadyState(): ConnectionState;
|
|
13
|
-
/**
|
|
14
|
-
* Sends data to the Deepgram API via websocket connection
|
|
15
|
-
* @param data Audio data to send to Deepgram
|
|
16
|
-
*/
|
|
17
|
-
send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
|
|
18
|
-
/**
|
|
19
|
-
* Denote that you are finished sending audio and close
|
|
20
|
-
* the websocket connection when transcription is finished
|
|
21
|
-
*/
|
|
22
|
-
finish(): void;
|
|
23
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import EventEmitter from "events";
|
|
3
|
+
import { ConnectionState } from "../enums";
|
|
4
|
+
import { LiveTranscriptionOptions } from "../types";
|
|
5
|
+
export declare class LiveTranscription extends EventEmitter {
|
|
6
|
+
private _socket;
|
|
7
|
+
constructor(credentials: string, apiUrl: string, options?: LiveTranscriptionOptions);
|
|
8
|
+
private _bindSocketEvents;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the ready state of the websocket connection
|
|
11
|
+
*/
|
|
12
|
+
getReadyState(): ConnectionState;
|
|
13
|
+
/**
|
|
14
|
+
* Sends data to the Deepgram API via websocket connection
|
|
15
|
+
* @param data Audio data to send to Deepgram
|
|
16
|
+
*/
|
|
17
|
+
send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
|
|
18
|
+
/**
|
|
19
|
+
* Denote that you are finished sending audio and close
|
|
20
|
+
* the websocket connection when transcription is finished
|
|
21
|
+
*/
|
|
22
|
+
finish(): void;
|
|
23
|
+
}
|