assemblyai 3.0.1 → 3.1.1
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 +74 -48
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +83 -11
- package/dist/index.js +83 -11
- package/dist/services/files/index.d.ts +2 -2
- package/dist/services/lemur/index.d.ts +5 -5
- package/dist/services/transcripts/index.d.ts +28 -7
- package/dist/types/asyncapi.generated.d.ts +20 -17
- package/dist/types/deprecated.d.ts +63 -0
- package/dist/types/files/index.d.ts +2 -2
- package/dist/types/index.d.ts +7 -6
- package/dist/types/openapi.generated.d.ts +223 -206
- package/dist/types/services/abstractions.d.ts +3 -3
- package/dist/types/services/index.d.ts +1 -1
- package/dist/types/transcripts/index.d.ts +36 -2
- package/package.json +10 -5
- package/src/index.ts +1 -1
- package/src/services/files/index.ts +2 -2
- package/src/services/lemur/index.ts +8 -8
- package/src/services/transcripts/index.ts +85 -19
- package/src/types/asyncapi.generated.ts +20 -17
- package/src/types/deprecated.ts +78 -0
- package/src/types/files/index.ts +2 -2
- package/src/types/index.ts +7 -6
- package/src/types/openapi.generated.ts +226 -208
- package/src/types/services/abstractions.ts +3 -3
- package/src/types/services/index.ts +1 -1
- package/src/types/transcripts/index.ts +43 -2
- package/src/utils/.gitkeep +0 -0
|
@@ -5,7 +5,7 @@ type Without<T, U> = {
|
|
|
5
5
|
type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
|
6
6
|
type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
|
|
7
7
|
/**
|
|
8
|
-
* @description
|
|
8
|
+
* @description Either success, or unavailable in the rare case that the model failed
|
|
9
9
|
* @enum {string}
|
|
10
10
|
*/
|
|
11
11
|
export type AudioIntelligenceModelStatus = "success" | "unavailable";
|
|
@@ -23,13 +23,13 @@ export type AutoHighlightResult = {
|
|
|
23
23
|
timestamps: Timestamp[];
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
* @description An array of results for the Key Phrases model, if it
|
|
26
|
+
* @description An array of results for the Key Phrases model, if it is enabled.
|
|
27
27
|
* See [Key phrases](https://www.assemblyai.com/docs/Models/key_phrases) for more information.
|
|
28
28
|
*/
|
|
29
29
|
export type AutoHighlightsResult = {
|
|
30
30
|
/** @description A temporally-sequential array of Key Phrases */
|
|
31
31
|
results: AutoHighlightResult[];
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
/** @description Chapter of the audio file */
|
|
34
34
|
export type Chapter = {
|
|
35
35
|
/** @description The starting time, in milliseconds, for the chapter */
|
|
@@ -58,7 +58,7 @@ export type ContentSafetyLabel = {
|
|
|
58
58
|
severity: number;
|
|
59
59
|
};
|
|
60
60
|
export type ContentSafetyLabelResult = {
|
|
61
|
-
/** @description An array of
|
|
61
|
+
/** @description An array of safety labels, one per sensitive topic that was detected in the section */
|
|
62
62
|
labels: ContentSafetyLabel[];
|
|
63
63
|
/** @description The sentence index at which the section ends */
|
|
64
64
|
sentences_idx_end: number;
|
|
@@ -69,125 +69,26 @@ export type ContentSafetyLabelResult = {
|
|
|
69
69
|
/** @description Timestamp information for the section */
|
|
70
70
|
timestamp: Timestamp;
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* @description An array of results for the Content Moderation model, if it is enabled.
|
|
74
|
+
* See [Content moderation](https://www.assemblyai.com/docs/Models/content_moderation) for more information.
|
|
75
|
+
*/
|
|
72
76
|
export type ContentSafetyLabelsResult = {
|
|
73
77
|
results: ContentSafetyLabelResult[];
|
|
74
78
|
/** @description A summary of the Content Moderation severity results for the entire audio file */
|
|
75
79
|
severity_score_summary: {
|
|
76
80
|
[key: string]: SeverityScoreSummary;
|
|
77
81
|
};
|
|
78
|
-
/** @description
|
|
82
|
+
/** @description The status of the Content Moderation model. Either success, or unavailable in the rare case that the model failed. */
|
|
79
83
|
status: AudioIntelligenceModelStatus;
|
|
80
84
|
/** @description A summary of the Content Moderation confidence results for the entire audio file */
|
|
81
85
|
summary: {
|
|
82
86
|
[key: string]: number;
|
|
83
87
|
};
|
|
84
|
-
} | null;
|
|
85
|
-
export type CreateRealtimeTemporaryTokenParameters = {
|
|
86
|
-
/** @description The amount of time until the token expires in seconds. */
|
|
87
|
-
expires_in: number;
|
|
88
88
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
audio_end_at?: number;
|
|
93
|
-
/** @description The point in time, in milliseconds, to begin transcription from in your media file */
|
|
94
|
-
audio_start_from?: number;
|
|
95
|
-
/** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters), can be true or false */
|
|
96
|
-
auto_chapters?: boolean;
|
|
97
|
-
/** @description Whether Key Phrases was enabled in the transcription request, either true or false */
|
|
98
|
-
auto_highlights?: boolean;
|
|
99
|
-
/** @description The word boost parameter value, if provided in the transcription request. */
|
|
100
|
-
boost_param?: TranscriptBoostParam;
|
|
101
|
-
/** @description Enable [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation), can be true or false */
|
|
102
|
-
content_safety?: boolean;
|
|
103
|
-
/** @description Customize how words are spelled and formatted using to and from values */
|
|
104
|
-
custom_spelling?: TranscriptCustomSpelling[];
|
|
105
|
-
/** @description Whether custom topics was enabled in the transcription request, either true or false */
|
|
106
|
-
custom_topics?: boolean;
|
|
107
|
-
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false. */
|
|
108
|
-
disfluencies?: boolean;
|
|
109
|
-
/** @description Enable [Dual Channel](https://assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) transcription, can be true or false. */
|
|
110
|
-
dual_channel?: boolean;
|
|
111
|
-
/** @description Enable [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection), can be true or false */
|
|
112
|
-
entity_detection?: boolean;
|
|
113
|
-
/** @description Filter profanity from the transcribed text, can be true or false. */
|
|
114
|
-
filter_profanity?: boolean;
|
|
115
|
-
/** @description Enable Text Formatting, can be true or false. */
|
|
116
|
-
format_text?: boolean;
|
|
117
|
-
/** @description Enable [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification), can be true or false */
|
|
118
|
-
iab_categories?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/Concepts/supported_languages).
|
|
121
|
-
* The default value is 'en_us'.
|
|
122
|
-
*/
|
|
123
|
-
language_code?: TranscriptLanguageCode;
|
|
124
|
-
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) was enabled in the transcription request, either true or false. */
|
|
125
|
-
language_detection?: boolean;
|
|
126
|
-
/** @description Enable Automatic Punctuation, can be true or false. */
|
|
127
|
-
punctuate?: boolean;
|
|
128
|
-
/** @description Redact PII from the transcribed text using the Redact PII model, can be true or false */
|
|
129
|
-
redact_pii?: boolean;
|
|
130
|
-
/** @description Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
131
|
-
redact_pii_audio?: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* @description Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details.
|
|
134
|
-
* @default mp3
|
|
135
|
-
*/
|
|
136
|
-
redact_pii_audio_quality?: string;
|
|
137
|
-
/** @description The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
138
|
-
redact_pii_policies?: PiiPolicy[];
|
|
139
|
-
/** @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
140
|
-
redact_pii_sub?: SubstitutionPolicy;
|
|
141
|
-
/** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis), can be true or false */
|
|
142
|
-
sentiment_analysis?: boolean;
|
|
143
|
-
/** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization), can be true or false */
|
|
144
|
-
speaker_labels?: boolean;
|
|
145
|
-
/**
|
|
146
|
-
* @description Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) for more details.
|
|
147
|
-
* @default null
|
|
148
|
-
*/
|
|
149
|
-
speakers_expected?: number | null;
|
|
150
|
-
/**
|
|
151
|
-
* Format: float
|
|
152
|
-
* @description Reject audio files that contain less than this fraction of speech.
|
|
153
|
-
* Valid values are in the range [0, 1] inclusive.
|
|
154
|
-
*
|
|
155
|
-
* @default null
|
|
156
|
-
*/
|
|
157
|
-
speech_threshold?: number | null;
|
|
158
|
-
/** @description Enable [Summarization](https://www.assemblyai.com/docs/Models/summarization), can be true or false */
|
|
159
|
-
summarization?: boolean;
|
|
160
|
-
/**
|
|
161
|
-
* @description The model to summarize the transcript
|
|
162
|
-
* @default informative
|
|
163
|
-
*/
|
|
164
|
-
summary_model?: SummaryModel;
|
|
165
|
-
/**
|
|
166
|
-
* @description The type of summary
|
|
167
|
-
* @default bullets
|
|
168
|
-
*/
|
|
169
|
-
summary_type?: SummaryType;
|
|
170
|
-
/** @description The list of custom topics provided if custom topics was enabled in the transcription request */
|
|
171
|
-
topics?: string[];
|
|
172
|
-
/**
|
|
173
|
-
* @description The header name which should be sent back with webhook calls, if provided in the transcription request.
|
|
174
|
-
* @default null
|
|
175
|
-
*/
|
|
176
|
-
webhook_auth_header_name?: string | null;
|
|
177
|
-
/**
|
|
178
|
-
* @description Defaults to null. Optionally allows a user to specify a header name and value to send back with a webhook call for added security.
|
|
179
|
-
* @default null
|
|
180
|
-
*/
|
|
181
|
-
webhook_auth_header_value?: string | null;
|
|
182
|
-
/** @description The URL to which we send webhooks upon trancription completion, if provided in the transcription request. */
|
|
183
|
-
webhook_url?: string;
|
|
184
|
-
/** @description The list of custom vocabulary to boost transcription probability for, if provided in the transcription request. */
|
|
185
|
-
word_boost?: string[];
|
|
186
|
-
};
|
|
187
|
-
/** @description The parameters for creating a transcript */
|
|
188
|
-
export type CreateTranscriptParameters = CreateTranscriptOptionalParameters & {
|
|
189
|
-
/** @description The URL of the audio or video file to transcribe. */
|
|
190
|
-
audio_url: string;
|
|
89
|
+
export type CreateRealtimeTemporaryTokenParams = {
|
|
90
|
+
/** @description The amount of time until the token expires in seconds */
|
|
91
|
+
expires_in: number;
|
|
191
92
|
};
|
|
192
93
|
/** @description A detected entity */
|
|
193
94
|
export type Entity = {
|
|
@@ -211,12 +112,12 @@ export type Error = {
|
|
|
211
112
|
/** @constant */
|
|
212
113
|
status?: "error";
|
|
213
114
|
};
|
|
214
|
-
export type
|
|
115
|
+
export type LemurActionItemsParams = LemurBaseParams;
|
|
215
116
|
export type LemurActionItemsResponse = LemurBaseResponse & {
|
|
216
|
-
/** @description The response generated by LeMUR
|
|
117
|
+
/** @description The response generated by LeMUR */
|
|
217
118
|
response: string;
|
|
218
119
|
};
|
|
219
|
-
export type
|
|
120
|
+
export type LemurBaseParams = {
|
|
220
121
|
/** @description Context to provide the model. This can be a string or a free-form JSON value. */
|
|
221
122
|
context?: OneOf<[
|
|
222
123
|
string,
|
|
@@ -225,7 +126,12 @@ export type LemurBaseParameters = {
|
|
|
225
126
|
}
|
|
226
127
|
]>;
|
|
227
128
|
final_model?: LemurModel;
|
|
228
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* @description Custom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000.
|
|
131
|
+
* Use either transcript_ids or input_text as input into LeMUR.
|
|
132
|
+
*/
|
|
133
|
+
input_text?: string;
|
|
134
|
+
/** @description Max output size in tokens, up to 4000 */
|
|
229
135
|
max_output_size?: number;
|
|
230
136
|
/**
|
|
231
137
|
* Format: float
|
|
@@ -234,8 +140,11 @@ export type LemurBaseParameters = {
|
|
|
234
140
|
* Can be any value between 0.0 and 1.0 inclusive.
|
|
235
141
|
*/
|
|
236
142
|
temperature?: number;
|
|
237
|
-
/**
|
|
238
|
-
|
|
143
|
+
/**
|
|
144
|
+
* @description A list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower.
|
|
145
|
+
* Use either transcript_ids or input_text as input into LeMUR.
|
|
146
|
+
*/
|
|
147
|
+
transcript_ids?: string[];
|
|
239
148
|
};
|
|
240
149
|
export type LemurBaseResponse = {
|
|
241
150
|
/** @description The ID of the LeMUR request */
|
|
@@ -252,7 +161,7 @@ export type LemurQuestion = {
|
|
|
252
161
|
answer_format?: string;
|
|
253
162
|
/** @description What discrete options to return. Useful for precise responses. Can't be used with answer_format. Example: ["Yes", "No"] */
|
|
254
163
|
answer_options?: string[];
|
|
255
|
-
/** @description Any context about the transcripts you wish to provide. This can be a string
|
|
164
|
+
/** @description Any context about the transcripts you wish to provide. This can be a string or any object. */
|
|
256
165
|
context?: OneOf<[
|
|
257
166
|
string,
|
|
258
167
|
{
|
|
@@ -262,37 +171,58 @@ export type LemurQuestion = {
|
|
|
262
171
|
/** @description The question you wish to ask. For more complex questions use default model. */
|
|
263
172
|
question: string;
|
|
264
173
|
};
|
|
265
|
-
/** @description An answer generated by LeMUR and its question
|
|
174
|
+
/** @description An answer generated by LeMUR and its question */
|
|
266
175
|
export type LemurQuestionAnswer = {
|
|
267
|
-
/** @description The answer generated by LeMUR
|
|
176
|
+
/** @description The answer generated by LeMUR */
|
|
268
177
|
answer: string;
|
|
269
|
-
/** @description The question for LeMUR to answer
|
|
178
|
+
/** @description The question for LeMUR to answer */
|
|
270
179
|
question: string;
|
|
271
180
|
};
|
|
272
|
-
export type
|
|
273
|
-
/** @description A list of questions to ask
|
|
181
|
+
export type LemurQuestionAnswerParams = LemurBaseParams & {
|
|
182
|
+
/** @description A list of questions to ask */
|
|
274
183
|
questions: LemurQuestion[];
|
|
275
184
|
};
|
|
276
185
|
export type LemurQuestionAnswerResponse = LemurBaseResponse & {
|
|
277
|
-
/** @description The answers generated by LeMUR and their questions
|
|
186
|
+
/** @description The answers generated by LeMUR and their questions */
|
|
278
187
|
response: LemurQuestionAnswer[];
|
|
279
188
|
};
|
|
280
|
-
export type
|
|
189
|
+
export type LemurSummaryParams = LemurBaseParams & {
|
|
281
190
|
/** @description How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points" */
|
|
282
191
|
answer_format?: string;
|
|
283
192
|
};
|
|
284
193
|
export type LemurSummaryResponse = LemurBaseResponse & {
|
|
285
|
-
/** @description The response generated by LeMUR
|
|
194
|
+
/** @description The response generated by LeMUR */
|
|
286
195
|
response: string;
|
|
287
196
|
};
|
|
288
|
-
export type
|
|
197
|
+
export type LemurTaskParams = LemurBaseParams & {
|
|
289
198
|
/** @description Your text to prompt the model to produce a desired output, including any context you want to pass into the model. */
|
|
290
199
|
prompt: string;
|
|
291
200
|
};
|
|
292
201
|
export type LemurTaskResponse = LemurBaseResponse & {
|
|
293
|
-
/** @description The response generated by LeMUR
|
|
202
|
+
/** @description The response generated by LeMUR */
|
|
294
203
|
response: string;
|
|
295
204
|
};
|
|
205
|
+
export type ListTranscriptParams = {
|
|
206
|
+
/** @description Get transcripts that were created after this transcript ID */
|
|
207
|
+
after_id?: string;
|
|
208
|
+
/** @description Get transcripts that were created before this transcript ID */
|
|
209
|
+
before_id?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Format: date
|
|
212
|
+
* @description Only get transcripts created on this date
|
|
213
|
+
*/
|
|
214
|
+
created_on?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Format: int64
|
|
217
|
+
* @description Maximum amount of transcripts to retrieve
|
|
218
|
+
* @default 10
|
|
219
|
+
*/
|
|
220
|
+
limit?: number;
|
|
221
|
+
/** @description Filter by transcript status */
|
|
222
|
+
status?: TranscriptStatus;
|
|
223
|
+
/** @description Only get throttled transcripts, overrides the status filter */
|
|
224
|
+
throttled_only?: boolean;
|
|
225
|
+
};
|
|
296
226
|
export type PageDetails = {
|
|
297
227
|
current_url: string;
|
|
298
228
|
limit: number;
|
|
@@ -310,11 +240,11 @@ export type ParagraphsResponse = {
|
|
|
310
240
|
/** @enum {string} */
|
|
311
241
|
export type PiiPolicy = "medical_process" | "medical_condition" | "blood_type" | "drug" | "injury" | "number_sequence" | "email_address" | "date_of_birth" | "phone_number" | "us_social_security_number" | "credit_card_number" | "credit_card_expiration" | "credit_card_cvv" | "date" | "nationality" | "event" | "language" | "location" | "money_amount" | "person_name" | "person_age" | "organization" | "political_affiliation" | "occupation" | "religion" | "drivers_license" | "banking_information";
|
|
312
242
|
export type PurgeLemurRequestDataResponse = {
|
|
313
|
-
/** @description Whether the request data was deleted
|
|
243
|
+
/** @description Whether the request data was deleted */
|
|
314
244
|
deleted: boolean;
|
|
315
|
-
/** @description The ID of the LeMUR request */
|
|
316
|
-
request_id: string;
|
|
317
245
|
/** @description The ID of the deletion request of the LeMUR request */
|
|
246
|
+
request_id: string;
|
|
247
|
+
/** @description The ID of the LeMUR request to purge the data for */
|
|
318
248
|
request_id_to_purge: string;
|
|
319
249
|
};
|
|
320
250
|
export type RealtimeTemporaryTokenResponse = {
|
|
@@ -341,7 +271,7 @@ export type SentencesResponse = {
|
|
|
341
271
|
};
|
|
342
272
|
/** @enum {unknown} */
|
|
343
273
|
export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
|
|
344
|
-
/** @description The result of the sentiment analysis model
|
|
274
|
+
/** @description The result of the sentiment analysis model */
|
|
345
275
|
export type SentimentAnalysisResult = {
|
|
346
276
|
/**
|
|
347
277
|
* Format: double
|
|
@@ -369,7 +299,7 @@ export type SeverityScoreSummary = {
|
|
|
369
299
|
};
|
|
370
300
|
/**
|
|
371
301
|
* @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details.
|
|
372
|
-
* @enum {string
|
|
302
|
+
* @enum {string}
|
|
373
303
|
*/
|
|
374
304
|
export type SubstitutionPolicy = "entity_type" | "hash";
|
|
375
305
|
/**
|
|
@@ -389,14 +319,28 @@ export type SummaryModel = "informative" | "conversational" | "catchy";
|
|
|
389
319
|
* @enum {string}
|
|
390
320
|
*/
|
|
391
321
|
export type SummaryType = "bullets" | "bullets_verbose" | "gist" | "headline" | "paragraph";
|
|
392
|
-
/** @description Timestamp containing a start and end property in milliseconds
|
|
322
|
+
/** @description Timestamp containing a start and end property in milliseconds */
|
|
393
323
|
export type Timestamp = {
|
|
394
324
|
/** @description The end time in milliseconds */
|
|
395
325
|
end: number;
|
|
396
326
|
/** @description The start time in milliseconds */
|
|
397
327
|
start: number;
|
|
398
328
|
};
|
|
399
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* @description The result of the Topic Detection model, if it is enabled.
|
|
331
|
+
* See [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) for more information.
|
|
332
|
+
*/
|
|
333
|
+
export type TopicDetectionModelResult = {
|
|
334
|
+
/** @description An array of results for the Topic Detection model */
|
|
335
|
+
results: TopicDetectionResult[];
|
|
336
|
+
/** @description The status of the Topic Detection model. Either success, or unavailable in the rare case that the model failed. */
|
|
337
|
+
status: AudioIntelligenceModelStatus;
|
|
338
|
+
/** @description The overall relevance of topic to the entire audio file */
|
|
339
|
+
summary: {
|
|
340
|
+
[key: string]: number;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
/** @description The result of the topic detection model */
|
|
400
344
|
export type TopicDetectionResult = {
|
|
401
345
|
labels?: {
|
|
402
346
|
/** @description The IAB taxonomical label for the label of the detected topic, where > denotes supertopic/subtopic relationship */
|
|
@@ -415,7 +359,7 @@ export type TopicDetectionResult = {
|
|
|
415
359
|
export type Transcript = {
|
|
416
360
|
/**
|
|
417
361
|
* @deprecated
|
|
418
|
-
* @description The acoustic model that was used for the
|
|
362
|
+
* @description The acoustic model that was used for the transcript
|
|
419
363
|
*/
|
|
420
364
|
acoustic_model: string;
|
|
421
365
|
/**
|
|
@@ -423,22 +367,22 @@ export type Transcript = {
|
|
|
423
367
|
* @description The duration of this transcript object's media file, in seconds
|
|
424
368
|
*/
|
|
425
369
|
audio_duration?: number | null;
|
|
426
|
-
/** @description The point in time, in milliseconds, in the file at which the transcription was terminated
|
|
370
|
+
/** @description The point in time, in milliseconds, in the file at which the transcription was terminated */
|
|
427
371
|
audio_end_at?: number | null;
|
|
428
|
-
/** @description The point in time, in milliseconds, in the file at which the transcription was started
|
|
372
|
+
/** @description The point in time, in milliseconds, in the file at which the transcription was started */
|
|
429
373
|
audio_start_from?: number | null;
|
|
430
374
|
/** @description The URL of the media that was transcribed */
|
|
431
375
|
audio_url: string;
|
|
432
|
-
/** @description
|
|
376
|
+
/** @description Whether [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters) is enabled, can be true or false */
|
|
433
377
|
auto_chapters?: boolean | null;
|
|
434
|
-
/** @description Whether Key Phrases
|
|
378
|
+
/** @description Whether Key Phrases is enabled, either true or false */
|
|
435
379
|
auto_highlights: boolean;
|
|
436
380
|
/**
|
|
437
|
-
* @description An array of results for the Key Phrases model, if it
|
|
381
|
+
* @description An array of results for the Key Phrases model, if it is enabled.
|
|
438
382
|
* See [Key phrases](https://www.assemblyai.com/docs/Models/key_phrases) for more information.
|
|
439
383
|
*/
|
|
440
|
-
auto_highlights_result?: AutoHighlightsResult;
|
|
441
|
-
/** @description The word boost parameter value
|
|
384
|
+
auto_highlights_result?: AutoHighlightsResult | null;
|
|
385
|
+
/** @description The word boost parameter value */
|
|
442
386
|
boost_param?: string | null;
|
|
443
387
|
/** @description An array of temporally sequential chapters for the audio file */
|
|
444
388
|
chapters?: Chapter[] | null;
|
|
@@ -447,51 +391,42 @@ export type Transcript = {
|
|
|
447
391
|
* @description The confidence score for the transcript, between 0.0 (low confidence) and 1.0 (high confidence)
|
|
448
392
|
*/
|
|
449
393
|
confidence?: number | null;
|
|
450
|
-
/** @description
|
|
394
|
+
/** @description Whether [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation) is enabled, can be true or false */
|
|
451
395
|
content_safety?: boolean | null;
|
|
452
396
|
/**
|
|
453
|
-
* @description An array of results for the Content Moderation model, if it
|
|
397
|
+
* @description An array of results for the Content Moderation model, if it is enabled.
|
|
454
398
|
* See [Content moderation](https://www.assemblyai.com/docs/Models/content_moderation) for more information.
|
|
455
399
|
*/
|
|
456
|
-
content_safety_labels?: ContentSafetyLabelsResult;
|
|
400
|
+
content_safety_labels?: ContentSafetyLabelsResult | null;
|
|
457
401
|
/** @description Customize how words are spelled and formatted using to and from values */
|
|
458
402
|
custom_spelling?: TranscriptCustomSpelling[] | null;
|
|
459
|
-
/** @description Whether custom topics
|
|
403
|
+
/** @description Whether custom topics is enabled, either true or false */
|
|
460
404
|
custom_topics?: boolean | null;
|
|
461
405
|
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
|
|
462
406
|
disfluencies?: boolean | null;
|
|
463
|
-
/** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription)
|
|
407
|
+
/** @description Whether [Dual channel transcription](https://www.assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) is enabled, either true or false */
|
|
464
408
|
dual_channel?: boolean | null;
|
|
465
409
|
/**
|
|
466
|
-
* @description An array of results for the Entity Detection model, if it
|
|
410
|
+
* @description An array of results for the Entity Detection model, if it is enabled.
|
|
467
411
|
* See [Entity detection](https://www.assemblyai.com/docs/Models/entity_detection) for more information.
|
|
468
412
|
*/
|
|
469
413
|
entities?: Entity[] | null;
|
|
470
|
-
/** @description
|
|
414
|
+
/** @description Whether [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection) is enabled, can be true or false */
|
|
471
415
|
entity_detection?: boolean | null;
|
|
472
416
|
/** @description Error message of why the transcript failed */
|
|
473
417
|
error?: string;
|
|
474
|
-
/** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/Models/speech_recognition#profanity-filtering)
|
|
418
|
+
/** @description Whether [Profanity Filtering](https://www.assemblyai.com/docs/Models/speech_recognition#profanity-filtering) is enabled, either true or false */
|
|
475
419
|
filter_profanity?: boolean | null;
|
|
476
|
-
/** @description Whether Text Formatting
|
|
420
|
+
/** @description Whether Text Formatting is enabled, either true or false */
|
|
477
421
|
format_text?: boolean | null;
|
|
478
|
-
/** @description
|
|
422
|
+
/** @description Whether [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) is enabled, can be true or false */
|
|
479
423
|
iab_categories?: boolean | null;
|
|
480
424
|
/**
|
|
481
|
-
* @description The result of the Topic Detection model, if it
|
|
425
|
+
* @description The result of the Topic Detection model, if it is enabled.
|
|
482
426
|
* See [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification) for more information.
|
|
483
427
|
*/
|
|
484
|
-
iab_categories_result?:
|
|
485
|
-
|
|
486
|
-
results: TopicDetectionResult[];
|
|
487
|
-
/** @description Will be either success, or unavailable in the rare case that the Content Moderation model failed. */
|
|
488
|
-
status: AudioIntelligenceModelStatus;
|
|
489
|
-
/** @description The overall relevance of topic to the entire audio file */
|
|
490
|
-
summary: {
|
|
491
|
-
[key: string]: number;
|
|
492
|
-
};
|
|
493
|
-
} | null;
|
|
494
|
-
/** @description The unique identifier of your transcription */
|
|
428
|
+
iab_categories_result?: TopicDetectionModelResult | null;
|
|
429
|
+
/** @description The unique identifier of your transcript */
|
|
495
430
|
id: string;
|
|
496
431
|
/**
|
|
497
432
|
* @description The language of your audio file.
|
|
@@ -499,24 +434,24 @@ export type Transcript = {
|
|
|
499
434
|
* The default value is 'en_us'.
|
|
500
435
|
*/
|
|
501
436
|
language_code?: TranscriptLanguageCode;
|
|
502
|
-
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection)
|
|
437
|
+
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) is enabled, either true or false */
|
|
503
438
|
language_detection?: boolean | null;
|
|
504
439
|
/**
|
|
505
440
|
* @deprecated
|
|
506
|
-
* @description The language model that was used for the
|
|
441
|
+
* @description The language model that was used for the transcript
|
|
507
442
|
*/
|
|
508
443
|
language_model: string;
|
|
509
|
-
/** @description Whether Automatic Punctuation
|
|
444
|
+
/** @description Whether Automatic Punctuation is enabled, either true or false */
|
|
510
445
|
punctuate?: boolean | null;
|
|
511
|
-
/** @description Whether [PII Redaction](https://www.assemblyai.com/docs/Models/pii_redaction)
|
|
446
|
+
/** @description Whether [PII Redaction](https://www.assemblyai.com/docs/Models/pii_redaction) is enabled, either true or false */
|
|
512
447
|
redact_pii: boolean;
|
|
513
448
|
/**
|
|
514
|
-
* @description Whether a redacted version of the audio file was generated
|
|
449
|
+
* @description Whether a redacted version of the audio file was generated,
|
|
515
450
|
* either true or false. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more information.
|
|
516
451
|
*/
|
|
517
452
|
redact_pii_audio?: boolean | null;
|
|
518
453
|
/**
|
|
519
|
-
* @description The audio quality of the PII-redacted audio file, if
|
|
454
|
+
* @description The audio quality of the PII-redacted audio file, if redact_pii_audio is enabled.
|
|
520
455
|
* See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more information.
|
|
521
456
|
*/
|
|
522
457
|
redact_pii_audio_quality?: string | null;
|
|
@@ -527,16 +462,16 @@ export type Transcript = {
|
|
|
527
462
|
redact_pii_policies?: PiiPolicy[] | null;
|
|
528
463
|
/** @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
529
464
|
redact_pii_sub?: SubstitutionPolicy;
|
|
530
|
-
/** @description
|
|
465
|
+
/** @description Whether [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis) is enabled, can be true or false */
|
|
531
466
|
sentiment_analysis?: boolean | null;
|
|
532
467
|
/**
|
|
533
|
-
* @description An array of results for the Sentiment Analysis model, if it
|
|
468
|
+
* @description An array of results for the Sentiment Analysis model, if it is enabled.
|
|
534
469
|
* See [Sentiment analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis) for more information.
|
|
535
470
|
*/
|
|
536
471
|
sentiment_analysis_results?: SentimentAnalysisResult[] | null;
|
|
537
|
-
/** @description
|
|
472
|
+
/** @description Whether [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) is enabled, can be true or false */
|
|
538
473
|
speaker_labels?: boolean | null;
|
|
539
|
-
/** @description
|
|
474
|
+
/** @description Tell the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) for more details. */
|
|
540
475
|
speakers_expected?: number | null;
|
|
541
476
|
/**
|
|
542
477
|
* Format: float
|
|
@@ -546,42 +481,42 @@ export type Transcript = {
|
|
|
546
481
|
speech_threshold?: number | null;
|
|
547
482
|
/**
|
|
548
483
|
* @deprecated
|
|
549
|
-
* @description Whether speed boost
|
|
484
|
+
* @description Whether speed boost is enabled
|
|
550
485
|
*/
|
|
551
486
|
speed_boost?: boolean | null;
|
|
552
|
-
/** @description The status of your
|
|
487
|
+
/** @description The status of your transcript. Possible values are queued, processing, completed, or error. */
|
|
553
488
|
status: TranscriptStatus;
|
|
554
|
-
/** @description Whether [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
489
|
+
/** @description Whether [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled, either true or false */
|
|
555
490
|
summarization: boolean;
|
|
556
|
-
/** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
491
|
+
/** @description The generated summary of the media file, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled */
|
|
557
492
|
summary?: string | null;
|
|
558
493
|
/**
|
|
559
494
|
* @description The Summarization model used to generate the summary,
|
|
560
|
-
* if [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
495
|
+
* if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled
|
|
561
496
|
*/
|
|
562
497
|
summary_model?: string | null;
|
|
563
|
-
/** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/Models/summarization)
|
|
498
|
+
/** @description The type of summary generated, if [Summarization](https://www.assemblyai.com/docs/Models/summarization) is enabled */
|
|
564
499
|
summary_type?: string | null;
|
|
565
500
|
/** @description The textual transcript of your media file */
|
|
566
501
|
text?: string | null;
|
|
567
502
|
/** @description True while a request is throttled and false when a request is no longer throttled */
|
|
568
503
|
throttled?: boolean | null;
|
|
569
|
-
/** @description The list of custom topics provided if custom topics
|
|
504
|
+
/** @description The list of custom topics provided if custom topics is enabled */
|
|
570
505
|
topics?: string[];
|
|
571
506
|
/**
|
|
572
507
|
* @description When dual_channel or speaker_labels is enabled, a list of turn-by-turn utterance objects.
|
|
573
508
|
* See [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) for more information.
|
|
574
509
|
*/
|
|
575
510
|
utterances?: TranscriptUtterance[] | null;
|
|
576
|
-
/** @description Whether webhook authentication details were provided
|
|
511
|
+
/** @description Whether webhook authentication details were provided */
|
|
577
512
|
webhook_auth: boolean;
|
|
578
|
-
/** @description The header name which should be sent back with webhook calls
|
|
513
|
+
/** @description The header name which should be sent back with webhook calls */
|
|
579
514
|
webhook_auth_header_name?: string | null;
|
|
580
|
-
/** @description The status code we received from your server when delivering your webhook, if a webhook URL was provided
|
|
515
|
+
/** @description The status code we received from your server when delivering your webhook, if a webhook URL was provided */
|
|
581
516
|
webhook_status_code?: number | null;
|
|
582
|
-
/** @description The URL to which we send webhooks upon trancription completion
|
|
517
|
+
/** @description The URL to which we send webhooks upon trancription completion */
|
|
583
518
|
webhook_url?: string | null;
|
|
584
|
-
/** @description The list of custom vocabulary to boost transcription probability for
|
|
519
|
+
/** @description The list of custom vocabulary to boost transcription probability for */
|
|
585
520
|
word_boost?: string[];
|
|
586
521
|
/**
|
|
587
522
|
* @description An array of temporally-sequential word objects, one for each word in the transcript.
|
|
@@ -590,7 +525,7 @@ export type Transcript = {
|
|
|
590
525
|
words?: TranscriptWord[] | null;
|
|
591
526
|
};
|
|
592
527
|
/**
|
|
593
|
-
* @description The word boost parameter value
|
|
528
|
+
* @description The word boost parameter value
|
|
594
529
|
* @enum {string}
|
|
595
530
|
*/
|
|
596
531
|
export type TranscriptBoostParam = "low" | "default" | "high";
|
|
@@ -606,7 +541,7 @@ export type TranscriptCustomSpelling = {
|
|
|
606
541
|
* The default value is 'en_us'.
|
|
607
542
|
*
|
|
608
543
|
* @default en_us
|
|
609
|
-
* @enum {string
|
|
544
|
+
* @enum {string}
|
|
610
545
|
*/
|
|
611
546
|
export type TranscriptLanguageCode = "en" | "en_au" | "en_uk" | "en_us" | "es" | "fr" | "de" | "it" | "pt" | "nl" | "hi" | "ja" | "zh" | "fi" | "ko" | "pl" | "ru" | "tr" | "uk" | "vi";
|
|
612
547
|
export type TranscriptList = {
|
|
@@ -621,26 +556,103 @@ export type TranscriptListItem = {
|
|
|
621
556
|
resource_url: string;
|
|
622
557
|
status: TranscriptStatus;
|
|
623
558
|
};
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
559
|
+
/** @description The parameters for creating a transcript */
|
|
560
|
+
export type TranscriptOptionalParams = {
|
|
561
|
+
/** @description The point in time, in milliseconds, to stop transcribing in your media file */
|
|
562
|
+
audio_end_at?: number;
|
|
563
|
+
/** @description The point in time, in milliseconds, to begin transcribing in your media file */
|
|
564
|
+
audio_start_from?: number;
|
|
565
|
+
/** @description Enable [Auto Chapters](https://www.assemblyai.com/docs/Models/auto_chapters), can be true or false */
|
|
566
|
+
auto_chapters?: boolean;
|
|
567
|
+
/** @description Whether Key Phrases is enabled, either true or false */
|
|
568
|
+
auto_highlights?: boolean;
|
|
569
|
+
/** @description The word boost parameter value */
|
|
570
|
+
boost_param?: TranscriptBoostParam;
|
|
571
|
+
/** @description Enable [Content Moderation](https://www.assemblyai.com/docs/Models/content_moderation), can be true or false */
|
|
572
|
+
content_safety?: boolean;
|
|
573
|
+
/** @description Customize how words are spelled and formatted using to and from values */
|
|
574
|
+
custom_spelling?: TranscriptCustomSpelling[];
|
|
575
|
+
/** @description Whether custom topics is enabled, either true or false */
|
|
576
|
+
custom_topics?: boolean;
|
|
577
|
+
/** @description Transcribe Filler Words, like "umm", in your media file; can be true or false */
|
|
578
|
+
disfluencies?: boolean;
|
|
579
|
+
/** @description Enable [Dual Channel](https://assemblyai.com/docs/Models/speech_recognition#dual-channel-transcription) transcription, can be true or false */
|
|
580
|
+
dual_channel?: boolean;
|
|
581
|
+
/** @description Enable [Entity Detection](https://www.assemblyai.com/docs/Models/entity_detection), can be true or false */
|
|
582
|
+
entity_detection?: boolean;
|
|
583
|
+
/** @description Filter profanity from the transcribed text, can be true or false */
|
|
584
|
+
filter_profanity?: boolean;
|
|
585
|
+
/** @description Enable Text Formatting, can be true or false */
|
|
586
|
+
format_text?: boolean;
|
|
587
|
+
/** @description Enable [Topic Detection](https://www.assemblyai.com/docs/Models/iab_classification), can be true or false */
|
|
588
|
+
iab_categories?: boolean;
|
|
629
589
|
/**
|
|
630
|
-
*
|
|
631
|
-
*
|
|
590
|
+
* @description The language of your audio file. Possible values are found in [Supported Languages](https://www.assemblyai.com/docs/Concepts/supported_languages).
|
|
591
|
+
* The default value is 'en_us'.
|
|
632
592
|
*/
|
|
633
|
-
|
|
593
|
+
language_code?: TranscriptLanguageCode | null;
|
|
594
|
+
/** @description Whether [Automatic language detection](https://www.assemblyai.com/docs/Models/speech_recognition#automatic-language-detection) is enabled, either true or false */
|
|
595
|
+
language_detection?: boolean;
|
|
596
|
+
/** @description Enable Automatic Punctuation, can be true or false */
|
|
597
|
+
punctuate?: boolean;
|
|
598
|
+
/** @description Redact PII from the transcribed text using the Redact PII model, can be true or false */
|
|
599
|
+
redact_pii?: boolean;
|
|
600
|
+
/** @description Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
601
|
+
redact_pii_audio?: boolean;
|
|
634
602
|
/**
|
|
635
|
-
*
|
|
636
|
-
* @
|
|
637
|
-
* @default 10
|
|
603
|
+
* @description Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details.
|
|
604
|
+
* @default mp3
|
|
638
605
|
*/
|
|
639
|
-
|
|
640
|
-
/** @description
|
|
641
|
-
|
|
642
|
-
/** @description
|
|
643
|
-
|
|
606
|
+
redact_pii_audio_quality?: string;
|
|
607
|
+
/** @description The list of PII Redaction policies to enable. See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
608
|
+
redact_pii_policies?: PiiPolicy[];
|
|
609
|
+
/** @description The replacement logic for detected PII, can be "entity_type" or "hash". See [PII redaction](https://www.assemblyai.com/docs/Models/pii_redaction) for more details. */
|
|
610
|
+
redact_pii_sub?: SubstitutionPolicy | null;
|
|
611
|
+
/** @description Enable [Sentiment Analysis](https://www.assemblyai.com/docs/Models/sentiment_analysis), can be true or false */
|
|
612
|
+
sentiment_analysis?: boolean;
|
|
613
|
+
/** @description Enable [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization), can be true or false */
|
|
614
|
+
speaker_labels?: boolean;
|
|
615
|
+
/**
|
|
616
|
+
* @description Tell the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/Models/speaker_diarization) for more details.
|
|
617
|
+
* @default null
|
|
618
|
+
*/
|
|
619
|
+
speakers_expected?: number | null;
|
|
620
|
+
/**
|
|
621
|
+
* Format: float
|
|
622
|
+
* @description Reject audio files that contain less than this fraction of speech.
|
|
623
|
+
* Valid values are in the range [0, 1] inclusive.
|
|
624
|
+
*
|
|
625
|
+
* @default null
|
|
626
|
+
*/
|
|
627
|
+
speech_threshold?: number | null;
|
|
628
|
+
/** @description Enable [Summarization](https://www.assemblyai.com/docs/Models/summarization), can be true or false */
|
|
629
|
+
summarization?: boolean;
|
|
630
|
+
/**
|
|
631
|
+
* @description The model to summarize the transcript
|
|
632
|
+
* @default informative
|
|
633
|
+
*/
|
|
634
|
+
summary_model?: SummaryModel;
|
|
635
|
+
/**
|
|
636
|
+
* @description The type of summary
|
|
637
|
+
* @default bullets
|
|
638
|
+
*/
|
|
639
|
+
summary_type?: SummaryType;
|
|
640
|
+
/** @description The list of custom topics provided, if custom topics is enabled */
|
|
641
|
+
topics?: string[];
|
|
642
|
+
/**
|
|
643
|
+
* @description The header name which should be sent back with webhook calls
|
|
644
|
+
* @default null
|
|
645
|
+
*/
|
|
646
|
+
webhook_auth_header_name?: string | null;
|
|
647
|
+
/**
|
|
648
|
+
* @description Specify a header name and value to send back with a webhook call for added security
|
|
649
|
+
* @default null
|
|
650
|
+
*/
|
|
651
|
+
webhook_auth_header_value?: string | null;
|
|
652
|
+
/** @description The URL to which AssemblyAI send webhooks upon trancription completion */
|
|
653
|
+
webhook_url?: string;
|
|
654
|
+
/** @description The list of custom vocabulary to boost transcription probability for */
|
|
655
|
+
word_boost?: string[];
|
|
644
656
|
};
|
|
645
657
|
export type TranscriptParagraph = {
|
|
646
658
|
/** Format: double */
|
|
@@ -650,6 +662,11 @@ export type TranscriptParagraph = {
|
|
|
650
662
|
text: string;
|
|
651
663
|
words: TranscriptWord[];
|
|
652
664
|
};
|
|
665
|
+
/** @description The parameters for creating a transcript */
|
|
666
|
+
export type TranscriptParams = TranscriptOptionalParams & {
|
|
667
|
+
/** @description The URL of the audio or video file to transcribe. */
|
|
668
|
+
audio_url: string;
|
|
669
|
+
};
|
|
653
670
|
export type TranscriptSentence = {
|
|
654
671
|
/** Format: double */
|
|
655
672
|
confidence: number;
|
|
@@ -659,7 +676,7 @@ export type TranscriptSentence = {
|
|
|
659
676
|
words: TranscriptWord[];
|
|
660
677
|
};
|
|
661
678
|
/**
|
|
662
|
-
* @description The status of your
|
|
679
|
+
* @description The status of your transcript. Possible values are queued, processing, completed, or error.
|
|
663
680
|
* @enum {string}
|
|
664
681
|
*/
|
|
665
682
|
export type TranscriptStatus = "queued" | "processing" | "completed" | "error";
|