@onereach/step-voice 7.0.2-processttschunk.20 → 7.0.2-processttschunk.22

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.
@@ -3,7 +3,6 @@ interface INPUT {
3
3
  textChunk: string;
4
4
  isFinal: boolean;
5
5
  flush?: boolean;
6
- voiceSettings?: any;
7
6
  }
8
7
  interface EVENT extends VoiceEvent {
9
8
  exitId?: string;
@@ -5,17 +5,16 @@ const voice_1 = tslib_1.__importDefault(require("./voice"));
5
5
  class ProcessTtsChunk extends voice_1.default {
6
6
  async runStep() {
7
7
  const call = await this.fetchData();
8
- const { textChunk, isFinal, flush, voiceSettings } = this.data;
9
- this.log.info('ProcessTtsChunkData', { data: this.data });
8
+ const { textChunk, isFinal, flush } = this.data;
10
9
  const command = {
11
10
  name: 'process-tts-chunk',
12
11
  params: {
13
12
  chunk: textChunk,
14
13
  isFinal,
15
14
  flush,
16
- voiceSettings,
17
15
  }
18
16
  };
17
+ this.log.info('ProcessTtsChunk command', { command });
19
18
  this.triggers.local(`in/voice/${call.id}`, async (event) => {
20
19
  this.log.info('Received event from voicer', event);
21
20
  });
@@ -5,6 +5,10 @@ interface INPUT {
5
5
  asr: TODO;
6
6
  endpointing: number;
7
7
  voiceSettings: any;
8
+ queryParams: any;
9
+ minConfidence: number;
10
+ enableConfirmationConfidence: boolean;
11
+ confirmationConfidence?: number;
8
12
  }
9
13
  interface EVENT extends VoiceEvent {
10
14
  phrases?: TODO[];
@@ -5,28 +5,32 @@ 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, voiceSettings: getSettings } = this.data;
8
+ const { voiceId, infiniteProcessing, asr, endpointing, minConfidence, enableConfirmationConfidence, confirmationConfidence, voiceSettings: getSettings, queryParams: getParams } = this.data;
9
9
  const grammar = {
10
10
  id: this.currentStepId,
11
11
  asr: {
12
12
  ...asr.getSettings(call.asr),
13
13
  config: {
14
- endpointing
14
+ endpointing,
15
+ minConfidence,
16
+ enableConfirmationConfidence,
17
+ confirmationConfidence
15
18
  }
16
19
  },
17
20
  };
18
- this.log.info('Get settings', { getSettings });
19
21
  const voiceSettings = await getSettings.call(this);
22
+ const queryParams = await getParams.call(this);
20
23
  const command = {
21
24
  name: 'start-TTS-chunks-processing',
22
25
  params: {
23
26
  voiceId,
24
27
  infiniteProcessing,
25
28
  grammar,
26
- voiceSettings
29
+ voiceSettings,
30
+ queryParams
27
31
  }
28
32
  };
29
- this.log.info('StartTTSChunksProcessing command', { command });
33
+ this.log.debug('StartTTSChunksProcessing command', { command });
30
34
  this.triggers.local(`in/voice/${call.id}`, async (event) => {
31
35
  this.log.info('Received event from voicer', event);
32
36
  switch (event.params.type) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.2-processttschunk.20",
3
+ "version": "7.0.2-processttschunk.22",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",