mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
update to latest realtimedb-helpers
This commit is contained in:
@@ -214,27 +214,27 @@ class Dialogflow extends Task {
|
||||
salt: cs.callSid
|
||||
};
|
||||
this.logger.debug({obj}, 'Dialogflow:_onIntent - playing message via tts');
|
||||
const fp = await synthAudio(obj);
|
||||
if (fp) cs.trackTmpFile(fp);
|
||||
const {filepath} = await synthAudio(obj);
|
||||
if (filepath) cs.trackTmpFile(filepath);
|
||||
|
||||
if (this.playInProgress) {
|
||||
await ep.api('uuid_break', ep.uuid).catch((err) => this.logger.info(err, 'Error killing audio'));
|
||||
}
|
||||
this.playInProgress = true;
|
||||
this.curentAudioFile = fp;
|
||||
this.curentAudioFile = filepath;
|
||||
|
||||
this.logger.debug(`starting to play tts ${fp}`);
|
||||
this.logger.debug(`starting to play tts ${filepath}`);
|
||||
|
||||
if (this.events.includes('start-play')) {
|
||||
this._performHook(cs, this.eventHook, {event: 'start-play', data: {path: fp}});
|
||||
this._performHook(cs, this.eventHook, {event: 'start-play', data: {path: filepath}});
|
||||
}
|
||||
await ep.play(fp);
|
||||
await ep.play(filepath);
|
||||
if (this.events.includes('stop-play')) {
|
||||
this._performHook(cs, this.eventHook, {event: 'stop-play', data: {path: fp}});
|
||||
this._performHook(cs, this.eventHook, {event: 'stop-play', data: {path: filepath}});
|
||||
}
|
||||
this.logger.debug(`finished ${fp}`);
|
||||
this.logger.debug(`finished ${filepath}`);
|
||||
|
||||
if (this.curentAudioFile === fp) {
|
||||
if (this.curentAudioFile === filepath) {
|
||||
this.playInProgress = false;
|
||||
if (this.queuedTasks) {
|
||||
this.logger.debug('finished playing audio and we have queued tasks');
|
||||
|
||||
@@ -184,20 +184,20 @@ class Lex extends Task {
|
||||
|
||||
try {
|
||||
this.logger.debug(`tts with ${this.vendor} ${this.voice}`);
|
||||
const fp = await synthAudio({
|
||||
const {filepath} = await synthAudio({
|
||||
text: msg,
|
||||
vendor: this.vendor,
|
||||
language: this.language,
|
||||
voice: this.voice,
|
||||
salt: cs.callSid
|
||||
});
|
||||
if (fp) cs.trackTmpFile(fp);
|
||||
if (filepath) cs.trackTmpFile(filepath);
|
||||
if (this.events.includes('start-play')) {
|
||||
this._performHook(cs, this.eventHook, {event: 'start-play', data: {path: fp}});
|
||||
this._performHook(cs, this.eventHook, {event: 'start-play', data: {path: filepath}});
|
||||
}
|
||||
await ep.play(fp);
|
||||
await ep.play(filepath);
|
||||
if (this.events.includes('stop-play')) {
|
||||
this._performHook(cs, this.eventHook, {event: 'stop-play', data: {path: fp}});
|
||||
this._performHook(cs, this.eventHook, {event: 'stop-play', data: {path: filepath}});
|
||||
}
|
||||
this.logger.debug(`finished tts, sending play_done ${this.vendor} ${this.voice}`);
|
||||
this.ep.api('aws_lex_play_done', this.ep.uuid)
|
||||
|
||||
50
package-lock.json
generated
50
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jambonz-feature-server",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -298,11 +298,11 @@
|
||||
}
|
||||
},
|
||||
"@grpc/grpc-js": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.2.5.tgz",
|
||||
"integrity": "sha512-CBCNwedw8McnEBq9jvoiJikws16WN0OiHFejQPovY71XkFWSiIqgvydYiDwpvIYDJmhPQ7qZNzW9BPndhXbx1Q==",
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.2.6.tgz",
|
||||
"integrity": "sha512-wfYwFy7CvVEmBKzeDX1kQQYrv5NBpe8Z+VwXipFvqof3lCXKch7k+4T3grKtptaH5GQ5KP9iKwPr9hMDSynIUw==",
|
||||
"requires": {
|
||||
"@types/node": "^12.12.47",
|
||||
"@types/node": ">=12.12.47",
|
||||
"google-auth-library": "^6.1.1",
|
||||
"semver": "^6.2.0"
|
||||
}
|
||||
@@ -354,21 +354,21 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"redis-commands": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz",
|
||||
"integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ=="
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz",
|
||||
"integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@jambonz/realtimedb-helpers": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/realtimedb-helpers/-/realtimedb-helpers-0.3.0.tgz",
|
||||
"integrity": "sha512-gn2S1zu0bg/UrmqOXb4K9YISZWSip1rOEITaGWCV9p211d05XBBOUYuD5RlUVGwP48dOHtGVQp8NW+f0GLxdEA==",
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/realtimedb-helpers/-/realtimedb-helpers-0.4.0.tgz",
|
||||
"integrity": "sha512-MA+JFC6oV1DpgxtSgoZBMVCz5EJkSOxjV6c6OZRXv219gvMFwbvbMPnh4f7Fhry8jbwKA4CMl5HXwmY5fp7iEQ==",
|
||||
"requires": {
|
||||
"@google-cloud/text-to-speech": "^3.1.3",
|
||||
"@jambonz/promisify-redis": "0.0.6",
|
||||
"@jambonz/stats-collector": "^0.1.4",
|
||||
"aws-sdk": "^2.810.0",
|
||||
"@jambonz/stats-collector": "^0.1.5",
|
||||
"aws-sdk": "^2.840.0",
|
||||
"debug": "^4.3.1",
|
||||
"redis": "^2.8.0"
|
||||
}
|
||||
@@ -448,9 +448,9 @@
|
||||
"integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.19.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.15.tgz",
|
||||
"integrity": "sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw=="
|
||||
"version": "14.14.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.25.tgz",
|
||||
"integrity": "sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ=="
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
@@ -593,9 +593,9 @@
|
||||
"integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="
|
||||
},
|
||||
"aws-sdk": {
|
||||
"version": "2.834.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.834.0.tgz",
|
||||
"integrity": "sha512-9WRULrn4qAmgXI+tEW/IG5s/6ixJGZqjPOrmJsFZQev7/WRkxAZmJAjcwd4Ifm/jsJbXx2FSwO76gOPEvu2LqA==",
|
||||
"version": "2.840.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.840.0.tgz",
|
||||
"integrity": "sha512-ngesHJqb0PXYjJNnCsAX4yLkR6JFQJB+3eDGwh3mYRjcq9voix5RfbCFQT1lwWu7bcMBPCrRIA2lJkkTMYXq+A==",
|
||||
"requires": {
|
||||
"buffer": "4.9.2",
|
||||
"events": "1.1.1",
|
||||
@@ -1883,9 +1883,9 @@
|
||||
}
|
||||
},
|
||||
"google-gax": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.10.0.tgz",
|
||||
"integrity": "sha512-K+1JK5ofNl5k30LsI8UQb/DeLMEbhL/SWirCx0L9pnMcApSfAjRAO7yajXT5X1vicxDBnNSwKs+cu4elxpYraw==",
|
||||
"version": "2.10.2",
|
||||
"resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.10.2.tgz",
|
||||
"integrity": "sha512-adECud3d5jsk24SvPkKQG3Kw1szpy4We0OqKfsdBHKWlSWhdY4hVQEOG7iBBp469Zm327fzz7NZz8BMLOYZJHg==",
|
||||
"requires": {
|
||||
"@grpc/grpc-js": "~1.2.0",
|
||||
"@grpc/proto-loader": "^0.5.1",
|
||||
@@ -2963,9 +2963,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "13.13.40",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.40.tgz",
|
||||
"integrity": "sha512-eKaRo87lu1yAXrzEJl0zcJxfUMDT5/mZalFyOkT44rnQps41eS2pfWzbaulSPpQLFNy29bFqn+Y5lOTL8ATlEQ=="
|
||||
"version": "13.13.41",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.41.tgz",
|
||||
"integrity": "sha512-qLT9IvHiXJfdrje9VmsLzun7cQ65obsBTmtU3EOnCSLFOoSHx1hpiRHoBnpdbyFqnzqdUUIv81JcEJQCB8un9g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jambonz-feature-server",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"main": "app.js",
|
||||
"engines": {
|
||||
"node": ">= 10.16.0"
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@jambonz/db-helpers": "^0.5.10",
|
||||
"@jambonz/realtimedb-helpers": "^0.3.0",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.0",
|
||||
"@jambonz/stats-collector": "^0.1.5",
|
||||
"bent": "^7.3.12",
|
||||
"cidr-matcher": "^2.1.1",
|
||||
|
||||
Reference in New Issue
Block a user