node-red-contrib-tts-ultimate 2.0.5 → 2.0.7
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 +9 -0
- package/README.md +7 -0
- package/package.json +3 -4
- package/ttsultimate/ttsultimate-config.html +82 -7
- package/ttsultimate/ttsultimate.html +421 -419
- package/ttsultimate/ttsultimate.js +1118 -1113
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.paypal.me/techtoday)
|
|
4
4
|
|
|
5
|
+
<p>
|
|
6
|
+
<b>Version 2.0.7</b> January 2024<br/>
|
|
7
|
+
- NEW: input messages can override selected voice.<br/>
|
|
8
|
+
</p>
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 2.0.6</b> January 2024<br/>
|
|
11
|
+
- Minor fixes.<br/>
|
|
12
|
+
- Moved log into the log tab of node-red.<br/>
|
|
13
|
+
</p>
|
|
5
14
|
<p>
|
|
6
15
|
<b>Version 2.0.5</b> October 2023<br/>
|
|
7
16
|
- Speed up emitting msg, when not using Sonos.<br/>
|
package/README.md
CHANGED
|
@@ -157,6 +157,13 @@ msg.payload = "I won't disturb with my hailing, this time.";
|
|
|
157
157
|
return msg;
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
+
```js
|
|
161
|
+
// Play a message with custom voice ID
|
|
162
|
+
msg.payload = "Hello, the current temperature is 12°";
|
|
163
|
+
msg.voiceId = 2
|
|
164
|
+
return msg;
|
|
165
|
+
```
|
|
166
|
+
|
|
160
167
|
```js
|
|
161
168
|
// Play smoke detection
|
|
162
169
|
msg.sonoshailing = "SmokeAlert";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-tts-ultimate",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
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
|
|
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>
|