@onereach/step-voice 7.0.2-processttschunk.8 → 7.0.4
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/dst/Choice.js +1 -1
- package/dst/Custom Voice Input.js +1 -1
- package/dst/Keypad Input.js +1 -1
- package/dst/Say Message.js +2 -1
- package/dst/voice.js +1 -1
- package/package.json +1 -1
- package/dst/Process TTS Chunk.d.ts +0 -12
- package/dst/Process TTS Chunk.js +0 -25
- package/dst/Start TTS Chunks Processing.d.ts +0 -12
- package/dst/Start TTS Chunks Processing.js +0 -30
package/dst/Choice.js
CHANGED
|
@@ -102,7 +102,7 @@ class Choice extends voice_1.default {
|
|
|
102
102
|
event,
|
|
103
103
|
speechSections,
|
|
104
104
|
repromptsList,
|
|
105
|
-
reportingSettingsKey
|
|
105
|
+
reportingSettingsKey: this.rptsStarted ? 'transcriptReprompt' : 'transcriptPrompt'
|
|
106
106
|
});
|
|
107
107
|
switch (event.params.type) {
|
|
108
108
|
case 'digit':
|
|
@@ -93,7 +93,7 @@ class CustomVoiceInput extends voice_1.default {
|
|
|
93
93
|
event,
|
|
94
94
|
speechSections,
|
|
95
95
|
repromptsList,
|
|
96
|
-
reportingSettingsKey
|
|
96
|
+
reportingSettingsKey: this.rptsStarted ? 'transcriptReprompt' : 'transcriptPrompt'
|
|
97
97
|
});
|
|
98
98
|
switch (event.params.type) {
|
|
99
99
|
// digit recognition removed
|
package/dst/Keypad Input.js
CHANGED
package/dst/Say Message.js
CHANGED
package/dst/voice.js
CHANGED
|
@@ -417,7 +417,7 @@ class VoiceStep extends step_1.default {
|
|
|
417
417
|
if (!interruptionMetadata)
|
|
418
418
|
return;
|
|
419
419
|
const sections = [];
|
|
420
|
-
if (repromptsList.length && reportingSettingsKey === '
|
|
420
|
+
if (repromptsList.length && reportingSettingsKey === 'transcriptReprompt') {
|
|
421
421
|
const current = repromptsList[this.rptsIndex - 1];
|
|
422
422
|
sections.push({
|
|
423
423
|
url: current?.fileName,
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import VoiceStep, { VoiceEvent } from './voice';
|
|
2
|
-
interface INPUT {
|
|
3
|
-
textChunk: string;
|
|
4
|
-
isFinal: boolean;
|
|
5
|
-
}
|
|
6
|
-
interface EVENT extends VoiceEvent {
|
|
7
|
-
exitId?: string;
|
|
8
|
-
}
|
|
9
|
-
export default class ProcessTtsChunk extends VoiceStep<INPUT, {}, EVENT> {
|
|
10
|
-
runStep(): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
package/dst/Process TTS Chunk.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const voice_1 = tslib_1.__importDefault(require("./voice"));
|
|
5
|
-
class ProcessTtsChunk extends voice_1.default {
|
|
6
|
-
async runStep() {
|
|
7
|
-
const call = await this.fetchData();
|
|
8
|
-
const { textChunk, isFinal } = this.data;
|
|
9
|
-
const command = {
|
|
10
|
-
name: 'process-tts-chunk',
|
|
11
|
-
params: {
|
|
12
|
-
chunk: textChunk,
|
|
13
|
-
isFinal
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
this.triggers.local(`in/voice/${call.id}`, async (event) => {
|
|
17
|
-
this.log.info('Received event from voicer', event);
|
|
18
|
-
});
|
|
19
|
-
this.triggers.otherwise(async () => {
|
|
20
|
-
await this.sendCommands({ ...call, type: 'tts-chunk' }, [command]);
|
|
21
|
-
this.exitStep('next');
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.default = ProcessTtsChunk;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import VoiceStep, { TODO, VoiceEvent } from './voice';
|
|
2
|
-
interface INPUT {
|
|
3
|
-
voiceId: string;
|
|
4
|
-
infiniteProcessing: boolean;
|
|
5
|
-
asr: TODO;
|
|
6
|
-
}
|
|
7
|
-
interface EVENT extends VoiceEvent {
|
|
8
|
-
}
|
|
9
|
-
export default class StartTTSChunksProcessing extends VoiceStep<INPUT, {}, EVENT> {
|
|
10
|
-
runStep(): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const voice_1 = tslib_1.__importDefault(require("./voice"));
|
|
5
|
-
class StartTTSChunksProcessing extends voice_1.default {
|
|
6
|
-
async runStep() {
|
|
7
|
-
const call = await this.fetchData();
|
|
8
|
-
const { voiceId, infiniteProcessing, asr } = this.data;
|
|
9
|
-
const grammar = {
|
|
10
|
-
id: this.currentStepId,
|
|
11
|
-
asr: asr.getSettings(call.asr),
|
|
12
|
-
};
|
|
13
|
-
const command = {
|
|
14
|
-
name: 'start-TTS-chunks-processing',
|
|
15
|
-
params: {
|
|
16
|
-
voiceId,
|
|
17
|
-
infiniteProcessing,
|
|
18
|
-
grammar
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
this.triggers.local(`in/voice/${call.id}`, async (event) => {
|
|
22
|
-
this.log.info('Received event from voicer', event);
|
|
23
|
-
});
|
|
24
|
-
this.triggers.otherwise(async () => {
|
|
25
|
-
await this.pauseRecording(call, command);
|
|
26
|
-
return this.exitFlow();
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.default = StartTTSChunksProcessing;
|