@onereach/step-voice 7.0.9-processttschunk.6 → 7.0.9-processttschunk.7
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/Start TTS Chunks Processing.js +10 -2
- package/dst/voice.d.ts +1 -1
- package/package.json +1 -1
|
@@ -37,6 +37,16 @@ class StartTTSChunksProcessing extends voice_1.default {
|
|
|
37
37
|
this.log.info('tts-chunks-playback-done', event.params);
|
|
38
38
|
return this.exitStep('next', {}, false);
|
|
39
39
|
}
|
|
40
|
+
case 'tts-audio/started':
|
|
41
|
+
case 'tts-audio/finished':
|
|
42
|
+
case 'tts-audio/interrupted':
|
|
43
|
+
case 'asr-input/started':
|
|
44
|
+
case 'asr-input/ended':
|
|
45
|
+
case 'asr-input/processed': {
|
|
46
|
+
this.log.warn('Received asr/tts status event', event.params);
|
|
47
|
+
// Emit in background (byThread = true) so the TTS session continues playing
|
|
48
|
+
return this.exitStep(event.params.type, event.params, true);
|
|
49
|
+
}
|
|
40
50
|
case 'timeout': {
|
|
41
51
|
this.log.info('timeout', event.params);
|
|
42
52
|
return this.exitStep(event.params.type, {}, false);
|
|
@@ -57,8 +67,6 @@ class StartTTSChunksProcessing extends voice_1.default {
|
|
|
57
67
|
}
|
|
58
68
|
case 'error':
|
|
59
69
|
return this.throwError(event.params.error);
|
|
60
|
-
default:
|
|
61
|
-
this.log.warn('Received event', { event });
|
|
62
70
|
}
|
|
63
71
|
});
|
|
64
72
|
this.triggers.otherwise(async () => {
|
package/dst/voice.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface IVoiceCall extends IConversationData {
|
|
|
33
33
|
user: string;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
export type EventType = 'hangup' | 'ack' | 'error' | 'cancel' | 'background' | 'avm-detected' | 'recognition' | 'digit' | 'digits' | 'conference-start' | 'conference-end' | 'playback' | 'timeout' | 'record' | 'bridge' | 'bridge/ended' | 'is_flow_ready' | 'call' | 'dtmf-sent' | 'tts-chunks-playback-done';
|
|
36
|
+
export type EventType = 'hangup' | 'ack' | 'error' | 'cancel' | 'background' | 'avm-detected' | 'recognition' | 'digit' | 'digits' | 'conference-start' | 'conference-end' | 'playback' | 'timeout' | 'record' | 'bridge' | 'bridge/ended' | 'is_flow_ready' | 'call' | 'dtmf-sent' | 'tts-chunks-playback-done' | 'tts-audio/started' | 'tts-audio/finished' | 'tts-audio/interrupted' | 'asr-input/started' | 'asr-input/ended' | 'asr-input/processed';
|
|
37
37
|
export declare class VoiceStepError extends BasicError {
|
|
38
38
|
}
|
|
39
39
|
export type VoicerError = Error & {
|