node-red-contrib-tts-ultimate 1.0.40 → 1.0.41

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.
@@ -11,7 +11,7 @@
11
11
  "skipFiles": [
12
12
  "<node_internals>/**"
13
13
  ],
14
- "program": "${workspaceFolder}/ttsultimate/ttsultimate.js"
14
+ "program": "${file}"
15
15
  }
16
16
  ]
17
17
  }
package/CHANGELOG.md CHANGED
@@ -2,97 +2,103 @@
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 1.0.41</b> March 2022<br/>
7
+ - NEW: for Polly TTS, you can choose between neural and standard engine.<br/>
8
+ </p>
5
9
  <p>
6
10
  <b>Version 1.0.40</b> January 2022<br/>
7
11
  - NEW: you can now select your own folder to save the TTS cached files.<br/>
8
12
  - NEW: getting rid of file lenght issue by hashing the TTS cached files requested from TTS engines. Now the file names will be MD5 HEX hashed.<br/>
9
13
  - NEW: now the input messages are passed through to the output pin.<br/>
10
14
  - CAUTION: due to the new file management, the node will need to download again the TTS files from your TTS engine. Keep it in mind, because you can be charged by Amazon, Google or Microsoft.<br/>
11
- <p>
15
+ </p>
12
16
  <p>
13
17
  <b>Version 1.0.39</b> January 2022<br/>
14
18
  - SSML: fixed an issue prevent using it.<br/>
15
19
  - SSML: if SSML is enabled, the text auto split function is disabled, to avoid splitting SSML XML text.<br/>
16
20
  - Microsoft Azure: update TTS engine to 1.19.0<br/>
17
21
  - Google paid TTS: update TTS engine to 3.4.0<br/>
22
+ </p>
18
23
  <p>
19
24
  <b>Version 1.0.38</b> December 2021<br/>
20
25
  - Removed some unwanted startup logs.<br/>
21
26
  - Fixed ownfile sample code. Thanks to plats98.<br/>
22
- <p>
27
+ </p>
23
28
  <p>
24
29
  <b>Version 1.0.36</b> November 2021<br/>
25
30
  - NEW: Autosplit function: you can now set the maximum lenght of the text-parts, in case your spoken text is too long for the allowed TTS Engine limits.<br/>
26
- <p>
31
+ </p>
27
32
  <p>
28
33
  <b>Version 1.0.35</b> October 2021<br/>
29
34
  - NEW: You can force unmuting all players, then restore their previous state once finished playing.<br/>
30
- <p>
35
+ </p>
31
36
  <p>
32
37
  <b>Version 1.0.34</b> October 2021<br/>
33
38
  - FIX: fixed an issue in retrieving voices if you have more than one TTS engine enabled at the same time.<br/>
34
- <p>
39
+ </p>
35
40
  <p>
36
41
  <b>Version 1.0.33</b> October 2021<br/>
37
42
  - NEW VOICE ENGINE: Microsoft Azure TTS.<br/>
38
- <p>
43
+ </p>
39
44
  <p>
40
45
  <b>Version 1.0.32</b> September 2021<br/>
41
46
  - Fix few restore issues. Line-in restore fix and only when it was playing. Amazon Music and Spotify considered as stream instead of music queue.<br/>
42
- <p>
47
+ </p>
43
48
  <p>
44
49
  <b>Version 1.0.31</b> September 2021<br/>
45
50
  - NEW: you can now choose voice PITCH and RATE. Avaiable only with Google TTS engine with credentials.<br/>
46
- <p>
51
+ </p>
47
52
  <p>
48
53
  <b>Version 1.0.29</b> September 2021<br/>
49
54
  - NEW: you can now choose not to use Sonos as player. In this case, the node will output an array of mp3, ready to be played by third parties nodes.<br/>
50
- <p>
55
+ </p>
51
56
  <p>
52
57
  <b>Version 1.0.28</b> September 2021<br/>
53
58
  - Fixed queue resuming play even if was in stop (only occurs in some circumstances).<br/>
54
- <p>
59
+ </p>
55
60
  <p>
56
61
  <b>Version 1.0.27</b> September 2021<br/>
57
62
  - Hided some unwanted logs.<br/>
58
- <p>
63
+ </p>
59
64
  <p>
60
65
  <b>Version 1.0.26</b> August 2021<br/>
61
66
  - FIX: after playing tts, if you have no previous queue and you are on old Sonos V1, the last TTS played remains in the queue (it shouldn't).<br/>
62
- <p>
67
+ </p>
63
68
  <p>
64
69
  <b>Version 1.0.25</b> August 2021<br/>
65
70
  - Optimized setting volume speed.<br/>
66
- <p>
71
+ </p>
67
72
  <p>
68
73
  <b>Version 1.0.24</b> August 2021<br/>
69
74
  - Fixed a little issue with sonos beam, switching volumes with a 1-2 seconds delay.<br/>
70
- <p>
75
+ </p>
71
76
  <p>
72
77
  <b>Version 1.0.23</b> August 2021<br/>
73
78
  - Fixed a volume issue. The playing queue was jumping briefly at TTS volume before stopping. That was annoiyng.<br/>
74
79
  - Fixed issues with some async function not really async, so there was glitches in volume settings, seeking and so on, specially with playlist and queues.<br/>
75
80
  - There are known issues with resuming play of sonos streams, they work for a while, then stop.<br/>
76
- <p>
81
+ </p>
77
82
  <p>
78
83
  <b>Version 1.0.22</b> Juli 2021<br/>
79
84
  - The additional players don't obey to msg.volume input node message override (they instead get the volume set by the config window, that is OK, but they must also obey to the override msg). Fixed<br/>
80
- <p>
85
+ </p>
81
86
  <p>
82
87
  <b>Version 1.0.21</b> Juli 2021<br/>
83
88
  - The additional players in the group, now reverts to the previous volume after the speech.<br/>
84
- <p>
89
+ </p>
85
90
  <p>
86
91
  <b>Version 1.0.20</b> May 2021<br/>
87
92
  - Fixed an issue preventing TTS working on Windows machines. Thanks @McFozzy75<br/>
88
- <p>
93
+ </p>
89
94
  <p>
90
95
  <b>Version 1.0.19</b> February 2021<br/>
91
96
  - The previous limit of 200 chars (before the TTS text is automatically split) has been increased to 220.<br/>
92
- <p>
97
+ </p>
93
98
  <p>
94
99
  <b>Version 1.0.18</b> January 2021<br/>
95
100
  - Better handling of payloads long more than 200 chars.<br/>
101
+ </p>
96
102
  <p>
97
103
  <b>Version 1.0.16</b> January 2021<br/>
98
104
  - Currently, the FREE GOOGLE TRANSLATE TTS engine has changed some voice codes. I've been fixed that. You need to do nothing.<br/>
package/README.md CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  ## DESCRIPTION
25
25
  This node transforms a text into a speech audio. You can generate an audio file, or hear the voice through Sonos, bluetooth speakers, web pages, etc.<br/>
26
- Uses Amazon Polly, 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/>
26
+ 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
27
  The node can also create a ***TTS file (without the use of any Sonos device)***, to be read by third parties nodes.<br/>
28
28
  This is a major ***upgrade from the previously popular node SonosPollyTTS*** (SonosPollyTTS is not developed anymore).<br/>
29
29
  **Node v.12.0.0 or newer is needed**.
@@ -140,7 +140,7 @@ Leave this field blank for the default.<br/>
140
140
  Select the TTS SERVICE ENGINE NODE, as stated above.
141
141
 
142
142
  **Voice**<br/>
143
- Select your preferred voice. If you use Amazon, Polly voices will be displayed. If you use Google, google voices will be displayed. Google service without authentication, has a limited set of voices.
143
+ Select your preferred voice. If you use Amazon, Polly voices will be displayed (standard and neural). If you use Google, google voices will be displayed. Google service without authentication, has a limited set of voices.
144
144
 
145
145
  **Enable SSML**<br/>
146
146
  Enable the SSML XML notation. Please be aware, not all the TTS engines supports that.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-tts-ultimate",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
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": {
@@ -22,7 +22,8 @@
22
22
  "IOT",
23
23
  "speech",
24
24
  "ttsultimate",
25
- "sonospollytts"
25
+ "sonospollytts",
26
+ "neural"
26
27
  ],
27
28
  "node-red": {
28
29
  "nodes": {
@@ -369,7 +369,13 @@ module.exports = function (RED) {
369
369
  } else {
370
370
  for (let index = 0; index < data.Voices.length; index++) {
371
371
  const oVoice = data.Voices[index];
372
- jListVoices.push({ name: oVoice.LanguageName + " (" + oVoice.LanguageCode + ") " + oVoice.Name + " - " + oVoice.Gender, id: oVoice.Id })
372
+ if (oVoice.hasOwnProperty("SupportedEngines")) {
373
+ oVoice.SupportedEngines.forEach(voicetype => {
374
+ jListVoices.push({ name: oVoice.LanguageName + " (" + oVoice.LanguageCode + ") " + oVoice.Name + " - " + oVoice.Gender + " - " + voicetype, id: oVoice.Id + "#engineType:" + voicetype })
375
+ });
376
+ } else {
377
+ jListVoices.push({ name: oVoice.LanguageName + " (" + oVoice.LanguageCode + ") " + oVoice.Name + " - " + oVoice.Gender, id: oVoice.Id })
378
+ }
373
379
  }
374
380
  res.json(jListVoices)
375
381
  }
@@ -216,7 +216,7 @@
216
216
  };
217
217
 
218
218
 
219
- // 26/10/2020 Retrieve all avaiables polly voices
219
+ // 26/10/2020 Retrieve all avaiables voices
220
220
  // #####################################
221
221
  function getVoices() {
222
222
  $('#node-input-voice')
@@ -578,9 +578,16 @@ module.exports = function (RED) {
578
578
  OutputFormat: "mp3",
579
579
  SampleRate: '22050',
580
580
  Text: msg,
581
- TextType: node.ssml ? 'ssml' : 'text',
582
- VoiceId: node.voiceId
581
+ TextType: node.ssml ? 'ssml' : 'text'
583
582
  };
583
+ // 02/03/2022 check wether standard or neural engine is POLLY is selected
584
+ if (node.voiceId.includes("#engineType:")) {
585
+ params.VoiceId = node.voiceId.split("#engineType:")[0];
586
+ params.Engine = node.voiceId.split("#engineType:")[1];
587
+ } else {
588
+ params.VoiceId = node.voiceId;
589
+ }
590
+
584
591
  data = await synthesizeSpeechPolly([node.server.polly, params]);
585
592
  } else if (node.server.ttsservice === "googletts") {
586
593
  node.setNodeStatus({ fill: 'green', shape: 'ring', text: 'Downloading from Google TTS...' });