@onereach/step-voice 7.0.9-processttschunk.26 → 7.0.9-processttschunk.27

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.
@@ -64,13 +64,11 @@ class StartTTSChunksProcessing extends voice_1.default {
64
64
  this.log.info('exitData', exitData);
65
65
  const phrases = params.phrases ?? [];
66
66
  if (!lodash_1.default.isEmpty(phrases)) {
67
- const voiceProcessResult = lodash_1.default.chain(phrases)
68
- .map((p) => p.lexical)
69
- .join(' | ')
70
- .value();
67
+ // phrases are ordered by confidence; use the top one only.
68
+ const [bestPhrase] = phrases;
71
69
  await this.transcript(call, {
72
- sections: [{ text: phrases[0].text }],
73
- voiceProcessResult,
70
+ sections: [{ text: bestPhrase.text }],
71
+ voiceProcessResult: bestPhrase.lexical ?? bestPhrase.text,
74
72
  reportingSettingsKey: 'transcriptResponse',
75
73
  action: 'Call Recognition',
76
74
  actionFromBot: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.9-processttschunk.26",
3
+ "version": "7.0.9-processttschunk.27",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",