Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-sonospollytts

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-sonospollytts - npm Package Compare versions

Comparing version 1.1.26 to 1.1.27

5

CHANGELOG.md

@@ -8,2 +8,7 @@ ![Sample Node](img/logo.png)

<p>
<b>Version 1.1.27</b> August 2020<br/>
- Fixed an odd issue. Now "msg.nohailing=true" temporarly (and not permanently anymore) disables the hailing. If you send a new payload without msg.nohailing=true, the hailing will be heard again (that's the standard and intended behaviour.)<br/>
- Sometime the node remains in "Processing" state. Added a fix to that.
</p>
<p>
<b>Version 1.1.26</b> Juli 2020<br/>

@@ -10,0 +15,0 @@ - Stability improvement whenever internet connection is broken while downloading TTS audio from Amazon AWS service.<br/>

2

package.json
{
"name": "node-red-contrib-sonospollytts",
"version": "1.1.26",
"version": "1.1.27",
"description": "Node-Red TTS with Sonos and Amazon Polly or with your own local mp3 announcement files. Transforms the text in speech and hear it using Sonos player. Can work OFFLINE as well! This node is specific for security alarm announcement, doorbell, weather annoucement etc.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -747,2 +747,7 @@ module.exports = function (RED) {

if (!msg.hasOwnProperty("payload")) {
notifyError(node, msg, 'msg.payload must be of type String');
return;
}
try {

@@ -756,9 +761,23 @@ node.setNodeStatus({

if (!msg.hasOwnProperty("payload")) {
notifyError(node, msg, 'msg.payload must be of type String');
return;
// 17/04/2019 Verifico se possso mandare in play l'hailing
if (msg.hasOwnProperty("nohailing") && (msg.nohailing == "1" || msg.nohailing.toLowerCase() == "true")) {
node.sonoshailing = "0";
} else {
node.sonoshailing = config.sonoshailing;
// Backwart compatibiliyy, to remove with the next Version
// ################
if (node.sonoshailing == "0") {
// Remove the hailing.mp3 default file
RED.log.info('SonosPollyTTS: Hailing disabled');
} else if (node.sonoshailing == "1") {
node.sonoshailing = "Hailing_Hailing.mp3";
} else if (node.sonoshailing == "2") {
node.sonoshailing = "Hailing_ComputerCall.mp3";
} else if (node.sonoshailing == "3") {
node.sonoshailing = "Hailing_VintageSpace.mp3";
}
// ################
}
// 17/04/2019 Verifico se possso mandare in play l'hailing
if (msg.hasOwnProperty("nohailing") && (msg.nohailing == "1" || msg.nohailing.toLowerCase() == "true")) node.sonoshailing = "0";

@@ -779,2 +798,3 @@ // 09/03/2020 Change hailing

node.aMessageQueue.push(node.sonoshailing);
node.setNodeStatus({ fill: 'yellow', shape: 'dot', text: 'Queued Hail' });
}

@@ -784,2 +804,3 @@

node.aMessageQueue.push(msg.payload);
node.setNodeStatus({ fill: 'yellow', shape: 'dot', text: 'Queued' + msg.payload });

@@ -940,8 +961,12 @@ });

RED.log.info('SonosPollyTTS: HandleQueue2 - stopped: ' + success + " " + node.sSonosPlayState + " Track:" + node.sSonosTrackTitle);
var sMsg = node.aMessageQueue[0];
node.aMessageQueue.splice(0, 1); // Remove the TTS message from the queue
try {
var sMsg = node.aMessageQueue[0];
node.aMessageQueue.splice(0, 1); // Remove the TTS message from the queue
} catch (error) {
}
// Create the TTS mp3 with Polly
node.sPollyState = "transitioning";
node.sSonosPlayState = "transitioning";
// Create the TTS mp3 with Polly
Leggi(sMsg, node);
// Start the TTS queue timer

@@ -953,7 +978,10 @@ node.oTimer = setTimeout(function () { HandleQueue(node); }, 500);

// 15/11/2019 Workaround for grouping
var sMsg = node.aMessageQueue[0];
node.aMessageQueue.splice(0, 1); // Remove the TTS message from the queue
try {
var sMsg = node.aMessageQueue[0];
node.aMessageQueue.splice(0, 1); // Remove the TTS message from the queue
} catch (error) {
}
// Create the TTS mp3 with Polly
node.sPollyState = "transitioning";
node.sSonosPlayState = "transitioning";
// Create the TTS mp3 with Polly
Leggi(sMsg, node);

@@ -970,3 +998,2 @@

node.oTimer = setTimeout(function () { HandleQueue(node); }, 500);
}

@@ -973,0 +1000,0 @@

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