@onereach/step-voice 7.0.9-processttschunk.1 → 7.0.9-processttschunk.11

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.
@@ -1,5 +1,6 @@
1
1
  import VoiceStep, { TODO, VoiceEvent } from './voice';
2
2
  interface INPUT {
3
+ ttsProvider: string;
3
4
  voiceId: string;
4
5
  infiniteProcessing: boolean;
5
6
  asr: TODO;
@@ -5,7 +5,7 @@ const voice_1 = tslib_1.__importDefault(require("./voice"));
5
5
  class StartTTSChunksProcessing extends voice_1.default {
6
6
  async runStep() {
7
7
  const call = await this.fetchData();
8
- const { voiceId, infiniteProcessing, asr, endpointing, minConfidence, confirmationConfidence, voiceSettings: getSettings, queryParams: getParams } = this.data;
8
+ const { voiceId, infiniteProcessing, asr, endpointing, minConfidence, confirmationConfidence, ttsProvider, voiceSettings: getSettings, queryParams: getParams } = this.data;
9
9
  const grammar = {
10
10
  id: this.currentStepId,
11
11
  asr: {
@@ -20,6 +20,7 @@ class StartTTSChunksProcessing extends voice_1.default {
20
20
  const command = {
21
21
  name: 'start-TTS-chunks-processing',
22
22
  params: {
23
+ provider: ttsProvider,
23
24
  voiceId,
24
25
  infiniteProcessing,
25
26
  grammar,
@@ -37,6 +38,15 @@ class StartTTSChunksProcessing extends voice_1.default {
37
38
  this.log.info('tts-chunks-playback-done', event.params);
38
39
  return this.exitStep('next', {}, false);
39
40
  }
41
+ case 'tts-audio/started':
42
+ case 'tts-audio/finished':
43
+ case 'tts-audio/interrupted':
44
+ case 'asr-input/started':
45
+ case 'asr-input/ended':
46
+ case 'asr-input/processed': {
47
+ this.log.warn('Received asr/tts status event', event.params);
48
+ return;
49
+ }
40
50
  case 'timeout': {
41
51
  this.log.info('timeout', event.params);
42
52
  return this.exitStep(event.params.type, {}, false);
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 & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.9-processttschunk.1",
3
+ "version": "7.0.9-processttschunk.11",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",