@onereach/step-voice 7.0.2-processttschunk.2 → 7.0.2-processttschunk.4

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.
@@ -13,18 +13,9 @@ class ProcessTtsChunk extends voice_1.default {
13
13
  isFinal
14
14
  }
15
15
  };
16
- // const sensitiveData: SensitiveData = {
17
- // muteStep: false,
18
- // muteUser: false,
19
- // muteBot: false,
20
- // };
21
16
  this.triggers.local(`in/voice/${call.id}`, async (event) => {
22
17
  this.log.info('Received event from voicer', event);
23
18
  });
24
- // this.triggers.otherwise(async () => {
25
- // await this.pauseRecording(call, command, sensitiveData)
26
- // this.exitStep('next')
27
- // })
28
19
  this.triggers.otherwise(async () => {
29
20
  await this.sendCommands({ ...call, type: 'tts-chunk' }, [command]);
30
21
  this.exitStep('next');
@@ -0,0 +1,11 @@
1
+ import VoiceStep, { VoiceEvent } from './voice';
2
+ interface INPUT {
3
+ voiceId: string;
4
+ infiniteProcessing: boolean;
5
+ }
6
+ interface EVENT extends VoiceEvent {
7
+ }
8
+ export default class StartTTSChunksProcessing extends VoiceStep<INPUT, {}, EVENT> {
9
+ runStep(): Promise<void>;
10
+ }
11
+ export {};
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const voice_1 = tslib_1.__importDefault(require("./voice"));
5
+ class StartTTSChunksProcessing extends voice_1.default {
6
+ async runStep() {
7
+ const call = await this.fetchData();
8
+ const { voiceId, infiniteProcessing } = this.data;
9
+ const command = {
10
+ name: 'start-TTS-chunks-processing',
11
+ params: {
12
+ voiceId,
13
+ infiniteProcessing
14
+ }
15
+ };
16
+ this.triggers.local(`in/voice/${call.id}`, async (event) => {
17
+ this.log.info('Received event from voicer', event);
18
+ });
19
+ this.triggers.otherwise(async () => {
20
+ await this.pauseRecording(call, command);
21
+ this.exitStep('next');
22
+ });
23
+ }
24
+ }
25
+ exports.default = StartTTSChunksProcessing;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.2-processttschunk.2",
3
+ "version": "7.0.2-processttschunk.4",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",