@deepgram/sdk 2.1.1 → 2.3.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 +251 -360
- package/dist/billing.d.ts +4 -4
- package/dist/helpers/secondsToTimestamp.d.ts +1 -1
- package/dist/httpRequest.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/invitation.d.ts +5 -5
- package/dist/keys.d.ts +3 -3
- package/dist/members.d.ts +5 -5
- package/dist/projects.d.ts +8 -8
- package/dist/scopes.d.ts +5 -5
- package/dist/transcription/index.d.ts +5 -5
- package/dist/transcription/liveTranscription.d.ts +1 -0
- package/dist/transcription/preRecordedTranscription.d.ts +1 -1
- package/dist/types/alternatives.d.ts +1 -1
- package/dist/types/balance.d.ts +3 -1
- package/dist/types/balanceList.d.ts +3 -1
- package/dist/types/channel.d.ts +1 -1
- package/dist/types/createKeyOptions.d.ts +1 -1
- package/dist/types/entity.d.ts +1 -1
- package/dist/types/error.d.ts +1 -1
- package/dist/types/hit.d.ts +1 -1
- package/dist/types/invitationList.d.ts +3 -1
- package/dist/types/invitationOptions.d.ts +1 -1
- package/dist/types/key.d.ts +3 -1
- package/dist/types/keyResponse.d.ts +3 -1
- package/dist/types/keyResponseObj.d.ts +1 -1
- package/dist/types/keyword.d.ts +1 -1
- package/dist/types/liveTranscriptionOptions.d.ts +15 -15
- package/dist/types/liveTranscriptionResponse.d.ts +1 -1
- package/dist/types/member.d.ts +1 -1
- package/dist/types/memberList.d.ts +3 -1
- package/dist/types/message.d.ts +3 -1
- package/dist/types/metadata.d.ts +11 -1
- package/dist/types/paragraph.d.ts +1 -1
- package/dist/types/paragraphGroup.d.ts +1 -1
- package/dist/types/prerecordedTranscriptionOptions.d.ts +16 -16
- package/dist/types/prerecordedTranscriptionResponse.d.ts +14 -10
- package/dist/types/project.d.ts +3 -1
- package/dist/types/projectPatchRequest.d.ts +1 -1
- package/dist/types/projectPatchResponse.d.ts +3 -1
- package/dist/types/projectResponse.d.ts +3 -1
- package/dist/types/requestFunction.d.ts +4 -3
- package/dist/types/scopeList.d.ts +3 -1
- package/dist/types/search.d.ts +1 -1
- package/dist/types/sentence.d.ts +1 -1
- package/dist/types/summary.d.ts +1 -1
- package/dist/types/toggleConfigOptions.d.ts +1 -1
- package/dist/types/topic.d.ts +1 -1
- package/dist/types/topicGroup.d.ts +1 -1
- package/dist/types/transcriptionSource.d.ts +5 -4
- package/dist/types/translation.d.ts +1 -1
- package/dist/types/usageCallback.d.ts +1 -1
- package/dist/types/usageField.d.ts +3 -1
- package/dist/types/usageFieldOptions.d.ts +1 -1
- package/dist/types/usageOptions.d.ts +2 -2
- package/dist/types/usageRequest.d.ts +3 -1
- package/dist/types/usageRequestDetail.d.ts +1 -1
- package/dist/types/usageRequestList.d.ts +3 -1
- package/dist/types/usageRequestListOptions.d.ts +1 -1
- package/dist/types/usageRequestMessage.d.ts +1 -1
- package/dist/types/usageResponse.d.ts +3 -1
- package/dist/types/usageResponseDetail.d.ts +1 -1
- package/dist/types/utterance.d.ts +1 -1
- package/dist/types/warning.d.ts +5 -0
- package/dist/types/wordBase.d.ts +1 -1
- package/dist/usage.d.ts +7 -7
- package/package.json +3 -2
package/dist/projects.d.ts
CHANGED
|
@@ -9,32 +9,32 @@ export declare class Projects {
|
|
|
9
9
|
* Returns all projects accessible by the API key.
|
|
10
10
|
* @param {string} endpoint Custom API endpoint
|
|
11
11
|
*
|
|
12
|
-
* @returns {Promise<ProjectResponse
|
|
12
|
+
* @returns {Promise<ProjectResponse>}
|
|
13
13
|
*/
|
|
14
|
-
list(endpoint?: string): Promise<ProjectResponse
|
|
14
|
+
list(endpoint?: string): Promise<ProjectResponse>;
|
|
15
15
|
/**
|
|
16
16
|
* Retrieves a specific project based on the provided project_id.
|
|
17
17
|
* @param {string} projectId Unique identifier of the project
|
|
18
18
|
* @param {string} endpoint Custom API endpoint
|
|
19
19
|
*
|
|
20
|
-
* @returns {Promise<Project
|
|
20
|
+
* @returns {Promise<Project>}
|
|
21
21
|
*/
|
|
22
|
-
get(projectId: string, endpoint?: string): Promise<Project
|
|
22
|
+
get(projectId: string, endpoint?: string): Promise<Project>;
|
|
23
23
|
/**
|
|
24
24
|
* Update a project.
|
|
25
|
-
* @param {Project} project Project to update
|
|
25
|
+
* @param {string | Project} project Project to update
|
|
26
26
|
* @param {ProjectPatchRequest} payload Details to change as an object
|
|
27
27
|
* @param {string} endpoint Custom API endpoint
|
|
28
28
|
*
|
|
29
|
-
* @returns {Promise<ProjectPatchResponse
|
|
29
|
+
* @returns {Promise<ProjectPatchResponse>}
|
|
30
30
|
*/
|
|
31
|
-
update(project: Project, payload: ProjectPatchRequest, endpoint?: string): Promise<ProjectPatchResponse
|
|
31
|
+
update(project: string | Project, payload: ProjectPatchRequest, endpoint?: string): Promise<ProjectPatchResponse>;
|
|
32
32
|
/**
|
|
33
33
|
* Delete a project.
|
|
34
34
|
* @param {string} projectId Unique identifier of the project
|
|
35
35
|
* @param {string} endpoint Custom API endpoint
|
|
36
36
|
*
|
|
37
|
-
* @returns {Promise<
|
|
37
|
+
* @returns {Promise<void | ErrorResponse>}
|
|
38
38
|
*/
|
|
39
39
|
delete(projectId: string, endpoint?: string): Promise<void | ErrorResponse>;
|
|
40
40
|
}
|
package/dist/scopes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScopeList, Message, RequestFunction
|
|
1
|
+
import { ScopeList, Message, RequestFunction } from "./types";
|
|
2
2
|
export declare class Scopes {
|
|
3
3
|
private _credentials;
|
|
4
4
|
private _apiUrl;
|
|
@@ -11,9 +11,9 @@ export declare class Scopes {
|
|
|
11
11
|
* @param {string} memberId Unique identifier of the member
|
|
12
12
|
* @param {string} endpoint Custom API endpoint
|
|
13
13
|
*
|
|
14
|
-
* @returns {Promise<ScopeList
|
|
14
|
+
* @returns {Promise<ScopeList>}
|
|
15
15
|
*/
|
|
16
|
-
get(projectId: string, memberId: string, endpoint?: string): Promise<ScopeList
|
|
16
|
+
get(projectId: string, memberId: string, endpoint?: string): Promise<ScopeList>;
|
|
17
17
|
/**
|
|
18
18
|
* Updates the scope for the specified member in the specified project.
|
|
19
19
|
* @param {string} projectId Unique identifier of the project
|
|
@@ -21,7 +21,7 @@ export declare class Scopes {
|
|
|
21
21
|
* @param {string} scope Scope to update the member to
|
|
22
22
|
* @param {string} endpoint Custom API endpoint
|
|
23
23
|
*
|
|
24
|
-
* @returns {Promise<Message
|
|
24
|
+
* @returns {Promise<Message>}
|
|
25
25
|
*/
|
|
26
|
-
update(projectID: string, memberId: string, scope: string, endpoint?: string): Promise<Message
|
|
26
|
+
update(projectID: string, memberId: string, scope: string, endpoint?: string): Promise<Message>;
|
|
27
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LiveTranscriptionOptions, PrerecordedTranscriptionOptions, PrerecordedTranscriptionResponse, TranscriptionSource
|
|
1
|
+
import { LiveTranscriptionOptions, PrerecordedTranscriptionOptions, PrerecordedTranscriptionResponse, TranscriptionSource } from "../types";
|
|
2
2
|
import { LiveTranscription } from "./liveTranscription";
|
|
3
3
|
export declare class Transcriber {
|
|
4
4
|
private _credentials;
|
|
@@ -11,15 +11,15 @@ export declare class Transcriber {
|
|
|
11
11
|
* @param {PrerecordedTranscriptionOptions} options Options used to toggle transcription features
|
|
12
12
|
* @param {string} endpoint Custom API endpoint
|
|
13
13
|
*
|
|
14
|
-
* @returns {Promise<PrerecordedTranscriptionResponse
|
|
14
|
+
* @returns {Promise<PrerecordedTranscriptionResponse>}
|
|
15
15
|
*/
|
|
16
|
-
preRecorded(source: TranscriptionSource, options?: PrerecordedTranscriptionOptions, endpoint?: string): Promise<PrerecordedTranscriptionResponse
|
|
16
|
+
preRecorded(source: TranscriptionSource, options?: PrerecordedTranscriptionOptions, endpoint?: string): Promise<PrerecordedTranscriptionResponse>;
|
|
17
17
|
/**
|
|
18
18
|
* Opens a websocket to Deepgram's API for live transcriptions
|
|
19
19
|
* @param {LiveTranscriptionOptions} options Options used to toggle transcription features
|
|
20
20
|
* @param {string} endpoint Custom API endpoint
|
|
21
21
|
*
|
|
22
|
-
* @returns {LiveTranscription
|
|
22
|
+
* @returns {LiveTranscription}
|
|
23
23
|
*/
|
|
24
|
-
live(options?: LiveTranscriptionOptions, endpoint?: string): LiveTranscription
|
|
24
|
+
live(options?: LiveTranscriptionOptions, endpoint?: string): LiveTranscription;
|
|
25
25
|
}
|
|
@@ -7,6 +7,7 @@ export declare class LiveTranscription extends EventEmitter {
|
|
|
7
7
|
constructor(credentials: string, apiUrl: string, requireSSL: boolean, options?: LiveTranscriptionOptions, endpoint?: string);
|
|
8
8
|
private _bindSocketEvents;
|
|
9
9
|
configure(config: ToggleConfigOptions): void;
|
|
10
|
+
keepAlive(): void;
|
|
10
11
|
/**
|
|
11
12
|
* Returns the ready state of the websocket connection
|
|
12
13
|
*/
|
|
@@ -10,4 +10,4 @@ import { PrerecordedTranscriptionOptions, PrerecordedTranscriptionResponse, Tran
|
|
|
10
10
|
* @param options string
|
|
11
11
|
* @returns Promise<PrerecordedTranscriptionResponse>
|
|
12
12
|
*/
|
|
13
|
-
export declare const preRecordedTranscription: (apiKey: string, apiUrl: string, requireSSL: boolean, source: TranscriptionSource, options?: PrerecordedTranscriptionOptions
|
|
13
|
+
export declare const preRecordedTranscription: (apiKey: string, apiUrl: string, requireSSL: boolean, source: TranscriptionSource, options?: PrerecordedTranscriptionOptions, endpoint?: string) => Promise<PrerecordedTranscriptionResponse>;
|
|
@@ -4,7 +4,7 @@ import { Entity } from "./entity";
|
|
|
4
4
|
import { Summary } from "./summary";
|
|
5
5
|
import { Translation } from "./translation";
|
|
6
6
|
import { TopicGroup } from "./topicGroup";
|
|
7
|
-
export
|
|
7
|
+
export type Alternative = {
|
|
8
8
|
/**
|
|
9
9
|
* Text of speech identified by API
|
|
10
10
|
*/
|
package/dist/types/balance.d.ts
CHANGED
package/dist/types/channel.d.ts
CHANGED
package/dist/types/entity.d.ts
CHANGED
package/dist/types/error.d.ts
CHANGED
package/dist/types/hit.d.ts
CHANGED
package/dist/types/key.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API key used for authenticating with the Deepgram API
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Key = {
|
|
5
5
|
/**
|
|
6
6
|
* Unique identifier of the key to use in API requests
|
|
7
7
|
*/
|
|
@@ -22,4 +22,6 @@ export declare type Key = {
|
|
|
22
22
|
* Array of scopes assigned to the key
|
|
23
23
|
*/
|
|
24
24
|
scopes: Array<string>;
|
|
25
|
+
err_code?: string;
|
|
26
|
+
err_msg?: string;
|
|
25
27
|
};
|
|
@@ -2,9 +2,11 @@ import { KeyResponseObj } from "./keyResponseObj";
|
|
|
2
2
|
/**
|
|
3
3
|
* Response from the Deepgram API to list keys
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type KeyResponse = {
|
|
6
6
|
/**
|
|
7
7
|
* Array of API keys associated with the project
|
|
8
8
|
*/
|
|
9
9
|
api_keys: Array<KeyResponseObj>;
|
|
10
|
+
err_code?: string;
|
|
11
|
+
err_msg?: string;
|
|
10
12
|
};
|
package/dist/types/keyword.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Models } from "../enums";
|
|
|
2
2
|
/**
|
|
3
3
|
* Options for transcription
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type LiveTranscriptionOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* AI model used to process submitted audio.
|
|
8
8
|
* @default general
|
|
@@ -24,12 +24,6 @@ export declare type LiveTranscriptionOptions = {
|
|
|
24
24
|
* @see https://developers.deepgram.com/documentation/features/tier/
|
|
25
25
|
*/
|
|
26
26
|
tier?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Terms or phrases to search for in the submitted audio and replace
|
|
29
|
-
* @remarks Can send multiple instances in query string replace=this:that&replace=thisalso:thatalso. Replacing a term or phrase with nothing will remove the term or phrase from the audio transcript.
|
|
30
|
-
* @see https://developers.deepgram.com/documentation/features/replace/
|
|
31
|
-
*/
|
|
32
|
-
replace?: string;
|
|
33
27
|
/**
|
|
34
28
|
* BCP-47 language tag that hints at the primary spoken language.
|
|
35
29
|
* @default en-US
|
|
@@ -103,13 +97,6 @@ export declare type LiveTranscriptionOptions = {
|
|
|
103
97
|
* adds spaces between numbers in the transcript
|
|
104
98
|
*/
|
|
105
99
|
numbers_spaces?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Terms or phrases to search for in the submitted audio. Deepgram searches
|
|
108
|
-
* for acoustic patterns in audio rather than text patterns in transcripts
|
|
109
|
-
* because we have noticed that acoustic pattern matching is more performant.
|
|
110
|
-
* @see https://developers.deepgram.com/documentation/features/search/
|
|
111
|
-
*/
|
|
112
|
-
search?: Array<string>;
|
|
113
100
|
/**
|
|
114
101
|
* Callback URL to provide if you would like your submitted audio to be
|
|
115
102
|
* processed asynchronously. When passed, Deepgram will immediately respond
|
|
@@ -120,6 +107,19 @@ export declare type LiveTranscriptionOptions = {
|
|
|
120
107
|
* @see https://developers.deepgram.com/documentation/features/callback/
|
|
121
108
|
*/
|
|
122
109
|
callback?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Terms or phrases to search for in the submitted audio and replace
|
|
112
|
+
* @remarks Can send multiple instances in query string replace=this:that&replace=thisalso:thatalso. Replacing a term or phrase with nothing will remove the term or phrase from the audio transcript.
|
|
113
|
+
* @see https://developers.deepgram.com/documentation/features/replace/
|
|
114
|
+
*/
|
|
115
|
+
replace?: string[] | string;
|
|
116
|
+
/**
|
|
117
|
+
* Terms or phrases to search for in the submitted audio. Deepgram searches
|
|
118
|
+
* for acoustic patterns in audio rather than text patterns in transcripts
|
|
119
|
+
* because we have noticed that acoustic pattern matching is more performant.
|
|
120
|
+
* @see https://developers.deepgram.com/documentation/features/search/
|
|
121
|
+
*/
|
|
122
|
+
search?: string[] | string;
|
|
123
123
|
/**
|
|
124
124
|
* Keywords to which the model should pay particular attention to boosting
|
|
125
125
|
* or suppressing to help it understand context. Just like a human listener,
|
|
@@ -127,7 +127,7 @@ export declare type LiveTranscriptionOptions = {
|
|
|
127
127
|
* hard-to-decipher speech when it knows the context of the conversation.
|
|
128
128
|
* @see https://developers.deepgram.com/documentation/features/keywords/
|
|
129
129
|
*/
|
|
130
|
-
keywords?:
|
|
130
|
+
keywords?: string[] | string;
|
|
131
131
|
/**
|
|
132
132
|
* Support for out-of-vocabulary (OOV) keyword boosting when processing streaming audio is
|
|
133
133
|
* currently in beta; to fall back to previous keyword behavior append the query parameter
|
package/dist/types/member.d.ts
CHANGED
package/dist/types/message.d.ts
CHANGED
package/dist/types/metadata.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { Warning } from "./warning";
|
|
2
|
+
export type Metadata = {
|
|
2
3
|
request_id: string;
|
|
3
4
|
transaction_key: string;
|
|
4
5
|
sha256: string;
|
|
5
6
|
created: string;
|
|
6
7
|
duration: number;
|
|
7
8
|
channels: number;
|
|
9
|
+
model_info: {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
name: string;
|
|
12
|
+
version: string;
|
|
13
|
+
arch: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
warnings?: Array<Warning>;
|
|
17
|
+
models: Array<string>;
|
|
8
18
|
};
|
|
@@ -2,7 +2,7 @@ import { Models } from "../enums";
|
|
|
2
2
|
/**
|
|
3
3
|
* Options for transcription
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type PrerecordedTranscriptionOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* AI model used to process submitted audio.
|
|
8
8
|
* @default general
|
|
@@ -24,12 +24,6 @@ export declare type PrerecordedTranscriptionOptions = {
|
|
|
24
24
|
* @see https://developers.deepgram.com/documentation/features/tier/
|
|
25
25
|
*/
|
|
26
26
|
tier?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Terms or phrases to search for in the submitted audio and replace
|
|
29
|
-
* @remarks Can send multiple instances in query string replace=this:that&replace=thisalso:thatalso. Replacing a term or phrase with nothing will remove the term or phrase from the audio transcript.
|
|
30
|
-
* @see https://developers.deepgram.com/documentation/features/replace/
|
|
31
|
-
*/
|
|
32
|
-
replace?: string;
|
|
33
27
|
/**
|
|
34
28
|
* BCP-47 language tag that hints at the primary spoken language.
|
|
35
29
|
* @default en-US
|
|
@@ -103,13 +97,6 @@ export declare type PrerecordedTranscriptionOptions = {
|
|
|
103
97
|
* adds spaces between numbers in the transcript
|
|
104
98
|
*/
|
|
105
99
|
numbers_spaces?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Terms or phrases to search for in the submitted audio. Deepgram searches
|
|
108
|
-
* for acoustic patterns in audio rather than text patterns in transcripts
|
|
109
|
-
* because we have noticed that acoustic pattern matching is more performant.
|
|
110
|
-
* @see https://developers.deepgram.com/documentation/features/search/
|
|
111
|
-
*/
|
|
112
|
-
search?: Array<string>;
|
|
113
100
|
/**
|
|
114
101
|
* Callback URL to provide if you would like your submitted audio to be
|
|
115
102
|
* processed asynchronously. When passed, Deepgram will immediately respond
|
|
@@ -120,6 +107,19 @@ export declare type PrerecordedTranscriptionOptions = {
|
|
|
120
107
|
* @see https://developers.deepgram.com/documentation/features/callback/
|
|
121
108
|
*/
|
|
122
109
|
callback?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Terms or phrases to search for in the submitted audio and replace
|
|
112
|
+
* @remarks Can send multiple instances in query string replace=this:that&replace=thisalso:thatalso. Replacing a term or phrase with nothing will remove the term or phrase from the audio transcript.
|
|
113
|
+
* @see https://developers.deepgram.com/documentation/features/replace/
|
|
114
|
+
*/
|
|
115
|
+
replace?: string[] | string;
|
|
116
|
+
/**
|
|
117
|
+
* Terms or phrases to search for in the submitted audio. Deepgram searches
|
|
118
|
+
* for acoustic patterns in audio rather than text patterns in transcripts
|
|
119
|
+
* because we have noticed that acoustic pattern matching is more performant.
|
|
120
|
+
* @see https://developers.deepgram.com/documentation/features/search/
|
|
121
|
+
*/
|
|
122
|
+
search?: string[] | string;
|
|
123
123
|
/**
|
|
124
124
|
* Keywords to which the model should pay particular attention to boosting
|
|
125
125
|
* or suppressing to help it understand context. Just like a human listener,
|
|
@@ -127,7 +127,7 @@ export declare type PrerecordedTranscriptionOptions = {
|
|
|
127
127
|
* hard-to-decipher speech when it knows the context of the conversation.
|
|
128
128
|
* @see https://developers.deepgram.com/documentation/features/keywords/
|
|
129
129
|
*/
|
|
130
|
-
keywords?:
|
|
130
|
+
keywords?: string[] | string;
|
|
131
131
|
/**
|
|
132
132
|
* Support for out-of-vocabulary (OOV) keyword boosting when processing streaming audio is
|
|
133
133
|
* currently in beta; to fall back to previous keyword behavior append the query parameter
|
|
@@ -178,7 +178,7 @@ export declare type PrerecordedTranscriptionOptions = {
|
|
|
178
178
|
/**
|
|
179
179
|
* Indicates whether Deepgram should provide summarizations of sections of the provided audio.
|
|
180
180
|
*/
|
|
181
|
-
summarize?: boolean;
|
|
181
|
+
summarize?: boolean | string;
|
|
182
182
|
/**
|
|
183
183
|
* Corresponds to the language code Deepgram will translate the results into
|
|
184
184
|
* For example, 'es', 'fr', 'ja'
|
|
@@ -2,24 +2,28 @@ import { Metadata } from "./metadata";
|
|
|
2
2
|
import { Channel } from "./channel";
|
|
3
3
|
import { Utterance } from "./utterance";
|
|
4
4
|
export declare class PrerecordedTranscriptionResponse {
|
|
5
|
+
err_code?: string;
|
|
6
|
+
err_msg?: string;
|
|
5
7
|
request_id?: string;
|
|
6
8
|
metadata?: Metadata;
|
|
7
9
|
results?: {
|
|
8
10
|
channels: Array<Channel>;
|
|
9
11
|
utterances?: Array<Utterance>;
|
|
12
|
+
summary?: {
|
|
13
|
+
result: "success" | "failure";
|
|
14
|
+
short: string;
|
|
15
|
+
};
|
|
10
16
|
};
|
|
11
17
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @
|
|
14
|
-
*
|
|
15
|
-
* @returns A string with the transcription in the WebVTT format
|
|
18
|
+
* Returns a VTT formatted string based on the transcription response.
|
|
19
|
+
* @param {number} lineLength The maximum line length. Default: 8
|
|
20
|
+
* @returns {string}
|
|
16
21
|
*/
|
|
17
|
-
toWebVTT(): string;
|
|
22
|
+
toWebVTT(lineLength?: number): string;
|
|
18
23
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
21
|
-
*
|
|
22
|
-
* @returns A string with the transcription in the SRT format
|
|
24
|
+
* Returns a SRT formatted string based on the transcription response.
|
|
25
|
+
* @param {number} lineLength The maximum line length. Default: 8
|
|
26
|
+
* @returns {string}
|
|
23
27
|
*/
|
|
24
|
-
toSRT(): string;
|
|
28
|
+
toSRT(lineLength?: number): string;
|
|
25
29
|
}
|
package/dist/types/project.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Deepgram project
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Project = {
|
|
5
5
|
/**
|
|
6
6
|
* Unique identifier of the project
|
|
7
7
|
*/
|
|
@@ -14,4 +14,6 @@ export declare type Project = {
|
|
|
14
14
|
* Name of the company associated with the project. Optional.
|
|
15
15
|
*/
|
|
16
16
|
company?: string;
|
|
17
|
+
err_code?: string;
|
|
18
|
+
err_msg?: string;
|
|
17
19
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import { ReadStream } from "fs";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type RequestFunction = NodeRequest | BrowserRequest;
|
|
5
|
+
export type NodeRequest = (method: string, apiKey: string, apiUrl: string, requireSSL: boolean, path: string, payload?: string | Buffer | ReadStream, options?: Object) => Promise<any>;
|
|
6
|
+
export type BrowserRequest = (method: string, apiKey: string, apiUrl: string, requireSSL: boolean, path: string, payload?: string) => Promise<any>;
|
package/dist/types/search.d.ts
CHANGED
package/dist/types/sentence.d.ts
CHANGED
package/dist/types/summary.d.ts
CHANGED
package/dist/types/topic.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import { Readable } from "stream";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
4
|
+
export type TranscriptionSource = UrlSource | BufferSource | ReadStreamSource;
|
|
5
|
+
export type ReadStreamSource = {
|
|
5
6
|
stream: Readable;
|
|
6
7
|
mimetype: string;
|
|
7
8
|
};
|
|
8
|
-
export
|
|
9
|
+
export type UrlSource = {
|
|
9
10
|
url: string;
|
|
10
11
|
};
|
|
11
|
-
export
|
|
12
|
+
export type BufferSource = {
|
|
12
13
|
buffer: Buffer;
|
|
13
14
|
mimetype: string;
|
|
14
15
|
};
|