@dolbyio/dolbyio-rest-apis-client 1.1.0 → 2.1.2
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 +19 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/httpHelpers.d.ts +6 -6
- package/dist/internal/httpHelpers.js +7 -7
- package/dist/internal/httpHelpers.js.map +1 -1
- package/dist/media/analyze.d.ts +43 -0
- package/dist/media/analyze.js +82 -0
- package/dist/media/analyze.js.map +1 -0
- package/dist/media/analyzeSpeech.d.ts +37 -0
- package/dist/media/analyzeSpeech.js +76 -0
- package/dist/media/analyzeSpeech.js.map +1 -0
- package/dist/media/diagnose.d.ts +39 -0
- package/dist/media/diagnose.js +78 -0
- package/dist/media/diagnose.js.map +1 -0
- package/dist/media/enhance.d.ts +34 -0
- package/dist/media/enhance.js +73 -0
- package/dist/media/enhance.js.map +1 -0
- package/dist/media/index.d.ts +11 -0
- package/dist/media/index.js +47 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/internal/httpHelpers.d.ts +46 -0
- package/dist/media/internal/httpHelpers.js +114 -0
- package/dist/media/internal/httpHelpers.js.map +1 -0
- package/dist/media/io.d.ts +32 -0
- package/dist/media/io.js +74 -0
- package/dist/media/io.js.map +1 -0
- package/dist/media/jobs.d.ts +35 -0
- package/dist/media/jobs.js +116 -0
- package/dist/media/jobs.js.map +1 -0
- package/dist/media/mastering.d.ts +70 -0
- package/dist/media/mastering.js +136 -0
- package/dist/media/mastering.js.map +1 -0
- package/dist/media/platform.d.ts +15 -0
- package/dist/media/platform.js +44 -0
- package/dist/media/platform.js.map +1 -0
- package/dist/media/transcode.d.ts +30 -0
- package/dist/media/transcode.js +69 -0
- package/dist/media/transcode.js.map +1 -0
- package/dist/media/types/analyze.d.ts +6 -0
- package/dist/media/types/analyze.js +3 -0
- package/dist/media/types/analyze.js.map +1 -0
- package/dist/media/types/analyzeSpeech.d.ts +6 -0
- package/dist/media/types/analyzeSpeech.js +3 -0
- package/dist/media/types/analyzeSpeech.js.map +1 -0
- package/dist/media/types/diagnose.d.ts +6 -0
- package/dist/media/types/diagnose.js +3 -0
- package/dist/media/types/diagnose.js.map +1 -0
- package/dist/media/types/enhance.d.ts +6 -0
- package/dist/media/types/enhance.js +3 -0
- package/dist/media/types/enhance.js.map +1 -0
- package/dist/media/types/jobResults.d.ts +12 -0
- package/dist/media/types/jobResults.js +3 -0
- package/dist/media/types/jobResults.js.map +1 -0
- package/dist/media/types/jobs.d.ts +29 -0
- package/dist/media/types/jobs.js +3 -0
- package/dist/media/types/jobs.js.map +1 -0
- package/dist/media/types/jwtToken.d.ts +6 -0
- package/dist/media/types/jwtToken.js +3 -0
- package/dist/media/types/jwtToken.js.map +1 -0
- package/dist/media/types/mastering.d.ts +13 -0
- package/dist/media/types/mastering.js +3 -0
- package/dist/media/types/mastering.js.map +1 -0
- package/dist/media/types/transcode.d.ts +6 -0
- package/dist/media/types/transcode.js +3 -0
- package/dist/media/types/transcode.js.map +1 -0
- package/dist/media/types/webhooks.d.ts +21 -0
- package/dist/media/types/webhooks.js +3 -0
- package/dist/media/types/webhooks.js.map +1 -0
- package/dist/media/webhooks.d.ts +46 -0
- package/dist/media/webhooks.js +129 -0
- package/dist/media/webhooks.js.map +1 -0
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Dolby.io REST APIs
|
|
2
2
|
|
|
3
|
-
Node.JS wrapper for the dolby.io REST [Communications](https://docs.dolby.io/communications-apis/reference/authentication-api) APIs.
|
|
3
|
+
Node.JS wrapper for the dolby.io REST [Communications](https://docs.dolby.io/communications-apis/reference/authentication-api) and [Media](https://docs.dolby.io/media-processing/reference/media-enhance-overview) APIs.
|
|
4
4
|
|
|
5
5
|
## Install this project
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Run the npm command to install the package `@dolbyio/dolbyio-rest-apis-client` i
|
|
|
10
10
|
npm install @dolbyio/dolbyio-rest-apis-client --save
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
## Examples
|
|
13
|
+
## Communications Examples
|
|
14
14
|
|
|
15
15
|
### Authenticate
|
|
16
16
|
|
|
@@ -73,6 +73,23 @@ const conference = await dolbyio.communications.conference.createConference(jwt,
|
|
|
73
73
|
console.log(`Conference created: ${conference.conferenceId}`);
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
## Media Examples
|
|
77
|
+
|
|
78
|
+
### Authenticate
|
|
79
|
+
|
|
80
|
+
To get an access token, use the following code:
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
const dolbyio = require('@dolbyio/dolbyio-rest-apis-client');
|
|
84
|
+
|
|
85
|
+
const API_KEY = 'YOUR_API_KEY';
|
|
86
|
+
const API_SECRET = 'YOUR_API_SECRET';
|
|
87
|
+
|
|
88
|
+
const at = await dolbyio.media.platform.getAccessToken(API_KEY, API_SECRET);
|
|
89
|
+
|
|
90
|
+
console.log(`Access Token: ${at.access_token}`);
|
|
91
|
+
```
|
|
92
|
+
|
|
76
93
|
## Build this project
|
|
77
94
|
|
|
78
95
|
To build the `dist` folder, run the command:
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -23,7 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.communications = void 0;
|
|
26
|
+
exports.media = exports.communications = void 0;
|
|
27
27
|
const communications = __importStar(require("./communications"));
|
|
28
28
|
exports.communications = communications;
|
|
29
|
+
const media = __importStar(require("./media"));
|
|
30
|
+
exports.media = media;
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AAG1C,wCAAc;AAFvB,+CAAiC;AAER,sBAAK"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import
|
|
2
|
+
import coreHttp from 'http';
|
|
3
3
|
export interface RequestOptions {
|
|
4
4
|
hostname: string;
|
|
5
5
|
path: string;
|
|
6
6
|
params?: NodeJS.Dict<string>;
|
|
7
|
-
headers:
|
|
7
|
+
headers: coreHttp.OutgoingHttpHeaders;
|
|
8
8
|
body?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
@@ -14,7 +14,7 @@ export interface RequestOptions {
|
|
|
14
14
|
*
|
|
15
15
|
* @returns A JSON payload object through a Promise.
|
|
16
16
|
*/
|
|
17
|
-
export declare const sendGet: (options: RequestOptions) => Promise<
|
|
17
|
+
export declare const sendGet: (options: RequestOptions) => Promise<any>;
|
|
18
18
|
/**
|
|
19
19
|
* Sends a POST request.
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ export declare const sendGet: (options: RequestOptions) => Promise<unknown>;
|
|
|
22
22
|
*
|
|
23
23
|
* @returns A JSON payload object through a Promise.
|
|
24
24
|
*/
|
|
25
|
-
export declare const sendPost: (options: RequestOptions) => Promise<
|
|
25
|
+
export declare const sendPost: (options: RequestOptions) => Promise<any>;
|
|
26
26
|
/**
|
|
27
27
|
* Sends a PUT request.
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ export declare const sendPost: (options: RequestOptions) => Promise<unknown>;
|
|
|
30
30
|
*
|
|
31
31
|
* @returns A JSON payload object through a Promise.
|
|
32
32
|
*/
|
|
33
|
-
export declare const sendPut: (options: RequestOptions) => Promise<
|
|
33
|
+
export declare const sendPut: (options: RequestOptions) => Promise<any>;
|
|
34
34
|
/**
|
|
35
35
|
* Sends a DELETE request.
|
|
36
36
|
*
|
|
@@ -38,7 +38,7 @@ export declare const sendPut: (options: RequestOptions) => Promise<unknown>;
|
|
|
38
38
|
*
|
|
39
39
|
* @returns A JSON payload object through a Promise.
|
|
40
40
|
*/
|
|
41
|
-
export declare const sendDelete: (options: RequestOptions) => Promise<
|
|
41
|
+
export declare const sendDelete: (options: RequestOptions) => Promise<any>;
|
|
42
42
|
/**
|
|
43
43
|
* Download a file.
|
|
44
44
|
*
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.download = exports.sendDelete = exports.sendPut = exports.sendPost = exports.sendGet = void 0;
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
|
-
const
|
|
17
|
+
const follow_redirects_1 = require("follow-redirects");
|
|
18
18
|
const url_1 = require("url");
|
|
19
19
|
/**
|
|
20
20
|
* Sends a POST request.
|
|
@@ -24,7 +24,7 @@ const url_1 = require("url");
|
|
|
24
24
|
* @returns A JSON payload object through a Promise.
|
|
25
25
|
*/
|
|
26
26
|
const sendRequest = (options) => {
|
|
27
|
-
return new Promise(
|
|
27
|
+
return new Promise((resolve, reject) => {
|
|
28
28
|
let path = options.path;
|
|
29
29
|
if (options.params && Object.keys(options.params).length > 0) {
|
|
30
30
|
const searchParams = new url_1.URLSearchParams(options.params);
|
|
@@ -37,8 +37,8 @@ const sendRequest = (options) => {
|
|
|
37
37
|
method: options.method,
|
|
38
38
|
headers: options.headers,
|
|
39
39
|
};
|
|
40
|
-
const req =
|
|
41
|
-
console.log(`[${
|
|
40
|
+
const req = follow_redirects_1.https.request(opts, (res) => {
|
|
41
|
+
console.log(`[${opts.method}] ${res.statusCode} - https://${opts.hostname}${opts.path}`);
|
|
42
42
|
let data = '';
|
|
43
43
|
res.on('data', (chunk) => {
|
|
44
44
|
data = data + chunk.toString();
|
|
@@ -125,7 +125,7 @@ exports.sendDelete = sendDelete;
|
|
|
125
125
|
*/
|
|
126
126
|
const download = (filepath, options) => {
|
|
127
127
|
const sendRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
128
|
-
return new Promise(
|
|
128
|
+
return new Promise((resolve, reject) => {
|
|
129
129
|
let path = sendRequestOptions.path;
|
|
130
130
|
if (sendRequestOptions.params && Object.keys(sendRequestOptions.params).length > 0) {
|
|
131
131
|
const searchParams = new url_1.URLSearchParams(sendRequestOptions.params);
|
|
@@ -138,8 +138,8 @@ const download = (filepath, options) => {
|
|
|
138
138
|
method: sendRequestOptions.method,
|
|
139
139
|
headers: sendRequestOptions.headers,
|
|
140
140
|
};
|
|
141
|
-
const req =
|
|
142
|
-
console.log(`[${
|
|
141
|
+
const req = follow_redirects_1.https.request(opts, (res) => {
|
|
142
|
+
console.log(`[${opts.method}] ${res.statusCode} - https://${opts.hostname}${opts.path}`);
|
|
143
143
|
const fileStream = fs_1.default.createWriteStream(filepath, { autoClose: true });
|
|
144
144
|
fileStream.on('finish', () => {
|
|
145
145
|
resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpHelpers.js","sourceRoot":"","sources":["../../src/internal/httpHelpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,
|
|
1
|
+
{"version":3,"file":"httpHelpers.js","sourceRoot":"","sources":["../../src/internal/httpHelpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,uDAAyC;AAGzC,6BAAsC;AActC;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,CAAC,OAA2B,EAAE,EAAE;IAChD,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACxB,IAAI,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG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E,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;gBACzB,OAAO,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC7B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACrB,MAAM,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,MAAM,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACzC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SAC3B;QAED,GAAG,CAAC,GAAG,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAjDW,QAAA,QAAQ,YAiDnB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { AnalyzeJob } from './types/analyze';
|
|
3
|
+
/**
|
|
4
|
+
* Starts analyzing to learn about your media.
|
|
5
|
+
*
|
|
6
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
9
|
+
*
|
|
10
|
+
* There are additional optional parameters that can be provided to identify the type of content and additional loudness or validation requirements. See the samples for examples of what requests and responses look like.
|
|
11
|
+
*
|
|
12
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-post
|
|
13
|
+
*
|
|
14
|
+
* Beta API
|
|
15
|
+
* This API is being made available as an early preview.
|
|
16
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
17
|
+
* https://dolby.io/contact
|
|
18
|
+
*
|
|
19
|
+
* Content Length
|
|
20
|
+
*
|
|
21
|
+
* Media content with duration less than 2 seconds will not be processed. The API will return an ERROR in this case.
|
|
22
|
+
*
|
|
23
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
24
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-analyze-post
|
|
25
|
+
*
|
|
26
|
+
* @returns The job identifier through a `Promise`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets Analyze Status.
|
|
31
|
+
*
|
|
32
|
+
* For a given job_id, this method will check the job status.
|
|
33
|
+
*
|
|
34
|
+
* When `status==Success` you'll be able to retrieve your result from the output location you provided in the original POST.
|
|
35
|
+
*
|
|
36
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-get
|
|
37
|
+
*
|
|
38
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
39
|
+
* @param jobId Identifier of the job to retrieve.
|
|
40
|
+
*
|
|
41
|
+
* @returns The `AnalyzeJob` object through a `Promise`.
|
|
42
|
+
*/
|
|
43
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<AnalyzeJob>;
|
|
@@ -0,0 +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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getResults = exports.start = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts analyzing to learn about your media.
|
|
16
|
+
*
|
|
17
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
18
|
+
*
|
|
19
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
20
|
+
*
|
|
21
|
+
* There are additional optional parameters that can be provided to identify the type of content and additional loudness or validation requirements. See the samples for examples of what requests and responses look like.
|
|
22
|
+
*
|
|
23
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-post
|
|
24
|
+
*
|
|
25
|
+
* Beta API
|
|
26
|
+
* This API is being made available as an early preview.
|
|
27
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
28
|
+
* https://dolby.io/contact
|
|
29
|
+
*
|
|
30
|
+
* Content Length
|
|
31
|
+
*
|
|
32
|
+
* Media content with duration less than 2 seconds will not be processed. The API will return an ERROR in this case.
|
|
33
|
+
*
|
|
34
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
35
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-analyze-post
|
|
36
|
+
*
|
|
37
|
+
* @returns The job identifier through a `Promise`.
|
|
38
|
+
*/
|
|
39
|
+
const start = (auth, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
hostname: 'api.dolby.com',
|
|
42
|
+
path: '/media/analyze',
|
|
43
|
+
headers: {},
|
|
44
|
+
auth,
|
|
45
|
+
body: jobContent,
|
|
46
|
+
};
|
|
47
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
48
|
+
if (response.hasOwnProperty('job_id')) {
|
|
49
|
+
return response['job_id'];
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
});
|
|
53
|
+
exports.start = start;
|
|
54
|
+
/**
|
|
55
|
+
* Gets Analyze Status.
|
|
56
|
+
*
|
|
57
|
+
* For a given job_id, this method will check the job status.
|
|
58
|
+
*
|
|
59
|
+
* When `status==Success` you'll be able to retrieve your result from the output location you provided in the original POST.
|
|
60
|
+
*
|
|
61
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-get
|
|
62
|
+
*
|
|
63
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
64
|
+
* @param jobId Identifier of the job to retrieve.
|
|
65
|
+
*
|
|
66
|
+
* @returns The `AnalyzeJob` object through a `Promise`.
|
|
67
|
+
*/
|
|
68
|
+
const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
|
+
const requestOptions = {
|
|
70
|
+
hostname: 'api.dolby.com',
|
|
71
|
+
path: '/media/analyze',
|
|
72
|
+
params: {
|
|
73
|
+
job_id: jobId,
|
|
74
|
+
},
|
|
75
|
+
headers: {},
|
|
76
|
+
auth,
|
|
77
|
+
};
|
|
78
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
79
|
+
return response;
|
|
80
|
+
});
|
|
81
|
+
exports.getResults = getResults;
|
|
82
|
+
//# sourceMappingURL=analyze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/media/analyze.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACI,MAAM,KAAK,GAAG,CAAO,IAAuB,EAAE,UAAkB,EAA0B,EAAE;IAC/F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,EAAE;QACX,IAAI;QACJ,IAAI,EAAE,UAAU;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,cAAc,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA,CAAC;AAfW,QAAA,KAAK,SAehB;AAEF;;;;;;;;;;;;;GAaG;AACI,MAAM,UAAU,GAAG,CAAO,IAAuB,EAAE,KAAa,EAAuB,EAAE;IAC5F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAAsB,CAAC;AAClC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { AnalyzeSpeechJob } from './types/analyzeSpeech';
|
|
3
|
+
/**
|
|
4
|
+
* Starts analyzing to learn about speech in your media.
|
|
5
|
+
*
|
|
6
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
9
|
+
*
|
|
10
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-post
|
|
11
|
+
*
|
|
12
|
+
* Beta API
|
|
13
|
+
* This API is being made available as an early preview.
|
|
14
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
15
|
+
* https://dolby.io/contact
|
|
16
|
+
*
|
|
17
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
18
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-analyze-speech-post
|
|
19
|
+
*
|
|
20
|
+
* @returns The job identifier through a `Promise`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets Speech Analytics Status.
|
|
25
|
+
*
|
|
26
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
27
|
+
*
|
|
28
|
+
* When `status` is `Success`, you'll be able to retrieve your result from the `output` location you provided in the original `POST`.
|
|
29
|
+
*
|
|
30
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-get
|
|
31
|
+
*
|
|
32
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
33
|
+
* @param jobId Identifier of the job to retrieve.
|
|
34
|
+
*
|
|
35
|
+
* @returns The `AnalyzeSpeechJob` object through a `Promise`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<AnalyzeSpeechJob>;
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getResults = exports.start = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts analyzing to learn about speech in your media.
|
|
16
|
+
*
|
|
17
|
+
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
|
|
18
|
+
*
|
|
19
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
20
|
+
*
|
|
21
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-post
|
|
22
|
+
*
|
|
23
|
+
* Beta API
|
|
24
|
+
* This API is being made available as an early preview.
|
|
25
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
26
|
+
* https://dolby.io/contact
|
|
27
|
+
*
|
|
28
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
29
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-analyze-speech-post
|
|
30
|
+
*
|
|
31
|
+
* @returns The job identifier through a `Promise`.
|
|
32
|
+
*/
|
|
33
|
+
const start = (auth, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const requestOptions = {
|
|
35
|
+
hostname: 'api.dolby.com',
|
|
36
|
+
path: '/media/analyze/speech',
|
|
37
|
+
headers: {},
|
|
38
|
+
auth,
|
|
39
|
+
body: jobContent,
|
|
40
|
+
};
|
|
41
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
42
|
+
if (response.hasOwnProperty('job_id')) {
|
|
43
|
+
return response['job_id'];
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
});
|
|
47
|
+
exports.start = start;
|
|
48
|
+
/**
|
|
49
|
+
* Gets Speech Analytics Status.
|
|
50
|
+
*
|
|
51
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
52
|
+
*
|
|
53
|
+
* When `status` is `Success`, you'll be able to retrieve your result from the `output` location you provided in the original `POST`.
|
|
54
|
+
*
|
|
55
|
+
* @link https://docs.dolby.io/media-apis/reference/media-analyze-speech-get
|
|
56
|
+
*
|
|
57
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
58
|
+
* @param jobId Identifier of the job to retrieve.
|
|
59
|
+
*
|
|
60
|
+
* @returns The `AnalyzeSpeechJob` object through a `Promise`.
|
|
61
|
+
*/
|
|
62
|
+
const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
+
const requestOptions = {
|
|
64
|
+
hostname: 'api.dolby.com',
|
|
65
|
+
path: '/media/analyze/speech',
|
|
66
|
+
params: {
|
|
67
|
+
job_id: jobId,
|
|
68
|
+
},
|
|
69
|
+
headers: {},
|
|
70
|
+
auth,
|
|
71
|
+
};
|
|
72
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
73
|
+
return response;
|
|
74
|
+
});
|
|
75
|
+
exports.getResults = getResults;
|
|
76
|
+
//# sourceMappingURL=analyzeSpeech.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzeSpeech.js","sourceRoot":"","sources":["../../src/media/analyzeSpeech.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,KAAK,GAAG,CAAO,IAAuB,EAAE,UAAkB,EAA0B,EAAE;IAC/F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,EAAE;QACX,IAAI;QACJ,IAAI,EAAE,UAAU;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,cAAc,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA,CAAC;AAfW,QAAA,KAAK,SAehB;AAEF;;;;;;;;;;;;;GAaG;AACI,MAAM,UAAU,GAAG,CAAO,IAAuB,EAAE,KAAa,EAA6B,EAAE;IAClG,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAA4B,CAAC;AACxC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { DiagnoseJob } from './types/diagnose';
|
|
3
|
+
/**
|
|
4
|
+
* Starts diagnosing to learn about the audio quality of your media.
|
|
5
|
+
*
|
|
6
|
+
* The `input` location of your source media file is required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
9
|
+
*
|
|
10
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-post
|
|
11
|
+
*
|
|
12
|
+
* Beta API
|
|
13
|
+
* This API is being made available as an early preview.
|
|
14
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
15
|
+
* https://dolby.io/contact
|
|
16
|
+
*
|
|
17
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
18
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-diagnose-post
|
|
19
|
+
*
|
|
20
|
+
* @returns The job identifier through a `Promise`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets Diagnose Results.
|
|
25
|
+
*
|
|
26
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
27
|
+
*
|
|
28
|
+
* The `progress` attribute provides a percentage of job progress.
|
|
29
|
+
*
|
|
30
|
+
* If the `status` is Success then the json result will be returned in the response.
|
|
31
|
+
*
|
|
32
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-get
|
|
33
|
+
*
|
|
34
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
35
|
+
* @param jobId Identifier of the job to retrieve.
|
|
36
|
+
*
|
|
37
|
+
* @returns The `DiagnoseJob` object through a `Promise`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<DiagnoseJob>;
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getResults = exports.start = void 0;
|
|
13
|
+
const httpHelpers_1 = require("./internal/httpHelpers");
|
|
14
|
+
/**
|
|
15
|
+
* Starts diagnosing to learn about the audio quality of your media.
|
|
16
|
+
*
|
|
17
|
+
* The `input` location of your source media file is required.
|
|
18
|
+
*
|
|
19
|
+
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
|
|
20
|
+
*
|
|
21
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-post
|
|
22
|
+
*
|
|
23
|
+
* Beta API
|
|
24
|
+
* This API is being made available as an early preview.
|
|
25
|
+
* If you have feedback on how you'd like to use the API please reach out to share your feedback with our team.
|
|
26
|
+
* https://dolby.io/contact
|
|
27
|
+
*
|
|
28
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
29
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-diagnose-post
|
|
30
|
+
*
|
|
31
|
+
* @returns The job identifier through a `Promise`.
|
|
32
|
+
*/
|
|
33
|
+
const start = (auth, jobContent) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const requestOptions = {
|
|
35
|
+
hostname: 'api.dolby.com',
|
|
36
|
+
path: '/media/diagnose',
|
|
37
|
+
headers: {},
|
|
38
|
+
auth,
|
|
39
|
+
body: jobContent,
|
|
40
|
+
};
|
|
41
|
+
const response = yield (0, httpHelpers_1.sendPost)(requestOptions);
|
|
42
|
+
if (response.hasOwnProperty('job_id')) {
|
|
43
|
+
return response['job_id'];
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
});
|
|
47
|
+
exports.start = start;
|
|
48
|
+
/**
|
|
49
|
+
* Gets Diagnose Results.
|
|
50
|
+
*
|
|
51
|
+
* For a given job_id, this method will check if the processing task has completed.
|
|
52
|
+
*
|
|
53
|
+
* The `progress` attribute provides a percentage of job progress.
|
|
54
|
+
*
|
|
55
|
+
* If the `status` is Success then the json result will be returned in the response.
|
|
56
|
+
*
|
|
57
|
+
* @link https://docs.dolby.io/media-apis/reference/media-diagnose-get
|
|
58
|
+
*
|
|
59
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
60
|
+
* @param jobId Identifier of the job to retrieve.
|
|
61
|
+
*
|
|
62
|
+
* @returns The `DiagnoseJob` object through a `Promise`.
|
|
63
|
+
*/
|
|
64
|
+
const getResults = (auth, jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
+
const requestOptions = {
|
|
66
|
+
hostname: 'api.dolby.com',
|
|
67
|
+
path: '/media/diagnose',
|
|
68
|
+
params: {
|
|
69
|
+
job_id: jobId,
|
|
70
|
+
},
|
|
71
|
+
headers: {},
|
|
72
|
+
auth,
|
|
73
|
+
};
|
|
74
|
+
const response = yield (0, httpHelpers_1.sendGet)(requestOptions);
|
|
75
|
+
return response;
|
|
76
|
+
});
|
|
77
|
+
exports.getResults = getResults;
|
|
78
|
+
//# sourceMappingURL=diagnose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../src/media/diagnose.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA+E;AAI/E;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,KAAK,GAAG,CAAO,IAAuB,EAAE,UAAkB,EAA0B,EAAE;IAC/F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,EAAE;QACX,IAAI;QACJ,IAAI,EAAE,UAAU;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAQ,EAAC,cAAc,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA,CAAC;AAfW,QAAA,KAAK,SAehB;AAEF;;;;;;;;;;;;;;;GAeG;AACI,MAAM,UAAU,GAAG,CAAO,IAAuB,EAAE,KAAa,EAAwB,EAAE;IAC7F,MAAM,cAAc,GAAuB;QACvC,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE;YACJ,MAAM,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,EAAE;QACX,IAAI;KACP,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAO,EAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,QAAuB,CAAC;AACnC,CAAC,CAAA,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import JwtToken from './types/jwtToken';
|
|
2
|
+
import { EnhanceJob } from './types/enhance';
|
|
3
|
+
/**
|
|
4
|
+
* Starts enhancing to improve your media.
|
|
5
|
+
*
|
|
6
|
+
* The input location for your source media file as well as the output location for the processed result are required.
|
|
7
|
+
*
|
|
8
|
+
* This is an asynchronous operation so you will receive a job_id where you can retrieve the results when enhancement is complete.
|
|
9
|
+
*
|
|
10
|
+
* There are additional optional parameters that can be provided to control and select the type of enhancements made. See the samples for some examples of what requests and responses look like.
|
|
11
|
+
*
|
|
12
|
+
* @link https://docs.dolby.io/media-apis/reference/media-enhance-post
|
|
13
|
+
*
|
|
14
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
15
|
+
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-enhance-post
|
|
16
|
+
*
|
|
17
|
+
* @returns The job identifier through a `Promise`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const start: (auth: string | JwtToken, jobContent: string) => Promise<string | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Gets Enhance Results
|
|
22
|
+
*
|
|
23
|
+
* For a given job_id, this method will check if the processing task has completed and return the enhanced results.
|
|
24
|
+
*
|
|
25
|
+
* When the status is Success you'll be able to retrieve your result from the output location you provided in the original POST.
|
|
26
|
+
*
|
|
27
|
+
* @link https://docs.dolby.io/media-apis/reference/media-enhance-get
|
|
28
|
+
*
|
|
29
|
+
* @param auth Your Dolby.io Media API Key or a JWT Token.
|
|
30
|
+
* @param jobId Identifier of the job to retrieve.
|
|
31
|
+
*
|
|
32
|
+
* @returns The `EnhanceJob` object through a `Promise`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const getResults: (auth: string | JwtToken, jobId: string) => Promise<EnhanceJob>;
|