New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fonos/voice

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fonos/voice - npm Package Compare versions

Comparing version 0.1.22 to 0.1.23

dist/answer/answer.d.ts

2

dist/gather/gather.js

@@ -32,3 +32,3 @@ "use strict";

return new Promise(async (resolve, reject) => {
logger_1.default.verbose(`@fonos/voice started gather [sources = ${options.source}]`);
logger_1.default.verbose(`@fonos/voice started gather [source = ${options.source}]`);
if (options.source.includes("dtmf")) {

@@ -35,0 +35,0 @@ source_dtmf_1.default(this.request.sessionId, options)

@@ -24,3 +24,3 @@ "use strict";

const streamData = new stream_data_1.default();
logger_1.default.verbose(`@fonos/voice started sgather [sources = ${options.source}]`);
logger_1.default.verbose(`@fonos/voice started sgather [source = ${options.source}]`);
if (options.source.includes("dtmf")) {

@@ -27,0 +27,0 @@ // TODO: Subscribe to dtmf events

@@ -21,2 +21,3 @@ import { MuteOptions } from "./mute/mute";

* async function handler (request, response) {
* await response.answer();
* await response.play("sound:hello-world");

@@ -59,2 +60,3 @@ * }

* async function handler (request, response) {
* await response.answer();
* await response.play("https://soundsserver:9000/sounds/hello-world.wav");

@@ -79,2 +81,3 @@ * }

* async function handler (request, response) {
* await response.answer();
* response.use(new GoogleTTS())

@@ -99,2 +102,3 @@ * await response.say("Hello workd"); // Plays the sound using GoogleTTS's default values

* async function handler (request, response) {
* await response.answer();
* const digits = await response.gather({numDigits: 3});

@@ -120,2 +124,3 @@ * console.log("digits: " + digits);

* async function handler (request, response) {
* await response.answer();
* const stream = await response.sgather({source: "dtmf,speech"});

@@ -142,2 +147,3 @@ *

* async function handler (request, response) {
* await response.answer();
* await response.play("sound:hello-world");

@@ -156,2 +162,3 @@ * await response.dtmf({dtmf: "1234"});

* async function handler (request, response) {
* await response.answer();
* response.onDtmfReceived(async(digit) => {

@@ -177,2 +184,3 @@ * const control = response.playback("1234")

* async function handler (request, response) {
* await response.answer();
* response.on("DtmfReceived", async(digit) => {

@@ -200,2 +208,3 @@ * const control = response.playback("1234")

* async function handler (request, response) {
* await response.answer();
* await response.mute(); // Will mute both directions

@@ -214,2 +223,3 @@ * }

* async function handler (request, response) {
* ...
* await response.unmute({direction: "out"}); // Will unmute only the "out" direction

@@ -220,2 +230,14 @@ * }

/**
* Answer the communication channel. Before running any other verb you
* must run the anwer command.
*
* @example
*
* async function handler (request, response) {
* await response.answer();
* ...
* }
*/
answer(): Promise<void>;
/**
* Terminates the communication channel.

@@ -226,2 +248,3 @@ *

* async function handler (request, response) {
* ...
* await response.hangup();

@@ -244,2 +267,3 @@ * }

* async function handler (request, response) {
* await response.answer();;
* const result = await response.record({finishOnKey: "#"});

@@ -246,0 +270,0 @@ * console.log("recording result: " + JSON.stringify(result)) // recording result: { duration: 30 ...}

@@ -24,2 +24,3 @@ "use strict";

*/
const answer_1 = __importDefault(require("./answer/answer"));
const hangup_1 = __importDefault(require("./hangup/hangup"));

@@ -48,2 +49,3 @@ const unmute_1 = __importDefault(require("./unmute/unmute"));

* async function handler (request, response) {
* await response.answer();
* await response.play("sound:hello-world");

@@ -89,2 +91,3 @@ * }

* async function handler (request, response) {
* await response.answer();
* await response.play("https://soundsserver:9000/sounds/hello-world.wav");

@@ -111,2 +114,3 @@ * }

* async function handler (request, response) {
* await response.answer();
* response.use(new GoogleTTS())

@@ -138,2 +142,3 @@ * await response.say("Hello workd"); // Plays the sound using GoogleTTS's default values

* async function handler (request, response) {
* await response.answer();
* const digits = await response.gather({numDigits: 3});

@@ -164,2 +169,3 @@ * console.log("digits: " + digits);

* async function handler (request, response) {
* await response.answer();
* const stream = await response.sgather({source: "dtmf,speech"});

@@ -193,2 +199,3 @@ *

* async function handler (request, response) {
* await response.answer();
* await response.play("sound:hello-world");

@@ -209,2 +216,3 @@ * await response.dtmf({dtmf: "1234"});

* async function handler (request, response) {
* await response.answer();
* response.onDtmfReceived(async(digit) => {

@@ -232,2 +240,3 @@ * const control = response.playback("1234")

* async function handler (request, response) {
* await response.answer();
* response.on("DtmfReceived", async(digit) => {

@@ -259,2 +268,3 @@ * const control = response.playback("1234")

* async function handler (request, response) {
* await response.answer();
* await response.mute(); // Will mute both directions

@@ -275,2 +285,3 @@ * }

* async function handler (request, response) {
* ...
* await response.unmute({direction: "out"}); // Will unmute only the "out" direction

@@ -283,2 +294,16 @@ * }

/**
* Answer the communication channel. Before running any other verb you
* must run the anwer command.
*
* @example
*
* async function handler (request, response) {
* await response.answer();
* ...
* }
*/
async answer() {
await new answer_1.default(this.request).run();
}
/**
* Terminates the communication channel.

@@ -289,2 +314,3 @@ *

* async function handler (request, response) {
* ...
* await response.hangup();

@@ -309,2 +335,3 @@ * }

* async function handler (request, response) {
* await response.answer();;
* const result = await response.record({finishOnKey: "#"});

@@ -311,0 +338,0 @@ * console.log("recording result: " + JSON.stringify(result)) // recording result: { duration: 30 ...}

{
"name": "@fonos/voice",
"version": "0.1.22",
"version": "0.1.23",
"description": "Voice verbs",

@@ -32,4 +32,4 @@ "author": "Pedro Sanders <psanders@fonoster.com>",

"dependencies": {
"@fonos/common": "^0.1.21",
"@fonos/logger": "^0.1.21",
"@fonos/common": "^0.1.23",
"@fonos/logger": "^0.1.23",
"axios": "^0.21.1",

@@ -43,3 +43,3 @@ "deepmerge": "^4.2.2",

},
"gitHead": "148704aad64bf35e4eae2b94780d75a576bbd875",
"gitHead": "001346f0108332a536d66d27f7ee630ffb7fb095",
"devDependencies": {

@@ -46,0 +46,0 @@ "@types/pubsub-js": "^1.8.2"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc