@onereach/step-voice 7.0.9-processttschunk.22 → 7.0.9-processttschunk.23

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.
@@ -45,13 +45,9 @@ class StartTTSChunksProcessing extends voice_1.default {
45
45
  params
46
46
  };
47
47
  this.log.debug('StartTTSChunksProcessing command', { command });
48
- this.triggers.local(`in/voice/${call.id}`, async (event) => {
49
- this.log.info('Received event from voicer', event);
48
+ this.triggers.local(`otel/voice/${call.id}`, async (event) => {
49
+ this.log.info('Received OTel event from voicer', event.params);
50
50
  switch (event.params.type) {
51
- case 'tts-chunks-playback-done': {
52
- this.log.info('tts-chunks-playback-done', event.params);
53
- return this.exitStep('next', {}, false);
54
- }
55
51
  case 'tts-audio/started':
56
52
  case 'tts-audio/finished':
57
53
  case 'tts-audio/interrupted':
@@ -61,6 +57,15 @@ class StartTTSChunksProcessing extends voice_1.default {
61
57
  this.log.warn('Received asr/tts status event', event.params);
62
58
  return;
63
59
  }
60
+ }
61
+ });
62
+ this.triggers.local(`in/voice/${call.id}`, async (event) => {
63
+ this.log.info('Received event from voicer', event);
64
+ switch (event.params.type) {
65
+ case 'tts-chunks-playback-done': {
66
+ this.log.info('tts-chunks-playback-done', event.params);
67
+ return this.exitStep('next', {}, false);
68
+ }
64
69
  case 'timeout': {
65
70
  this.log.info('timeout', event.params);
66
71
  return this.exitStep(event.params.type, {}, false);
package/dst/voice.d.ts CHANGED
@@ -76,7 +76,7 @@ export interface HandleInterruptionParams<TParams extends VoiceEvent = VoiceEven
76
76
  }>;
77
77
  reportingSettingsKey?: string;
78
78
  }
79
- export type VoiceEvents<TParams> = IEvent<TParams, WITH_VAR<'in/voice/'>> | IEvent<TParams, WITH_VAR<'in/voice/', '/event'>>;
79
+ export type VoiceEvents<TParams> = IEvent<TParams, WITH_VAR<'in/voice/'>> | IEvent<TParams, WITH_VAR<'in/voice/', '/event'>> | IEvent<TParams, WITH_VAR<'otel/voice/'>>;
80
80
  export default class VoiceStep<TIn = unknown, TOut = unknown, TParams extends VoiceEvent = VoiceEvent> extends ConvStep<IVoiceCall, TIn & {
81
81
  handleCancel?: boolean;
82
82
  }, TOut, VoiceEvents<TParams>> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.9-processttschunk.22",
3
+ "version": "7.0.9-processttschunk.23",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",