node-red-contrib-tts-ultimate 1.0.45 → 1.0.49
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/CHANGELOG.md +16 -0
- package/README.md +16 -5
- package/package.json +2 -2
- package/ttsultimate/ttsultimate-config.js +15 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.paypal.me/techtoday)
|
|
4
4
|
|
|
5
|
+
<p>
|
|
6
|
+
<b>Version 1.0.49</b> June 2022<br/>
|
|
7
|
+
- Due to Microsoft Azure SDK limitation, the node can only be installed on systems wit NodeJS versions: (^12.22.0, ^14.17.0, or >=16.0.0) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.). Currently, the Microsoft Azure SDK and, thus, TTS-Ultimate, doesn't run on NodeJS 18.x.x !!<br/>
|
|
8
|
+
</p>
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 1.0.48</b> Mai 2022<br/>
|
|
11
|
+
- Try to fixe a clunky issue with microsoft azure package, on nodejs versions that are not supported by Microsoft.<br/>
|
|
12
|
+
</p>
|
|
13
|
+
<p>
|
|
14
|
+
<b>Version 1.0.47</b> Mai 2022<br/>
|
|
15
|
+
- Fixed other compatibility issue with some Node version.<br/>
|
|
16
|
+
</p>
|
|
17
|
+
<p>
|
|
18
|
+
<b>Version 1.0.46</b> Mai 2022<br/>
|
|
19
|
+
- Fixed a compatibility issue with Node 18, where a breaking change has been introduced.<br/>
|
|
20
|
+
</p>
|
|
5
21
|
<p>
|
|
6
22
|
<b>Version 1.0.45</b> April 2022<br/>
|
|
7
23
|
- NEW: Additional players now resumes the queue as well (previously, only the main player was doing so).<br/>
|
package/README.md
CHANGED
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
```
|
|
21
21
|
</details>
|
|
22
22
|
|
|
23
|
+
## WARNING
|
|
24
|
+
Due to Microsoft Azure SDK limitation, the node can only be installed on systems wit **NodeJS** versions: (^12.22.0, ^14.17.0, or >=16.0.0) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.). Currently, the **Microsoft Azure SDK and, thus, TTS-Ultimate, doesn't run on NodeJS 18.x.x !!**
|
|
23
25
|
|
|
24
26
|
## DESCRIPTION
|
|
25
|
-
This node transforms a text into a speech audio
|
|
27
|
+
This node transforms a text into a speech audio that you can hear natively via <b>SONOS</b> speakers.<br/>
|
|
28
|
+
You can also generate an audio file for bluetooth speakers, web pages, etc.<br/>
|
|
26
29
|
Uses Amazon Polly (standard and neural engines), Google TTS voices (even without credentials nor registration) and Microsoft TTS Azure voices, and you can use it with **your own audio file** as well and it can be used **totally offline** even without the use of TTS, without internet connection.<br/>
|
|
27
30
|
The node can also create a ***TTS file (without the use of any Sonos device)***, to be read by third parties nodes.<br/>
|
|
28
31
|
This is a major ***upgrade from the previously popular node SonosPollyTTS*** (SonosPollyTTS is not developed anymore).<br/>
|
|
29
|
-
|
|
32
|
+
|
|
30
33
|
|
|
31
34
|
[](https://www.paypal.me/techtoday)
|
|
32
35
|
|
|
@@ -34,6 +37,7 @@ This is a major ***upgrade from the previously popular node SonosPollyTTS*** (So
|
|
|
34
37
|
* See <a href="https://github.com/Supergiovane/node-red-contrib-tts-ultimate/blob/master/CHANGELOG.md">here the changelog</a>
|
|
35
38
|
|
|
36
39
|
## FEATURES
|
|
40
|
+
* **Native Sonos support**: hear the TTS audio directly via Sonos. You can also group speakers, set an hailing sound, choose the volume of each speaker etc.
|
|
37
41
|
* **Output audio file**: the node can just create the TTS file to be used by other nodes. In this case, you doesn't need to use Sonos as player.
|
|
38
42
|
* **Amazon Voices, Gooogle Translate Voices, Google TTS Voices and Microsoft TTS Azure voices** are all supported, with all avaiables languages and genders.
|
|
39
43
|
* **Automatic grouping** is supported. You can group all players you want to play your announcements.
|
|
@@ -215,9 +219,16 @@ return msg;
|
|
|
215
219
|
```
|
|
216
220
|
|
|
217
221
|
```js
|
|
218
|
-
// Play
|
|
219
|
-
msg.sonoshailing = "
|
|
220
|
-
msg.payload = "
|
|
222
|
+
// Play smoke detection
|
|
223
|
+
msg.sonoshailing = "SmokeAlert";
|
|
224
|
+
msg.payload = "Warning, smoke detected. Fire extinguishers are in the kitchen, hall and garage.";
|
|
225
|
+
return msg;
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
```js
|
|
229
|
+
// Play an mp3
|
|
230
|
+
msg.sonoshailing = "MeteoJingle";
|
|
231
|
+
msg.payload = "http://192.125.22.44/meteotoday.mp3";
|
|
221
232
|
return msg;
|
|
222
233
|
```
|
|
223
234
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-tts-ultimate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"description": "Transforms the text in speech and hear it using Sonos player or generate an audio file to be used with third parties nodes. Works with voices from Amazon, Google (without credentials as well), Microsoft TTS Azure, or your own voice. You can also only create a TTS file to be read by third party nodes. Update of the popular SonosPollyTTS node.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"path": ">=0.12.7",
|
|
49
49
|
"@google-cloud/text-to-speech": "3.4.0",
|
|
50
50
|
"google-translate-tts": ">=0.2.1",
|
|
51
|
-
"microsoft-cognitiveservices-speech-sdk": "
|
|
51
|
+
"microsoft-cognitiveservices-speech-sdk": "1.21.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"eslint": ">=4.18.2",
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
const { Redshift } = require('aws-sdk');
|
|
2
|
+
|
|
1
3
|
module.exports = function (RED) {
|
|
2
4
|
'use strict';
|
|
3
5
|
|
|
6
|
+
// 31/05/2022 checking nodejs version due to Microsoft Azure SDK bad nodejs compatibility.
|
|
7
|
+
let nodejsVersion = process.version.match(/^v(\d+\.\d+)/)[1];
|
|
8
|
+
if (nodejsVersion.startsWith("18")) {
|
|
9
|
+
RED.log.error('ttsultimate-config: YOUR NODEJS VERSION IS CURRENTLY INCOMPATIBLE WITH Microsoft Azure SDK. Your NodeJS version: ' + nodejsVersion + ", please install one of these: (^12.22.0, ^14.17.0, or >=16.0.0), with SSL support.");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
4
14
|
const AWS = require('aws-sdk');
|
|
5
15
|
const GoogleTTS = require('@google-cloud/text-to-speech');
|
|
6
16
|
const GoogleTranslate = require('google-translate-tts'); // TTS without credentials, limited to 200 chars per row.
|
|
@@ -27,10 +37,7 @@ module.exports = function (RED) {
|
|
|
27
37
|
node.whoIsUsingTheServer = ""; // Client node.id using the server, because only a ttsultimate node can use the serve at once.
|
|
28
38
|
node.ttsservice = config.ttsservice || "googletranslate";
|
|
29
39
|
node.TTSRootFolderPath = (config.TTSRootFolderPath === undefined || config.TTSRootFolderPath === "") ? path.join(RED.settings.userDir, "sonospollyttsstorage") : path.join(config.TTSRootFolderPath, "sonospollyttsstorage");
|
|
30
|
-
|
|
31
|
-
// node.googleTTS = null;
|
|
32
|
-
// node.googleTranslateTTS = null;
|
|
33
|
-
// node.microsoftAzureTTS = null;
|
|
40
|
+
|
|
34
41
|
|
|
35
42
|
// 03/06/2019 you can select the temp dir
|
|
36
43
|
//#region "SETUP PATHS"
|
|
@@ -229,19 +236,19 @@ module.exports = function (RED) {
|
|
|
229
236
|
} else {
|
|
230
237
|
var sAddresses = "";
|
|
231
238
|
oiFaces[ifname].forEach(function (iface) {
|
|
232
|
-
if (iface.internal == false && iface.family
|
|
239
|
+
if (iface.internal == false && iface.family !== undefined && iface.family.toString().includes("4")) sAddresses = iface.address;
|
|
233
240
|
});
|
|
234
241
|
if (sAddresses !== "") jListInterfaces.push({ name: ifname, address: sAddresses });
|
|
235
242
|
}
|
|
236
243
|
})
|
|
237
244
|
} catch (error) { }
|
|
238
245
|
if (jListInterfaces.length > 0) {
|
|
239
|
-
return(jListInterfaces[0].address); // Retunr the first usable IP
|
|
246
|
+
return (jListInterfaces[0].address); // Retunr the first usable IP
|
|
240
247
|
} else {
|
|
241
|
-
return("NO ETH INTERFACE FOUND");
|
|
248
|
+
return ("NO ETH INTERFACE FOUND");
|
|
242
249
|
}
|
|
243
250
|
}
|
|
244
|
-
|
|
251
|
+
|
|
245
252
|
// 20/03/2020 in the middle of coronavirus, get the sonos groups
|
|
246
253
|
RED.httpAdmin.get("/sonosgetAllGroups", RED.auth.needsPermission('TTSConfigNode.read'), function (req, res) {
|
|
247
254
|
var jListGroups = [];
|