@eka-care/ekascribe-ts-sdk 1.4.27 → 1.4.29
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.
|
@@ -10,7 +10,7 @@ async function postV1ConvertToTemplate({ txn_id, template_id, }) {
|
|
|
10
10
|
headers,
|
|
11
11
|
body: JSON.stringify({}),
|
|
12
12
|
};
|
|
13
|
-
const response = await fetchWrapper(`${GET_EKA_VOICE_HOST_V1()}/transaction/${txn_id}/convert-to-template/${template_id}`, options);
|
|
13
|
+
const response = await fetchWrapper(`${GET_EKA_VOICE_HOST_V1()}/transaction/${txn_id}/convert-to-template/${template_id}`, options, 60000);
|
|
14
14
|
let res = await response.json();
|
|
15
15
|
res = {
|
|
16
16
|
...res,
|
|
@@ -9,6 +9,7 @@ const pauseVoiceRecording = () => {
|
|
|
9
9
|
if (!fileManagerInstance || !audioBufferInstance || !vadInstance) {
|
|
10
10
|
throw new Error('Class instances are not initialized');
|
|
11
11
|
}
|
|
12
|
+
console.log(vadInstance, 'vad in pause recording');
|
|
12
13
|
vadInstance.pauseVad();
|
|
13
14
|
const txn_id = EkaScribeStore.txnID;
|
|
14
15
|
EkaScribeStore.sessionStatus[txn_id] = {
|
|
@@ -7,6 +7,7 @@ const resumeVoiceRecording = () => {
|
|
|
7
7
|
if (!vadInstance) {
|
|
8
8
|
throw new Error('VAD instance is not initialized');
|
|
9
9
|
}
|
|
10
|
+
console.log(vadInstance, 'vad in resume recording');
|
|
10
11
|
vadInstance.startVad();
|
|
11
12
|
const txn_id = EkaScribeStore.txnID;
|
|
12
13
|
EkaScribeStore.sessionStatus[txn_id] = {
|
|
@@ -15,8 +15,11 @@ const startVoiceRecording = async () => {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
await vadInstance?.initVad();
|
|
18
|
+
console.log(vadInstance, 'vad in start recording');
|
|
18
19
|
const micVad = vadInstance?.getMicVad();
|
|
20
|
+
console.log(micVad, 'mic vad in start recording');
|
|
19
21
|
const isVadLoading = vadInstance?.isVadLoading();
|
|
22
|
+
console.log(isVadLoading, 'is vad loading in start recording');
|
|
20
23
|
if (isVadLoading || !micVad || Object.keys(micVad).length === 0) {
|
|
21
24
|
// retry initiating vad once and if still is in loading return error
|
|
22
25
|
const reinitializeVadResponse = await vadInstance?.reinitializeVad();
|