node-red-contrib-tts-ultimate 2.0.5 → 2.0.6

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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  [![Donate via PayPal](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square)](https://www.paypal.me/techtoday)
4
4
 
5
+ <p>
6
+ <b>Version 2.0.6</b> January 2024<br/>
7
+ - Minor fixes.<br/>
8
+ - Moved log into the log tab of node-red.<br/>
9
+ </p>
5
10
  <p>
6
11
  <b>Version 2.0.5</b> October 2023<br/>
7
12
  - Speed up emitting msg, when not using Sonos.<br/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-tts-ultimate",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
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, ElevenLabs.io TTS 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": {
@@ -41,7 +41,6 @@
41
41
  "homepage": "https://github.com/Supergiovane/node-red-contrib-tts-ultimate",
42
42
  "dependencies": {
43
43
  "aws-sdk": "2.1444.0",
44
-
45
44
  "fs": "0.0.1-security",
46
45
  "sonos": "1.14.1",
47
46
  "formidable": "1.2.2",
@@ -49,7 +48,7 @@
49
48
  "@google-cloud/text-to-speech": "4.2.2",
50
49
  "google-translate-tts": ">=0.3.0",
51
50
  "microsoft-cognitiveservices-speech-sdk": "1.29.0",
52
- "elevenlabs-node":"1.1.3"
51
+ "elevenlabs-node": "1.1.3"
53
52
  },
54
53
  "devDependencies": {
55
54
  "eslint": ">=4.18.2",
@@ -58,4 +57,4 @@
58
57
  "engines": {
59
58
  "node": ">=14.0.0"
60
59
  }
61
- }
60
+ }
@@ -27,7 +27,7 @@
27
27
  secretKey: { type: "password" },
28
28
  mssubscriptionKey: { type: "text" },
29
29
  mslocation: { type: "text" },
30
- elevenlabsKey:{ type: "text" }
30
+ elevenlabsKey: { type: "text" }
31
31
  },
32
32
  label: function () {
33
33
  return this.name || "";
@@ -66,28 +66,28 @@
66
66
  if ($("#node-config-input-ttsservice").val() == "polly") {
67
67
  $("#GoogleForm").hide();
68
68
  $("#microsoftAzureForm").hide();
69
- $("#elevenlabsForm").hide();
69
+ $("#elevenlabsForm").hide();
70
70
  $("#pollyForm").show();
71
71
  } else if ($("#node-config-input-ttsservice").val() == "googletts") {
72
72
  $("#microsoftAzureForm").hide();
73
73
  $("#pollyForm").hide();
74
- $("#elevenlabsForm").hide();
74
+ $("#elevenlabsForm").hide();
75
75
  $("#GoogleForm").show();
76
76
  } else if ($("#node-config-input-ttsservice").val() == "googletranslate") {
77
77
  $("#pollyForm").hide();
78
78
  $("#GoogleForm").hide();
79
79
  $("#microsoftAzureForm").hide();
80
- $("#elevenlabsForm").hide();
80
+ $("#elevenlabsForm").hide();
81
81
  } else if ($("#node-config-input-ttsservice").val() == "microsoftazuretts") {
82
82
  $("#pollyForm").hide();
83
83
  $("#GoogleForm").hide();
84
- $("#elevenlabsForm").hide();
84
+ $("#elevenlabsForm").hide();
85
85
  $("#microsoftAzureForm").show();
86
86
  } else if ($("#node-config-input-ttsservice").val() == "elevenlabs") {
87
87
  $("#pollyForm").hide();
88
88
  $("#GoogleForm").hide();
89
89
  $("#microsoftAzureForm").hide();
90
- $("#elevenlabsForm").show();
90
+ $("#elevenlabsForm").show();
91
91
  }
92
92
  });
93
93
  // ##########################################################
@@ -238,11 +238,86 @@
238
238
 
239
239
 
240
240
  <script type="text/markdown" data-help-name="ttsultimate-config">
241
+ <p>Here you can configure your TTS engine to be used.</p>
242
+
243
+ # TTS Service node
244
+ Here you can set all parameters you need. All nodes will refer to this config node, so you need to set it only once.<br/>
245
+ IF YOU RUN NODE-RED BEHIND DOCKER OR SOMETHING ELSE, BE AWARE: <br/>
246
+ PORT USED BY THE NODE ARE 1980 (DEFAULT) AND 1400 (FOR SONOS DISCOVER). <br/>
247
+ PLEASE ALLOW MDNS AND UDP AS WELL
248
+
249
+ **TTS Service**<br/>
250
+ You can choose between Google (without credentials), Amazon AWS (Polly), Google TTS (require credentials and registration to google) or Microsoft Azure TTS engines.<br/>
251
+ For Google TTS Engine, you can choose pitch and speed rate of the voice.
252
+ <br/>
253
+ <br/>
254
+
255
+ * **TTS Service using Amazon AWS (Polly)**<br/>
256
+ > HOW-TO in Deutsch: for german users, there is a very helpful how-to, where you can learn how to use the node and how to register to Amazon AWS Polly as well: here: https://technikkram.net/blog/2020/09/26/sonos-sprachausgabe-mit-raspberry-pi-node-red-und-amazon-polly-fuer-homematic-oder-knx-systeme
257
+
258
+ **AWS Access key**<br/>
259
+ AWS access key credential
260
+ <br/><br/>
261
+ **AWS Secret key**<br/>
262
+ AWS access Secret key.
263
+ <br/>
264
+
265
+ * **TTS Service using Google (without credentials)**<br/>
266
+ This is the simplest way. Just select the voice and you're done. You don't need any credential and you don't even need to be registered to any google service. The voice list is more limited than other services, but it works without hassles.
267
+
268
+ <br/>
269
+
270
+ * **TTS Service using Google TTS**<br/>
271
+ For Google TTS Engine, you can choose pitch and speed rate of the voice.<br/>
272
+ **Google credentials file path**<br/>
273
+ Here you must select your credential file, previously downloaded from Google, [with these steps](https://www.npmjs.com/package/@google-cloud/text-to-speech):
274
+ > [Select or create a Cloud Platform project](https://console.cloud.google.com/project)<br/>
275
+ > [Enable billing for your project](https://support.google.com/cloud/answer/6293499#enable-billing)<br/>
276
+ > [Enable the Google Cloud Text-to-Speech API](https://console.cloud.google.com/flows/enableapi?apiid=texttospeech.googleapis.com)<br/>
277
+
278
+
279
+ <br/>
280
+
281
+ * **TTS Service using Microsot Azure TTS**<br/>
282
+ For Microsoft Azure TTS Engine, you need to have a microsoft account and register to the Azure portal.<br/>
283
+ See my **YOUTUBE video**, here! https://youtu.be/asXajNpRWME<br/>
284
+ You need to register here https://portal.azure.com, then ceate a Voice Service (please click here https://portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices), then click on the left "Keys and Endpoint" menu and copy/paste the KEY and your Location (for example westus).<br/>
285
+ Then paste both into the TTS-Ultimate engine configuration window and restart node-red.<br/>
286
+
287
+ <br/>
288
+
289
+
290
+ **Node-Red IP**<br/>
291
+ set IP of your node-red machine. Write **AUTODISCOVER** to allow the node to auto discover your IP.
292
+
293
+ **Host Port**<br/>
294
+ Sonos will connect to this port in order to play TTS. Default 1980. Choose a free port. Do not use 1880 or any other port already in use on your computer.
295
+
296
+ **TTS Cache**
297
+ <br/>
298
+ ***Purge and delete the TTS cache folder at deploy or restart***<br/>
299
+ On each deploy or node-red restart, delete all tts files in the cache. This is useful not to run out of disk space, in case you've a lot of TTS speech files.
300
+ <br/>
301
+ ***Leave the TTS cache folder untouched*** (suggested only if you have enough disk space)<br/>
302
+ Don't delete the files cached. Useful if you wish to keep the tts files, even in case of internet outages, node-red restart or reboots.
303
+ <br/>
304
+
305
+ **Cache root folder**
306
+ <br/>
307
+ Set your preferred output folder for the files downloaded by the TTS Engine.<br/>
308
+ This is useful if you wish to save the TTS cached files in a folder accessible, for example, by a third party web servers to serve an AirPlay2 speaker.<br/>
309
+ Leave this field blank for the default.<br/>
310
+ <br/>
311
+ <br/>
312
+
313
+
314
+
315
+
241
316
  <p>
242
317
  <a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
243
318
  </p>
244
319
  <p>
245
- Configuration help is in the <a href="https://github.com/Supergiovane/node-red-contrib-tts-ultimate/blob/master/README.md">README</a><br/>
320
+ Configuration help is also here <a href="https://github.com/Supergiovane/node-red-contrib-tts-ultimate/blob/master/README.md">README</a><br/>
246
321
  </p>
247
322
 
248
323
  </script>
@@ -50,6 +50,10 @@
50
50
  <label for="node-input-sonoshailing"><i class="fa fa-bell"></i> Hailing</label>
51
51
  <select id="node-input-sonoshailing"></select> <input id="deleteSelectedFile" type="button" value="DELETE" style="width:100px">
52
52
  </div>
53
+ <div class="form-row">
54
+ <label><i class="fa fa-upload"></i> Upload hail</label>
55
+ <input id="ownFileUpload" type="file" multiple="multiple">
56
+ </div>
53
57
  <div class="form-row">
54
58
  <label for="node-input-playertype"><i class="fa fa-play"></i> Player</label>
55
59
  <select id="node-input-playertype">
@@ -68,10 +72,6 @@
68
72
  <input type="checkbox" id="node-input-unmuteIfMuted" style="margin-left: 0px; vertical-align: top; width: auto !important;"> <label style="width:auto !important;"> Unmute, then restore previous state after play.</label>
69
73
  </div>
70
74
 
71
- <div class="form-row">
72
- <label><i class="fa fa-upload"></i> Upload hail</label>
73
- <input id="ownFileUpload" type="file" multiple="multiple">
74
- </div>
75
75
  <div class="form-row">
76
76
  <label for="node-input-sonosipaddress"><i class="fa fa-globe"></i> Main Sonos Player</label>
77
77
  <label style="width:200px;" id="node-input-sonosipaddress">Discovering.... wait...</label>
@@ -178,11 +178,11 @@
178
178
  } else if (oNodeServer.ttsservice === "elevenlabs") {
179
179
  $("#divGoogleTTSAudioConfig").hide();
180
180
  $("#divElevenLabsOptions").show();
181
- $("#divSSML").hide();
181
+ $("#divSSML").hide();
182
182
  } else {
183
183
  $("#divGoogleTTSAudioConfig").hide();
184
184
  $("#divElevenLabsOptions").hide();
185
- $("#divSSML").show();
185
+ $("#divSSML").show();
186
186
  }
187
187
  } catch (error) {
188
188
  }
@@ -537,7 +537,8 @@
537
537
  | Enable SSML | Enable the SSML XML notation. Please be aware, not all the TTS engines supports that.|
538
538
  | Rate | Only avaiable if you choose Google TTS Engine (with credentials). Specifies the speech speed (Between 0.25 and 4.0, default 1). |
539
539
  | Pitch | Only avaiable if you choose Google TTS Engine (with credentials). Specifies the speech pitch (Between -20.0 and 20.0, default 0). |
540
- | Hailing | Before the first TTS message of the message queues, Sonos will play an "hailing" sound. You can select the hailing or totally disable it. |
540
+ | Hailing | Before the first TTS message of the message queues, the node will play an "hailing" sound. You can select the hailing, upload your own, or totally disable it. |
541
+ | Upload hail | It allows you to upload your own hailing file. |
541
542
  | Player | Select the player. If you select not to use a player, the node will output a msg with an array of files, ready to be played by third party nodes. In case you select No player, only output file name, you'll get a message with an additional property filesArray, containing an array of all mp3 files ready to be played with third party nodes. Please see below the OUTPUT MESSAGES FROM THE NODE section. |
542
543
  | Volume | Set the preferred TTS volume, from "0" to "100" (can be overridden by passing msg.volume = "40"; to the node). |
543
544
  | Unmute | Unmute the main and the addotional players, then restore the previous mute state once finished. (Can be overridden by passing msg.unmute = true; to the node). |