@dxos/plugin-transcription 0.7.5-main.5ae2ba8
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/LICENSE +8 -0
- package/README.md +15 -0
- package/dist/lib/browser/TranscriptContainer-SX6PNFEC.mjs +10 -0
- package/dist/lib/browser/TranscriptContainer-SX6PNFEC.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-ZSSJIFY7.mjs +7 -0
- package/dist/lib/browser/app-graph-builder-ZSSJIFY7.mjs.map +7 -0
- package/dist/lib/browser/chunk-AS364WZZ.mjs +8 -0
- package/dist/lib/browser/chunk-AS364WZZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-QIHUPVQD.mjs +80 -0
- package/dist/lib/browser/chunk-QIHUPVQD.mjs.map +7 -0
- package/dist/lib/browser/chunk-R4HHS6FA.mjs +241 -0
- package/dist/lib/browser/chunk-R4HHS6FA.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZMES3U2D.mjs +78 -0
- package/dist/lib/browser/chunk-ZMES3U2D.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +652 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/intent-resolver-EAR2TFK2.mjs +32 -0
- package/dist/lib/browser/intent-resolver-EAR2TFK2.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/react-surface-FOEWLLTZ.mjs +26 -0
- package/dist/lib/browser/react-surface-FOEWLLTZ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +17 -0
- package/dist/lib/browser/types/index.mjs.map +7 -0
- package/dist/lib/node/TranscriptContainer-HU763SN3.cjs +31 -0
- package/dist/lib/node/TranscriptContainer-HU763SN3.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-YFBX3OTP.cjs +26 -0
- package/dist/lib/node/app-graph-builder-YFBX3OTP.cjs.map +7 -0
- package/dist/lib/node/chunk-JBN3P6ZF.cjs +97 -0
- package/dist/lib/node/chunk-JBN3P6ZF.cjs.map +7 -0
- package/dist/lib/node/chunk-QWXLQPP5.cjs +40 -0
- package/dist/lib/node/chunk-QWXLQPP5.cjs.map +7 -0
- package/dist/lib/node/chunk-UIHEGU6Q.cjs +103 -0
- package/dist/lib/node/chunk-UIHEGU6Q.cjs.map +7 -0
- package/dist/lib/node/chunk-YV74Z74I.cjs +267 -0
- package/dist/lib/node/chunk-YV74Z74I.cjs.map +7 -0
- package/dist/lib/node/index.cjs +661 -0
- package/dist/lib/node/index.cjs.map +7 -0
- package/dist/lib/node/intent-resolver-3KJZGGUQ.cjs +44 -0
- package/dist/lib/node/intent-resolver-3KJZGGUQ.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -0
- package/dist/lib/node/react-surface-AGGGDOUC.cjs +49 -0
- package/dist/lib/node/react-surface-AGGGDOUC.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +39 -0
- package/dist/lib/node/types/index.cjs.map +7 -0
- package/dist/lib/node-esm/TranscriptContainer-DVBXQIQ4.mjs +11 -0
- package/dist/lib/node-esm/TranscriptContainer-DVBXQIQ4.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-77GQG6UF.mjs +9 -0
- package/dist/lib/node-esm/app-graph-builder-77GQG6UF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-36EQXBWR.mjs +242 -0
- package/dist/lib/node-esm/chunk-36EQXBWR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KEG3ME4O.mjs +82 -0
- package/dist/lib/node-esm/chunk-KEG3ME4O.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WEZGRUG6.mjs +10 -0
- package/dist/lib/node-esm/chunk-WEZGRUG6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XYU6B73V.mjs +80 -0
- package/dist/lib/node-esm/chunk-XYU6B73V.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +653 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/intent-resolver-UGLYRD4X.mjs +33 -0
- package/dist/lib/node-esm/intent-resolver-UGLYRD4X.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/react-surface-6AYPLJ2B.mjs +27 -0
- package/dist/lib/node-esm/react-surface-6AYPLJ2B.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +18 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/TranscriptionPlugin.d.ts +2 -0
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +180 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +4 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +181 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/Transcript.d.ts +7 -0
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +9 -0
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/index.d.ts +2 -0
- package/dist/types/src/components/Transcript/index.d.ts.map +1 -0
- package/dist/types/src/components/TranscriptContainer.d.ts +7 -0
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +6 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/components/transcription.stories.d.ts +14 -0
- package/dist/types/src/components/transcription.stories.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +6 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useAudioFile.d.ts +7 -0
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -0
- package/dist/types/src/hooks/useAudioTrack.d.ts +5 -0
- package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -0
- package/dist/types/src/hooks/useIsSpeaking.d.ts +2 -0
- package/dist/types/src/hooks/useIsSpeaking.d.ts.map +1 -0
- package/dist/types/src/hooks/useTranscriber.d.ts +10 -0
- package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -0
- package/dist/types/src/hooks/useVoiceInput.d.ts +11 -0
- package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +11 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/sanity.test.d.ts +2 -0
- package/dist/types/src/sanity.test.d.ts.map +1 -0
- package/dist/types/src/transcriber/audio-recorder.d.ts +47 -0
- package/dist/types/src/transcriber/audio-recorder.d.ts.map +1 -0
- package/dist/types/src/transcriber/index.d.ts +4 -0
- package/dist/types/src/transcriber/index.d.ts.map +1 -0
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +26 -0
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcriber.d.ts +46 -0
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
- package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +40 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +63 -0
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +28 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/util/array.d.ts +2 -0
- package/dist/types/src/util/array.d.ts.map +1 -0
- package/dist/types/src/util/get-time-str.d.ts +2 -0
- package/dist/types/src/util/get-time-str.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +5 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/monitor-audio-level.d.ts +6 -0
- package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -0
- package/dist/types/src/util/random-queue-dxn.d.ts +3 -0
- package/dist/types/src/util/random-queue-dxn.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +93 -0
- package/src/TranscriptionPlugin.tsx +57 -0
- package/src/capabilities/app-graph-builder.ts +7 -0
- package/src/capabilities/capabilities.ts +12 -0
- package/src/capabilities/index.ts +11 -0
- package/src/capabilities/intent-resolver.ts +24 -0
- package/src/capabilities/react-surface.tsx +21 -0
- package/src/components/Transcript/Transcript.stories.tsx +65 -0
- package/src/components/Transcript/Transcript.tsx +69 -0
- package/src/components/Transcript/index.ts +5 -0
- package/src/components/TranscriptContainer.tsx +167 -0
- package/src/components/index.ts +10 -0
- package/src/components/transcription.stories.tsx +198 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useAudioFile.ts +62 -0
- package/src/hooks/useAudioTrack.ts +35 -0
- package/src/hooks/useIsSpeaking.ts +77 -0
- package/src/hooks/useTranscriber.ts +62 -0
- package/src/hooks/useVoiceInput.ts +66 -0
- package/src/index.ts +11 -0
- package/src/meta.ts +17 -0
- package/src/sanity.test.ts +11 -0
- package/src/transcriber/audio-recorder.ts +56 -0
- package/src/transcriber/index.ts +7 -0
- package/src/transcriber/media-stream-recorder.ts +109 -0
- package/src/transcriber/transcriber.test.ts +230 -0
- package/src/transcriber/transcriber.ts +247 -0
- package/src/translations.ts +28 -0
- package/src/types/index.ts +6 -0
- package/src/types/schema.ts +60 -0
- package/src/types/types.ts +34 -0
- package/src/util/array.ts +14 -0
- package/src/util/get-time-str.ts +12 -0
- package/src/util/index.ts +8 -0
- package/src/util/monitor-audio-level.ts +58 -0
- package/src/util/random-queue-dxn.ts +9 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export declare const AppGraphBuilder: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<Readonly<{
|
|
2
|
+
id: string;
|
|
3
|
+
position: import("@dxos/util").Position;
|
|
4
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
5
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
6
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
7
|
+
type?: string;
|
|
8
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
id: string;
|
|
11
|
+
position: import("@dxos/util").Position;
|
|
12
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
13
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
14
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
15
|
+
type?: string;
|
|
16
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
17
|
+
}>[] | (Readonly<{
|
|
18
|
+
id: string;
|
|
19
|
+
position: import("@dxos/util").Position;
|
|
20
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
21
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
22
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
23
|
+
type?: string;
|
|
24
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
id: string;
|
|
27
|
+
position: import("@dxos/util").Position;
|
|
28
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
29
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
30
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
31
|
+
type?: string;
|
|
32
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
33
|
+
}>[] | (Readonly<{
|
|
34
|
+
id: string;
|
|
35
|
+
position: import("@dxos/util").Position;
|
|
36
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
37
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
38
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
39
|
+
type?: string;
|
|
40
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
41
|
+
}> | Readonly<{
|
|
42
|
+
id: string;
|
|
43
|
+
position: import("@dxos/util").Position;
|
|
44
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
45
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
46
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
47
|
+
type?: string;
|
|
48
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
49
|
+
}>[] | (Readonly<{
|
|
50
|
+
id: string;
|
|
51
|
+
position: import("@dxos/util").Position;
|
|
52
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
53
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
54
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
55
|
+
type?: string;
|
|
56
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
57
|
+
}> | Readonly<{
|
|
58
|
+
id: string;
|
|
59
|
+
position: import("@dxos/util").Position;
|
|
60
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
61
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
62
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
63
|
+
type?: string;
|
|
64
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
65
|
+
}>[] | (Readonly<{
|
|
66
|
+
id: string;
|
|
67
|
+
position: import("@dxos/util").Position;
|
|
68
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
69
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
70
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
71
|
+
type?: string;
|
|
72
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
73
|
+
}> | Readonly<{
|
|
74
|
+
id: string;
|
|
75
|
+
position: import("@dxos/util").Position;
|
|
76
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
77
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
78
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
79
|
+
type?: string;
|
|
80
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
81
|
+
}>[] | (Readonly<{
|
|
82
|
+
id: string;
|
|
83
|
+
position: import("@dxos/util").Position;
|
|
84
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
85
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
86
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
87
|
+
type?: string;
|
|
88
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
89
|
+
}> | Readonly<{
|
|
90
|
+
id: string;
|
|
91
|
+
position: import("@dxos/util").Position;
|
|
92
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
93
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
94
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
95
|
+
type?: string;
|
|
96
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
97
|
+
}>[] | (Readonly<{
|
|
98
|
+
id: string;
|
|
99
|
+
position: import("@dxos/util").Position;
|
|
100
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
101
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
102
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
103
|
+
type?: string;
|
|
104
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
105
|
+
}> | Readonly<{
|
|
106
|
+
id: string;
|
|
107
|
+
position: import("@dxos/util").Position;
|
|
108
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
109
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
110
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
111
|
+
type?: string;
|
|
112
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
113
|
+
}>[] | (Readonly<{
|
|
114
|
+
id: string;
|
|
115
|
+
position: import("@dxos/util").Position;
|
|
116
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
117
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
118
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
119
|
+
type?: string;
|
|
120
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
121
|
+
}> | Readonly<{
|
|
122
|
+
id: string;
|
|
123
|
+
position: import("@dxos/util").Position;
|
|
124
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
125
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
126
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
127
|
+
type?: string;
|
|
128
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
129
|
+
}>[] | (Readonly<{
|
|
130
|
+
id: string;
|
|
131
|
+
position: import("@dxos/util").Position;
|
|
132
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
133
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
134
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
135
|
+
type?: string;
|
|
136
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
137
|
+
}> | Readonly<{
|
|
138
|
+
id: string;
|
|
139
|
+
position: import("@dxos/util").Position;
|
|
140
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
141
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
142
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
143
|
+
type?: string;
|
|
144
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
145
|
+
}>[] | (Readonly<{
|
|
146
|
+
id: string;
|
|
147
|
+
position: import("@dxos/util").Position;
|
|
148
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
149
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
150
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
151
|
+
type?: string;
|
|
152
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
153
|
+
}> | Readonly<{
|
|
154
|
+
id: string;
|
|
155
|
+
position: import("@dxos/util").Position;
|
|
156
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
157
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
158
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
159
|
+
type?: string;
|
|
160
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
161
|
+
}>[] | (any[] | Readonly<{
|
|
162
|
+
id: string;
|
|
163
|
+
position: import("@dxos/util").Position;
|
|
164
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
165
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
166
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
167
|
+
type?: string;
|
|
168
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
169
|
+
}> | Readonly<{
|
|
170
|
+
id: string;
|
|
171
|
+
position: import("@dxos/util").Position;
|
|
172
|
+
resolver?: import("@dxos/app-graph").ResolverExtension;
|
|
173
|
+
connector?: import("@dxos/app-graph").ConnectorExtension;
|
|
174
|
+
relation?: import("@dxos/app-graph").Relation;
|
|
175
|
+
type?: string;
|
|
176
|
+
filter?: (node: import("@dxos/app-graph").Node) => boolean;
|
|
177
|
+
}>[])[])[])[])[])[])[])[])[])[])[]> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
178
|
+
export declare const IntentResolver: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
179
|
+
export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
180
|
+
export * from './capabilities';
|
|
181
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;qBAKyjG,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAwF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;;;qBAAqF,YAAY;sBAAsC,iBAAiB;uBAAgD,iBAAiB;sBAAgD,iBAAiB;;2BAAkE,iBAAiB;qFALpzV,CAAC;AACzE,eAAO,MAAM,cAAc,mPAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,gMAAwC,CAAC;AAElE,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA+B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAM5E,cAAc;AAAvC,wBAaK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAM/E,wBAQK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transcript.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/Transcript.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAiD1C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import { type StoryObj, type Meta } from '@storybook/react';
|
|
3
|
+
import { Transcript } from './Transcript';
|
|
4
|
+
declare const meta: Meta<typeof Transcript>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Transcript>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Empty: Story;
|
|
9
|
+
//# sourceMappingURL=Transcript.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transcript.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/Transcript.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAO5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAqBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAUzC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranscriptContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/TranscriptContainer.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAkC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAsBvE,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhE,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC;IAAE,UAAU,EAAE,cAAc,CAAA;CAAE,CAkDrE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,mBAAmB;;GAA8C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import { type StoryObj, type Meta } from '@storybook/react';
|
|
3
|
+
import { type DXN } from '@dxos/keys';
|
|
4
|
+
declare const AudioFile: ({ queueDxn, audioUrl }: {
|
|
5
|
+
queueDxn: DXN;
|
|
6
|
+
audioUrl: string;
|
|
7
|
+
transcriptUrl: string;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const meta: Meta<typeof AudioFile>;
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof AudioFile>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const File: Story;
|
|
14
|
+
//# sourceMappingURL=transcription.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/transcription.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAa5D,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AA4EtC,QAAA,MAAM,SAAS,2BAA4B;IAAE,QAAQ,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,4CA6DpG,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAqBhC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAudioFile.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAudioFile.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,MAAM,KAAG,aA+C/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAudioTrack.ts"],"names":[],"mappings":"AAMA;;GAEG;AAEH,eAAO,MAAM,aAAa,YAAa,OAAO,KAAG,gBAAgB,GAAG,SAwBnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsSpeaking.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useIsSpeaking.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa,sBAAuB,gBAAgB,YAoEhE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Transcriber, type TranscriberParams } from '../transcriber';
|
|
2
|
+
export type UseTranscriberProps = {
|
|
3
|
+
audioStreamTrack?: MediaStreamTrack;
|
|
4
|
+
onSegments?: TranscriberParams['onSegments'];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Records audio while user is speaking and transcribes it after user is done speaking.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useTranscriber: ({ audioStreamTrack, onSegments }: UseTranscriberProps) => Transcriber | undefined;
|
|
10
|
+
//# sourceMappingURL=useTranscriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranscriber.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTranscriber.ts"],"names":[],"mappings":"AAMA,OAAO,EAAuB,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAoB1F,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;CAC9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,qCAAsC,mBAAmB,4BA2BnF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type UseVoiceInputProps = {
|
|
2
|
+
active?: boolean;
|
|
3
|
+
onUpdate: (text: string) => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Hook for voice input.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useVoiceInput: ({ active, onUpdate }: UseVoiceInputProps) => {
|
|
9
|
+
recording: boolean;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useVoiceInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVoiceInput.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVoiceInput.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,yBAA0B,kBAAkB;;CA0CrE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAE9B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const TRANSCRIPTION_PLUGIN = "dxos.org/plugin/transcription";
|
|
2
|
+
export declare const meta: {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
source: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
screenshots: never[];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,kCAAkC,CAAC;AAEpE,eAAO,MAAM,IAAI;;;;;;;;CAQK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanity.test.d.ts","sourceRoot":"","sources":["../../../src/sanity.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type AudioChunk = {
|
|
2
|
+
/**
|
|
3
|
+
* Timestamp of the beginning of the chunk.
|
|
4
|
+
*/
|
|
5
|
+
timestamp: number;
|
|
6
|
+
/**
|
|
7
|
+
* 16-bit PCM data.
|
|
8
|
+
*/
|
|
9
|
+
data: Float64Array;
|
|
10
|
+
};
|
|
11
|
+
export type WavConfig = {
|
|
12
|
+
channels: number;
|
|
13
|
+
sampleRate: number;
|
|
14
|
+
bitDepthCode: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Records MediaStreamTrack to Uint8Array 16-bit PCM data.
|
|
18
|
+
* The data is passed to the onChunk callback with the timestamp of the chunk.
|
|
19
|
+
* All chunks are aligned and sequential.
|
|
20
|
+
* Time ─────────────────────────────────────────────────►
|
|
21
|
+
*
|
|
22
|
+
* Recording:
|
|
23
|
+
* t1 ┌──────┐
|
|
24
|
+
* t2 ┌──────┬──────┐
|
|
25
|
+
* t3 ┌──────┬──────┬──────┐
|
|
26
|
+
* t4 ┌──────┬──────┬──────┬──────┐
|
|
27
|
+
* └──────┴──────┴──────┴──────┘
|
|
28
|
+
* 1st 2nd 3rd 4th
|
|
29
|
+
* chunk chunk chunk chunk
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export interface AudioRecorder {
|
|
33
|
+
wavConfig: WavConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Sets callback for receiving audio chunks.
|
|
36
|
+
*/
|
|
37
|
+
setOnChunk(onChunk: (chunk: AudioChunk) => void): void;
|
|
38
|
+
/**
|
|
39
|
+
* Starts the recorder.
|
|
40
|
+
*/
|
|
41
|
+
start(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Stops the recorder.
|
|
44
|
+
*/
|
|
45
|
+
stop(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=audio-recorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-recorder.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/audio-recorder.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI,CAAC;IAEvD;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type WavConfig, type AudioChunk, type AudioRecorder } from './audio-recorder';
|
|
2
|
+
/**
|
|
3
|
+
* Recorder that uses the MediaContext API and AudioNode API to record audio.
|
|
4
|
+
*
|
|
5
|
+
* It records MediaStream using https://www.npmjs.com/package/extendable-media-recorder.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MediaStreamRecorder implements AudioRecorder {
|
|
8
|
+
private readonly _mediaStreamTrack;
|
|
9
|
+
/**
|
|
10
|
+
* Default MediaRecorder implementation do not support wav encoding.
|
|
11
|
+
*/
|
|
12
|
+
private readonly _interval;
|
|
13
|
+
private _mediaRecorder?;
|
|
14
|
+
private _header?;
|
|
15
|
+
private _onChunk?;
|
|
16
|
+
constructor({ mediaStreamTrack, interval }: {
|
|
17
|
+
mediaStreamTrack: MediaStreamTrack;
|
|
18
|
+
interval: number;
|
|
19
|
+
});
|
|
20
|
+
get wavConfig(): WavConfig;
|
|
21
|
+
setOnChunk(onChunk: (chunk: AudioChunk) => void): void;
|
|
22
|
+
start(): Promise<void>;
|
|
23
|
+
stop(): Promise<void>;
|
|
24
|
+
private _ondataavailable;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=media-stream-recorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-stream-recorder.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/media-stream-recorder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASvF;;;;GAIG;AACH,qBACa,mBAAoB,YAAW,aAAa;IACvD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmB;IACrD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,cAAc,CAAC,CAA6B;IACpD,OAAO,CAAC,OAAO,CAAC,CAAyB;IACzC,OAAO,CAAC,QAAQ,CAAC,CAA8B;gBAEnC,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;QAAE,gBAAgB,EAAE,gBAAgB,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;IAKpG,IAAI,SAAS,IAAI,SAAS,CAOzB;IAED,UAAU,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAIhD,KAAK;IAkBL,IAAI;YAQI,gBAAgB;CA2B/B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type Context, Resource } from '@dxos/context';
|
|
2
|
+
import { type AudioRecorder } from './audio-recorder';
|
|
3
|
+
import { type TranscriptSegment } from '../types';
|
|
4
|
+
export type TranscribeConfig = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of chunks to transcribe automatically after.
|
|
7
|
+
*/
|
|
8
|
+
transcribeAfterChunksAmount: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of chunks to save before the user starts speaking.
|
|
11
|
+
* This is needed to catch the beginning of the user's speech.
|
|
12
|
+
*/
|
|
13
|
+
prefixBufferChunksAmount: number;
|
|
14
|
+
};
|
|
15
|
+
export type TranscriberParams = {
|
|
16
|
+
config: TranscribeConfig;
|
|
17
|
+
recorder: AudioRecorder;
|
|
18
|
+
onSegments: (segments: TranscriptSegment[]) => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Handles transcription of audio chunks.
|
|
22
|
+
* If user is not speaking, the last `minChunksAmount` chunks are saved and transcribed.
|
|
23
|
+
* If user is speaking, the chunks are added to the buffer until the user is done talking.
|
|
24
|
+
*/
|
|
25
|
+
export declare class Transcriber extends Resource {
|
|
26
|
+
private _audioChunks;
|
|
27
|
+
private _lastUsedTimestamp;
|
|
28
|
+
private readonly _openTrigger;
|
|
29
|
+
private readonly _config;
|
|
30
|
+
private readonly _recorder;
|
|
31
|
+
private readonly _onSegments;
|
|
32
|
+
private _recording;
|
|
33
|
+
private _transcribeTask?;
|
|
34
|
+
constructor({ config, recorder, onSegments }: TranscriberParams);
|
|
35
|
+
protected _open(ctx: Context): Promise<void>;
|
|
36
|
+
protected _close(): Promise<void>;
|
|
37
|
+
startChunksRecording(): void;
|
|
38
|
+
stopChunksRecording(): void;
|
|
39
|
+
private _saveAudioChunk;
|
|
40
|
+
private _transcribe;
|
|
41
|
+
private _dropOldChunks;
|
|
42
|
+
private _mergeAudioChunks;
|
|
43
|
+
private _fetchTranscription;
|
|
44
|
+
private _alignSegments;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=transcriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriber.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcriber.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAkB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIvE,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAsCrE,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,2BAA2B,EAAE,MAAM,CAAC;IAEpC;;;OAGG;IACH,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D,CAAC;AAEF;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,kBAAkB,CAAK;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoC;IAEjE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAC1C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkC;IAE9D,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAC,CAA2B;gBAEvC,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,iBAAiB;cAOtC,KAAK,CAAC,GAAG,EAAE,OAAO;cAOlB,MAAM;IAM/B,oBAAoB;IAOpB,mBAAmB;IAQnB,OAAO,CAAC,eAAe;YAgBT,WAAW;IAoBzB,OAAO,CAAC,cAAc;YAOR,iBAAiB;YAejB,mBAAmB;IAiCjC,OAAO,CAAC,cAAc;CAiCvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriber.test.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcriber.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'en-US': {
|
|
3
|
+
[x: string]: {
|
|
4
|
+
'typename label': string;
|
|
5
|
+
'plugin name'?: undefined;
|
|
6
|
+
'calls label'?: undefined;
|
|
7
|
+
'calls panel label'?: undefined;
|
|
8
|
+
'create calls label'?: undefined;
|
|
9
|
+
'delete calls label'?: undefined;
|
|
10
|
+
'delete button'?: undefined;
|
|
11
|
+
'bookmark button'?: undefined;
|
|
12
|
+
'summary button'?: undefined;
|
|
13
|
+
'summarizing label'?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
'plugin name': string;
|
|
16
|
+
'calls label': string;
|
|
17
|
+
'calls panel label': string;
|
|
18
|
+
'create calls label': string;
|
|
19
|
+
'delete calls label': string;
|
|
20
|
+
'delete button': string;
|
|
21
|
+
'bookmark button': string;
|
|
22
|
+
'summary button': string;
|
|
23
|
+
'summarizing label': string;
|
|
24
|
+
'typename label'?: undefined;
|
|
25
|
+
};
|
|
26
|
+
"dxos.org/plugin/transcription": {
|
|
27
|
+
'plugin name': string;
|
|
28
|
+
'calls label': string;
|
|
29
|
+
'calls panel label': string;
|
|
30
|
+
'create calls label': string;
|
|
31
|
+
'delete calls label': string;
|
|
32
|
+
'delete button': string;
|
|
33
|
+
'bookmark button': string;
|
|
34
|
+
'summary button': string;
|
|
35
|
+
'summarizing label': string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}[];
|
|
39
|
+
export default _default;
|
|
40
|
+
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAoBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|