@fonoster/voice 0.2.22 → 0.2.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.
package/dist/voice.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { GatherOptions } from "./gather/gather";
1
2
  import { MuteOptions } from "./mute/mute";
2
3
  import { PlayOptions } from "./play/play";
3
4
  import { RecordOptions, RecordResult } from "./record/record";
@@ -103,9 +104,7 @@ export default class VoiceResponse {
103
104
  * console.log("digits: " + digits);
104
105
  * }
105
106
  */
106
- gather(options: {
107
- source: "speech,dtmf";
108
- }): Promise<string>;
107
+ gather(options?: GatherOptions): Promise<string>;
109
108
  /**
110
109
  * Waits for data entry from the user's keypad or from a stream speech provider. This command is different from `gather`
111
110
  * in that it returns a stream of results instead of a single result. You can think of it as active listening.
package/dist/voice.js CHANGED
@@ -141,7 +141,7 @@ class VoiceResponse {
141
141
  * console.log("digits: " + digits);
142
142
  * }
143
143
  */
144
- async gather(options) {
144
+ async gather(options = { source: "speech,dtmf" }) {
145
145
  let asr = null;
146
146
  if (options.source.includes("speech")) {
147
147
  (0, asserts_1.assertPluginExist)(this, "asr");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/voice",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "description": "Voice verbs",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -39,7 +39,7 @@
39
39
  "pubsub-js": "^1.9.3",
40
40
  "sync": "^0.2.5"
41
41
  },
42
- "gitHead": "255c8a0950b19565a2e11c56612d8696afaa322f",
42
+ "gitHead": "41708aee8706a586053cc051483ab6548ef74c05",
43
43
  "devDependencies": {
44
44
  "@types/pubsub-js": "^1.8.2"
45
45
  }