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
|
@@ -1,46 +1,49 @@
|
|
|
1
1
|
export type AudioData = {
|
|
2
|
-
/** @description
|
|
2
|
+
/** @description Base64 encoded raw audio data */
|
|
3
3
|
audio_data: string;
|
|
4
4
|
};
|
|
5
5
|
export type FinalTranscript = RealtimeBaseTranscript & {
|
|
6
6
|
/**
|
|
7
|
-
* @description Describes the type of message
|
|
7
|
+
* @description Describes the type of message
|
|
8
8
|
* @constant
|
|
9
9
|
*/
|
|
10
10
|
message_type: "FinalTranscript";
|
|
11
|
-
/** @description Whether the text
|
|
11
|
+
/** @description Whether the text is punctuated and cased */
|
|
12
12
|
punctuated: boolean;
|
|
13
|
-
/** @description Whether the text
|
|
13
|
+
/** @description Whether the text is formatted, for example Dollar -> $ */
|
|
14
14
|
text_formatted: boolean;
|
|
15
15
|
};
|
|
16
16
|
/** @enum {string} */
|
|
17
17
|
export type MessageType = "SessionBegins" | "PartialTranscript" | "FinalTranscript" | "SessionTerminated";
|
|
18
18
|
export type PartialTranscript = RealtimeBaseTranscript & {
|
|
19
19
|
/**
|
|
20
|
-
* @description Describes the type of message
|
|
20
|
+
* @description Describes the type of message
|
|
21
21
|
* @constant
|
|
22
22
|
*/
|
|
23
23
|
message_type: "PartialTranscript";
|
|
24
24
|
};
|
|
25
25
|
export type RealtimeBaseMessage = {
|
|
26
|
-
/** @description Describes the type of the message
|
|
26
|
+
/** @description Describes the type of the message */
|
|
27
27
|
message_type: MessageType;
|
|
28
28
|
};
|
|
29
29
|
export type RealtimeBaseTranscript = {
|
|
30
|
-
/** @description End time of audio sample relative to session start, in milliseconds
|
|
30
|
+
/** @description End time of audio sample relative to session start, in milliseconds */
|
|
31
31
|
audio_end: number;
|
|
32
|
-
/** @description Start time of audio sample relative to session start, in milliseconds
|
|
32
|
+
/** @description Start time of audio sample relative to session start, in milliseconds */
|
|
33
33
|
audio_start: number;
|
|
34
34
|
/**
|
|
35
35
|
* Format: double
|
|
36
|
-
* @description The confidence score of the entire transcription, between 0 and 1
|
|
36
|
+
* @description The confidence score of the entire transcription, between 0 and 1
|
|
37
37
|
*/
|
|
38
38
|
confidence: number;
|
|
39
|
-
/** @description The timestamp for the partial transcript
|
|
39
|
+
/** @description The timestamp for the partial transcript */
|
|
40
40
|
created: Date;
|
|
41
|
-
/** @description The partial transcript for your audio
|
|
41
|
+
/** @description The partial transcript for your audio */
|
|
42
42
|
text: string;
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @description An array of objects, with the information for each word in the transcription text.
|
|
45
|
+
* Includes the start and end time of the word in milliseconds, the confidence score of the word, and the text, which is the word itself.
|
|
46
|
+
*/
|
|
44
47
|
words: Word[];
|
|
45
48
|
};
|
|
46
49
|
export type RealtimeError = {
|
|
@@ -51,25 +54,25 @@ export type RealtimeTranscript = PartialTranscript | FinalTranscript;
|
|
|
51
54
|
/** @enum {string} */
|
|
52
55
|
export type RealtimeTranscriptType = "PartialTranscript" | "FinalTranscript";
|
|
53
56
|
export type SessionBegins = RealtimeBaseMessage & {
|
|
54
|
-
/** @description Timestamp when this session will expire
|
|
57
|
+
/** @description Timestamp when this session will expire */
|
|
55
58
|
expires_at: Date;
|
|
56
59
|
/**
|
|
57
|
-
* @description Describes the type of the message
|
|
60
|
+
* @description Describes the type of the message
|
|
58
61
|
* @constant
|
|
59
62
|
*/
|
|
60
63
|
message_type: "SessionBegins";
|
|
61
|
-
/** @description Unique identifier for the established session
|
|
64
|
+
/** @description Unique identifier for the established session */
|
|
62
65
|
session_id: string;
|
|
63
66
|
};
|
|
64
67
|
export type SessionTerminated = RealtimeBaseMessage & {
|
|
65
68
|
/**
|
|
66
|
-
* @description Describes the type of the message
|
|
69
|
+
* @description Describes the type of the message
|
|
67
70
|
* @constant
|
|
68
71
|
*/
|
|
69
72
|
message_type: "SessionTerminated";
|
|
70
73
|
};
|
|
71
74
|
export type TerminateSession = RealtimeBaseMessage & {
|
|
72
|
-
/** @description
|
|
75
|
+
/** @description Set to true to end your real-time session forever */
|
|
73
76
|
terminate_session: boolean;
|
|
74
77
|
};
|
|
75
78
|
export type Word = {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FileUploadParams } from "./files";
|
|
2
|
+
import { CreateRealtimeTemporaryTokenParams, LemurActionItemsParams, LemurBaseParams, LemurQuestionAnswerParams, LemurSummaryParams, LemurTaskParams, ListTranscriptParams, TranscriptOptionalParams, TranscriptParams } from "./openapi.generated";
|
|
3
|
+
import { SubmitParams, TranscribeParams } from "./transcripts";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
* Use`FileUploadParams` instead.
|
|
7
|
+
*/
|
|
8
|
+
export type FileUploadParameters = FileUploadParams;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
* Use`TranscribeParams` instead.
|
|
12
|
+
*/
|
|
13
|
+
export type TranscribeParameters = TranscribeParams;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
* Use`SubmitParams` instead.
|
|
17
|
+
*/
|
|
18
|
+
export type SubmitParameters = SubmitParams;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
* Use`CreateRealtimeTemporaryTokenParams` instead.
|
|
22
|
+
*/
|
|
23
|
+
export type CreateRealtimeTemporaryTokenParameters = CreateRealtimeTemporaryTokenParams;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
* Use`LemurActionItemsParams` instead.
|
|
27
|
+
*/
|
|
28
|
+
export type LemurActionItemsParameters = LemurActionItemsParams;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
* Use`LemurBaseParams` instead.
|
|
32
|
+
*/
|
|
33
|
+
export type LemurBaseParameters = LemurBaseParams;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
* Use`LemurQuestionAnswerParams` instead.
|
|
37
|
+
*/
|
|
38
|
+
export type LemurQuestionAnswerParameters = LemurQuestionAnswerParams;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated
|
|
41
|
+
* Use`LemurSummaryParams` instead.
|
|
42
|
+
*/
|
|
43
|
+
export type LemurSummaryParameters = LemurSummaryParams;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated
|
|
46
|
+
* Use`LemurTaskParams` instead.
|
|
47
|
+
*/
|
|
48
|
+
export type LemurTaskParameters = LemurTaskParams;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated
|
|
51
|
+
* Use`ListTranscriptParams` instead.
|
|
52
|
+
*/
|
|
53
|
+
export type TranscriptListParameters = ListTranscriptParams;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated
|
|
56
|
+
* Use`TranscriptOptionalParams` instead.
|
|
57
|
+
*/
|
|
58
|
+
export type CreateTranscriptOptionalParameters = TranscriptOptionalParams;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated
|
|
61
|
+
* Use`TranscriptParams` instead.
|
|
62
|
+
*/
|
|
63
|
+
export type CreateTranscriptParameters = TranscriptParams;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
type
|
|
2
|
+
type FileUploadParams = string | FileUploadData;
|
|
3
3
|
type FileUploadData = NodeJS.ReadableStream | ReadableStream | Blob | BufferSource | ArrayBufferView | ArrayBufferLike | Uint8Array;
|
|
4
|
-
export type {
|
|
4
|
+
export type { FileUploadParams, FileUploadData };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from "./files";
|
|
2
|
+
export * from "./transcripts";
|
|
3
|
+
export * from "./realtime";
|
|
4
|
+
export * from "./services";
|
|
5
|
+
export * from "./asyncapi.generated";
|
|
6
|
+
export * from "./openapi.generated";
|
|
7
|
+
export * from "./deprecated";
|