@autoscriber/core 0.1.7 → 0.1.8
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/dist/core/assistant-client.d.ts.map +1 -1
- package/dist/index.cjs +28 -13
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -12
- package/dist/utils/i18n.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-client.d.ts","sourceRoot":"","sources":["../../src/core/assistant-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAEhB,cAAc,EAEd,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAwBlB,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAmC;IAEvD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAE3C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IAEnD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwC;IAErE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAE5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IAEnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyB;IAEzD,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,CAAC,QAAQ,CAAoB;IAEpC,OAAO,CAAC,WAAW,CAAuB;IAE1C,OAAO,CAAC,WAAW,CAAoB;IAEvC,OAAO,CAAC,kBAAkB,CAAoB;IAE9C,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,eAAe,CAAqC;IAE5D,OAAO,CAAC,cAAc,CAA8C;IAEpE,OAAO,CAAC,iBAAiB,CAAK;IAE9B,OAAO,CAAC,mBAAmB,CAAK;IAEhC,OAAO,CAA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|
|
23
23
|
AssistantClient: () => AssistantClient,
|
|
24
|
-
createAssistant: () => createAssistant
|
|
24
|
+
createAssistant: () => createAssistant,
|
|
25
|
+
translate: () => translate
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(src_exports);
|
|
27
28
|
|
|
@@ -106,6 +107,8 @@ var TRANSLATIONS = {
|
|
|
106
107
|
transcriptionStarted: "Transcription started",
|
|
107
108
|
transcriptionStopped: "Transcription stopped",
|
|
108
109
|
voiceCommandSilence: "Voice command cancelled - silence detected",
|
|
110
|
+
updatingContext: "Updating {{resourceType}} context",
|
|
111
|
+
summarising: "Summarising",
|
|
109
112
|
networkOffline: "\u26A0\uFE0F Network offline - messages will be sent when connection returns",
|
|
110
113
|
transcriptionStoppedOffline: "Transcription stopped - Network offline",
|
|
111
114
|
transcriptionBufferingOffline: "Transcription buffering - will resume when connection returns",
|
|
@@ -138,6 +141,8 @@ var TRANSLATIONS = {
|
|
|
138
141
|
transcriptionStarted: "Transcriptie gestart",
|
|
139
142
|
transcriptionStopped: "Transcriptie gestopt",
|
|
140
143
|
voiceCommandSilence: "Spraakopdracht geannuleerd - stilte gedetecteerd",
|
|
144
|
+
updatingContext: "{{resourceType}} context bijwerken",
|
|
145
|
+
summarising: "Samenvatten",
|
|
141
146
|
networkOffline: "\u26A0\uFE0F Netwerk offline - berichten worden verzonden zodra de verbinding terug is",
|
|
142
147
|
transcriptionStoppedOffline: "Transcriptie gestopt - Netwerk offline",
|
|
143
148
|
transcriptionBufferingOffline: "Transcriptie wordt gebufferd - gaat verder zodra we weer online zijn",
|
|
@@ -170,6 +175,8 @@ var TRANSLATIONS = {
|
|
|
170
175
|
transcriptionStarted: "Transkription gestartet",
|
|
171
176
|
transcriptionStopped: "Transkription gestoppt",
|
|
172
177
|
voiceCommandSilence: "Sprachbefehl abgebrochen \u2013 Stille erkannt",
|
|
178
|
+
updatingContext: "{{resourceType}} Kontext aktualisieren",
|
|
179
|
+
summarising: "Zusammenfassen",
|
|
173
180
|
networkOffline: "\u26A0\uFE0F Netzwerk offline \u2013 Nachrichten werden gesendet, sobald die Verbindung zur\xFCck ist",
|
|
174
181
|
transcriptionStoppedOffline: "Transkription gestoppt \u2013 Netzwerk offline",
|
|
175
182
|
transcriptionBufferingOffline: "Transkription wird gepuffert \u2013 l\xE4uft weiter, sobald die Verbindung zur\xFCck ist",
|
|
@@ -977,7 +984,7 @@ var AssistantClient = class {
|
|
|
977
984
|
label: translate(this.snapshot.language, "transcriptionBufferingOffline"),
|
|
978
985
|
status: "pending",
|
|
979
986
|
type: "transcription",
|
|
980
|
-
metadata: { reason: "offline" }
|
|
987
|
+
metadata: { reason: "offline", translationKey: "transcriptionBufferingOffline" }
|
|
981
988
|
});
|
|
982
989
|
} else if (this.snapshot.recording.mode === "voice_command") {
|
|
983
990
|
this.snapshot.recording.wasTranscriptionActive = false;
|
|
@@ -986,7 +993,8 @@ var AssistantClient = class {
|
|
|
986
993
|
id: generateMessageId(),
|
|
987
994
|
label: translate(this.snapshot.language, "voiceCommandCancelledOffline"),
|
|
988
995
|
status: "error",
|
|
989
|
-
type: "voice"
|
|
996
|
+
type: "voice",
|
|
997
|
+
metadata: { translationKey: "voiceCommandCancelledOffline" }
|
|
990
998
|
});
|
|
991
999
|
this.stopRecording();
|
|
992
1000
|
}
|
|
@@ -995,7 +1003,8 @@ var AssistantClient = class {
|
|
|
995
1003
|
id: generateMessageId(),
|
|
996
1004
|
label: translate(this.snapshot.language, "networkOffline"),
|
|
997
1005
|
status: "error",
|
|
998
|
-
type: "info"
|
|
1006
|
+
type: "info",
|
|
1007
|
+
metadata: { translationKey: "networkOffline" }
|
|
999
1008
|
});
|
|
1000
1009
|
const readyState = this.websocket.readyState;
|
|
1001
1010
|
if (readyState === WebSocket.OPEN || readyState === WebSocket.CONNECTING) {
|
|
@@ -1216,7 +1225,8 @@ var AssistantClient = class {
|
|
|
1216
1225
|
id: transcriptionId,
|
|
1217
1226
|
label: translate(this.snapshot.language, "transcriptionStarted"),
|
|
1218
1227
|
status: "pending",
|
|
1219
|
-
type: "transcription"
|
|
1228
|
+
type: "transcription",
|
|
1229
|
+
metadata: { translationKey: "transcriptionStarted" }
|
|
1220
1230
|
});
|
|
1221
1231
|
if (this.bufferTimer) {
|
|
1222
1232
|
clearInterval(this.bufferTimer);
|
|
@@ -1246,7 +1256,8 @@ var AssistantClient = class {
|
|
|
1246
1256
|
id: transcriptionId,
|
|
1247
1257
|
label: translate(this.snapshot.language, "transcriptionStopped"),
|
|
1248
1258
|
status: "success",
|
|
1249
|
-
type: "transcription"
|
|
1259
|
+
type: "transcription",
|
|
1260
|
+
metadata: { translationKey: "transcriptionStopped" }
|
|
1250
1261
|
});
|
|
1251
1262
|
if (this.audioBuffer.length > 0) {
|
|
1252
1263
|
this.sendBufferedAudio(true);
|
|
@@ -1325,10 +1336,10 @@ var AssistantClient = class {
|
|
|
1325
1336
|
const sanitizedResource = this.sanitizeFhirResource(resource);
|
|
1326
1337
|
this.pushInteraction({
|
|
1327
1338
|
id,
|
|
1328
|
-
label:
|
|
1339
|
+
label: translate(this.snapshot.language, "updatingContext", { resourceType }),
|
|
1329
1340
|
status: "pending",
|
|
1330
1341
|
type: "fhir",
|
|
1331
|
-
metadata: { resourceType }
|
|
1342
|
+
metadata: { translationKey: "updatingContext", resourceType }
|
|
1332
1343
|
});
|
|
1333
1344
|
this.sendMessage({
|
|
1334
1345
|
jsonrpc: "2.0",
|
|
@@ -1352,9 +1363,10 @@ var AssistantClient = class {
|
|
|
1352
1363
|
this.emitMessages();
|
|
1353
1364
|
this.pushInteraction({
|
|
1354
1365
|
id,
|
|
1355
|
-
label: "
|
|
1366
|
+
label: translate(this.snapshot.language, "summarising"),
|
|
1356
1367
|
status: "pending",
|
|
1357
|
-
type: "questionnaire"
|
|
1368
|
+
type: "questionnaire",
|
|
1369
|
+
metadata: { translationKey: "summarising" }
|
|
1358
1370
|
});
|
|
1359
1371
|
this.sendMessage({
|
|
1360
1372
|
jsonrpc: "2.0",
|
|
@@ -1730,7 +1742,8 @@ var AssistantClient = class {
|
|
|
1730
1742
|
id: generateMessageId(),
|
|
1731
1743
|
label: translate(this.snapshot.language, "offlineBuffering"),
|
|
1732
1744
|
status: "pending",
|
|
1733
|
-
type: "info"
|
|
1745
|
+
type: "info",
|
|
1746
|
+
metadata: { translationKey: "offlineBuffering" }
|
|
1734
1747
|
});
|
|
1735
1748
|
}
|
|
1736
1749
|
this.emitConnection();
|
|
@@ -1908,7 +1921,8 @@ var AssistantClient = class {
|
|
|
1908
1921
|
id: generateMessageId(),
|
|
1909
1922
|
label: translate(this.snapshot.language, "voiceCommandSilence"),
|
|
1910
1923
|
status: "error",
|
|
1911
|
-
type: "voice"
|
|
1924
|
+
type: "voice",
|
|
1925
|
+
metadata: { translationKey: "voiceCommandSilence" }
|
|
1912
1926
|
});
|
|
1913
1927
|
return;
|
|
1914
1928
|
}
|
|
@@ -2166,5 +2180,6 @@ function createAssistant(options) {
|
|
|
2166
2180
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2167
2181
|
0 && (module.exports = {
|
|
2168
2182
|
AssistantClient,
|
|
2169
|
-
createAssistant
|
|
2183
|
+
createAssistant,
|
|
2184
|
+
translate
|
|
2170
2185
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -79,6 +79,8 @@ var TRANSLATIONS = {
|
|
|
79
79
|
transcriptionStarted: "Transcription started",
|
|
80
80
|
transcriptionStopped: "Transcription stopped",
|
|
81
81
|
voiceCommandSilence: "Voice command cancelled - silence detected",
|
|
82
|
+
updatingContext: "Updating {{resourceType}} context",
|
|
83
|
+
summarising: "Summarising",
|
|
82
84
|
networkOffline: "\u26A0\uFE0F Network offline - messages will be sent when connection returns",
|
|
83
85
|
transcriptionStoppedOffline: "Transcription stopped - Network offline",
|
|
84
86
|
transcriptionBufferingOffline: "Transcription buffering - will resume when connection returns",
|
|
@@ -111,6 +113,8 @@ var TRANSLATIONS = {
|
|
|
111
113
|
transcriptionStarted: "Transcriptie gestart",
|
|
112
114
|
transcriptionStopped: "Transcriptie gestopt",
|
|
113
115
|
voiceCommandSilence: "Spraakopdracht geannuleerd - stilte gedetecteerd",
|
|
116
|
+
updatingContext: "{{resourceType}} context bijwerken",
|
|
117
|
+
summarising: "Samenvatten",
|
|
114
118
|
networkOffline: "\u26A0\uFE0F Netwerk offline - berichten worden verzonden zodra de verbinding terug is",
|
|
115
119
|
transcriptionStoppedOffline: "Transcriptie gestopt - Netwerk offline",
|
|
116
120
|
transcriptionBufferingOffline: "Transcriptie wordt gebufferd - gaat verder zodra we weer online zijn",
|
|
@@ -143,6 +147,8 @@ var TRANSLATIONS = {
|
|
|
143
147
|
transcriptionStarted: "Transkription gestartet",
|
|
144
148
|
transcriptionStopped: "Transkription gestoppt",
|
|
145
149
|
voiceCommandSilence: "Sprachbefehl abgebrochen \u2013 Stille erkannt",
|
|
150
|
+
updatingContext: "{{resourceType}} Kontext aktualisieren",
|
|
151
|
+
summarising: "Zusammenfassen",
|
|
146
152
|
networkOffline: "\u26A0\uFE0F Netzwerk offline \u2013 Nachrichten werden gesendet, sobald die Verbindung zur\xFCck ist",
|
|
147
153
|
transcriptionStoppedOffline: "Transkription gestoppt \u2013 Netzwerk offline",
|
|
148
154
|
transcriptionBufferingOffline: "Transkription wird gepuffert \u2013 l\xE4uft weiter, sobald die Verbindung zur\xFCck ist",
|
|
@@ -950,7 +956,7 @@ var AssistantClient = class {
|
|
|
950
956
|
label: translate(this.snapshot.language, "transcriptionBufferingOffline"),
|
|
951
957
|
status: "pending",
|
|
952
958
|
type: "transcription",
|
|
953
|
-
metadata: { reason: "offline" }
|
|
959
|
+
metadata: { reason: "offline", translationKey: "transcriptionBufferingOffline" }
|
|
954
960
|
});
|
|
955
961
|
} else if (this.snapshot.recording.mode === "voice_command") {
|
|
956
962
|
this.snapshot.recording.wasTranscriptionActive = false;
|
|
@@ -959,7 +965,8 @@ var AssistantClient = class {
|
|
|
959
965
|
id: generateMessageId(),
|
|
960
966
|
label: translate(this.snapshot.language, "voiceCommandCancelledOffline"),
|
|
961
967
|
status: "error",
|
|
962
|
-
type: "voice"
|
|
968
|
+
type: "voice",
|
|
969
|
+
metadata: { translationKey: "voiceCommandCancelledOffline" }
|
|
963
970
|
});
|
|
964
971
|
this.stopRecording();
|
|
965
972
|
}
|
|
@@ -968,7 +975,8 @@ var AssistantClient = class {
|
|
|
968
975
|
id: generateMessageId(),
|
|
969
976
|
label: translate(this.snapshot.language, "networkOffline"),
|
|
970
977
|
status: "error",
|
|
971
|
-
type: "info"
|
|
978
|
+
type: "info",
|
|
979
|
+
metadata: { translationKey: "networkOffline" }
|
|
972
980
|
});
|
|
973
981
|
const readyState = this.websocket.readyState;
|
|
974
982
|
if (readyState === WebSocket.OPEN || readyState === WebSocket.CONNECTING) {
|
|
@@ -1189,7 +1197,8 @@ var AssistantClient = class {
|
|
|
1189
1197
|
id: transcriptionId,
|
|
1190
1198
|
label: translate(this.snapshot.language, "transcriptionStarted"),
|
|
1191
1199
|
status: "pending",
|
|
1192
|
-
type: "transcription"
|
|
1200
|
+
type: "transcription",
|
|
1201
|
+
metadata: { translationKey: "transcriptionStarted" }
|
|
1193
1202
|
});
|
|
1194
1203
|
if (this.bufferTimer) {
|
|
1195
1204
|
clearInterval(this.bufferTimer);
|
|
@@ -1219,7 +1228,8 @@ var AssistantClient = class {
|
|
|
1219
1228
|
id: transcriptionId,
|
|
1220
1229
|
label: translate(this.snapshot.language, "transcriptionStopped"),
|
|
1221
1230
|
status: "success",
|
|
1222
|
-
type: "transcription"
|
|
1231
|
+
type: "transcription",
|
|
1232
|
+
metadata: { translationKey: "transcriptionStopped" }
|
|
1223
1233
|
});
|
|
1224
1234
|
if (this.audioBuffer.length > 0) {
|
|
1225
1235
|
this.sendBufferedAudio(true);
|
|
@@ -1298,10 +1308,10 @@ var AssistantClient = class {
|
|
|
1298
1308
|
const sanitizedResource = this.sanitizeFhirResource(resource);
|
|
1299
1309
|
this.pushInteraction({
|
|
1300
1310
|
id,
|
|
1301
|
-
label:
|
|
1311
|
+
label: translate(this.snapshot.language, "updatingContext", { resourceType }),
|
|
1302
1312
|
status: "pending",
|
|
1303
1313
|
type: "fhir",
|
|
1304
|
-
metadata: { resourceType }
|
|
1314
|
+
metadata: { translationKey: "updatingContext", resourceType }
|
|
1305
1315
|
});
|
|
1306
1316
|
this.sendMessage({
|
|
1307
1317
|
jsonrpc: "2.0",
|
|
@@ -1325,9 +1335,10 @@ var AssistantClient = class {
|
|
|
1325
1335
|
this.emitMessages();
|
|
1326
1336
|
this.pushInteraction({
|
|
1327
1337
|
id,
|
|
1328
|
-
label: "
|
|
1338
|
+
label: translate(this.snapshot.language, "summarising"),
|
|
1329
1339
|
status: "pending",
|
|
1330
|
-
type: "questionnaire"
|
|
1340
|
+
type: "questionnaire",
|
|
1341
|
+
metadata: { translationKey: "summarising" }
|
|
1331
1342
|
});
|
|
1332
1343
|
this.sendMessage({
|
|
1333
1344
|
jsonrpc: "2.0",
|
|
@@ -1703,7 +1714,8 @@ var AssistantClient = class {
|
|
|
1703
1714
|
id: generateMessageId(),
|
|
1704
1715
|
label: translate(this.snapshot.language, "offlineBuffering"),
|
|
1705
1716
|
status: "pending",
|
|
1706
|
-
type: "info"
|
|
1717
|
+
type: "info",
|
|
1718
|
+
metadata: { translationKey: "offlineBuffering" }
|
|
1707
1719
|
});
|
|
1708
1720
|
}
|
|
1709
1721
|
this.emitConnection();
|
|
@@ -1881,7 +1893,8 @@ var AssistantClient = class {
|
|
|
1881
1893
|
id: generateMessageId(),
|
|
1882
1894
|
label: translate(this.snapshot.language, "voiceCommandSilence"),
|
|
1883
1895
|
status: "error",
|
|
1884
|
-
type: "voice"
|
|
1896
|
+
type: "voice",
|
|
1897
|
+
metadata: { translationKey: "voiceCommandSilence" }
|
|
1885
1898
|
});
|
|
1886
1899
|
return;
|
|
1887
1900
|
}
|
|
@@ -2138,5 +2151,6 @@ function createAssistant(options) {
|
|
|
2138
2151
|
}
|
|
2139
2152
|
export {
|
|
2140
2153
|
AssistantClient,
|
|
2141
|
-
createAssistant
|
|
2154
|
+
createAssistant,
|
|
2155
|
+
translate
|
|
2142
2156
|
};
|
package/dist/utils/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/utils/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/utils/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AA0HlD,wBAAgB,SAAS,CACvB,QAAQ,EAAE,iBAAiB,EAC3B,GAAG,EAAE,MAAM,EACX,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAM,GAC3C,MAAM,CASR;AAED,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,iBAAiB,CASjE;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEnF"}
|