@onereach/step-voice 7.0.2-processttschunk.3 → 7.0.2-processttschunk.6

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,8 @@
1
- import VoiceStep, { VoiceEvent } from './voice';
1
+ import VoiceStep, { TODO, VoiceEvent } from './voice';
2
2
  interface INPUT {
3
+ voiceId: string;
4
+ infiniteProcessing: boolean;
5
+ asr: TODO;
3
6
  }
4
7
  interface EVENT extends VoiceEvent {
5
8
  }
@@ -5,9 +5,18 @@ 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 } = this.data;
9
+ const grammar = {
10
+ id: this.currentStepId,
11
+ asr: asr.getSettings(call.asr),
12
+ };
8
13
  const command = {
9
14
  name: 'start-TTS-chunks-processing',
10
- params: {}
15
+ params: {
16
+ voiceId,
17
+ infiniteProcessing,
18
+ grammar
19
+ }
11
20
  };
12
21
  this.triggers.local(`in/voice/${call.id}`, async (event) => {
13
22
  this.log.info('Received event from voicer', event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.2-processttschunk.3",
3
+ "version": "7.0.2-processttschunk.6",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",