@fonos/voice
Advanced tools
Comparing version 0.0.40 to 0.0.41
@@ -6,3 +6,3 @@ import Verb from './verb'; | ||
finishOnKey?: string; | ||
offset?: number; | ||
silenceSeconds?: number; | ||
format?: string; | ||
@@ -9,0 +9,0 @@ } |
@@ -50,7 +50,7 @@ "use strict"; | ||
run(callDetailRecord, options = {}) { | ||
let { beep = true, maxDuration = 3600, finishOnKey = '1234567890#*', offset = 0, format = 'wav' } = options; | ||
let { beep = true, maxDuration = 3600, finishOnKey = '1234567890#*', silenceSeconds = 0, format = 'wav' } = options; | ||
validateMaxDuration(maxDuration); | ||
validateBeep(beep); | ||
const filename = objectid(); | ||
const res = this.channel.recordFile(`/tmp/${filename}`, format, finishOnKey, maxDuration * 1000, offset, beep); | ||
const res = this.channel.recordFile(`/tmp/${filename}`, format, finishOnKey, maxDuration * 1000, silenceSeconds, beep); | ||
if (res.code !== 200) | ||
@@ -57,0 +57,0 @@ throw new Error(res.rawReply); |
@@ -127,3 +127,3 @@ import { PlayOptions } from './play'; | ||
* recordings. Defaults to 'false' | ||
* @param {string} options.offset - Causes the recording to first seek to the | ||
* @param {string} options.silenceSeconds - Causes the recording to first seek to the | ||
* specified offset before recording begins | ||
@@ -140,3 +140,3 @@ * @param {string} options.maxDuration - Maximum duration of the recording. | ||
* beep: true, | ||
* offset: 0, | ||
* silenceSeconds: 0, | ||
* maxDuration: 3600 // Maximum duration in seconds | ||
@@ -143,0 +143,0 @@ * } |
@@ -161,3 +161,3 @@ "use strict"; | ||
* recordings. Defaults to 'false' | ||
* @param {string} options.offset - Causes the recording to first seek to the | ||
* @param {string} options.silenceSeconds - Causes the recording to first seek to the | ||
* specified offset before recording begins | ||
@@ -174,3 +174,3 @@ * @param {string} options.maxDuration - Maximum duration of the recording. | ||
* beep: true, | ||
* offset: 0, | ||
* silenceSeconds: 0, | ||
* maxDuration: 3600 // Maximum duration in seconds | ||
@@ -177,0 +177,0 @@ * } |
{ | ||
"name": "@fonos/voice", | ||
"version": "0.0.40", | ||
"version": "0.0.41", | ||
"description": "Voice verbs", | ||
@@ -37,8 +37,8 @@ "author": "Pedro Sanders <sanderspedro@gmail.com>", | ||
"dependencies": { | ||
"@fonos/events": "^0.0.40", | ||
"@fonos/logger": "^0.0.40", | ||
"@fonos/tts": "^0.0.40", | ||
"@fonos/events": "^0.0.41", | ||
"@fonos/logger": "^0.0.41", | ||
"@fonos/tts": "^0.0.41", | ||
"objectid": "^3.2.1" | ||
}, | ||
"gitHead": "26f8d2cfad3c2cf383bfa4c7d42e0abb77ab8d51" | ||
"gitHead": "26dc496300d6e7f2e511ea85c5fbd0df500460ae" | ||
} |
26016
+ Added@fonos/events@0.0.41(transitive)
+ Added@fonos/logger@0.0.41(transitive)
+ Added@fonos/tts@0.0.41(transitive)
- Removed@fonos/events@0.0.40(transitive)
- Removed@fonos/logger@0.0.40(transitive)
- Removed@fonos/tts@0.0.40(transitive)
Updated@fonos/events@^0.0.41
Updated@fonos/logger@^0.0.41
Updated@fonos/tts@^0.0.41