Gathering detailed insights and metrics for node-red-contrib-tts-ultimate
Gathering detailed insights and metrics for node-red-contrib-tts-ultimate
Gathering detailed insights and metrics for node-red-contrib-tts-ultimate
Gathering detailed insights and metrics for node-red-contrib-tts-ultimate
node-red-contrib-knx-ultimate
Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.
node-red-contrib-boolean-logic-ultimate
A set of Node-RED enhanced boolean logic and utility nodes, flow interruption, blinker, invert, filter, toggle etc.., with persistent values after reboot. Compatible also with Homeassistant values.
node-red-contrib-sun-position
NodeRED nodes to get sun and moon position
sass-loader
Sass loader for webpack
npm install node-red-contrib-tts-ultimate
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
25 Stars
142 Commits
5 Forks
4 Watching
1 Branches
3 Contributors
Updated on 03 Nov 2024
JavaScript (63.1%)
HTML (36.9%)
Cumulative downloads
Total Downloads
Last day
-27.3%
16
Compared to previous day
Last week
7%
138
Compared to previous week
Last month
90.9%
943
Compared to previous month
Last year
-34.4%
6,584
Compared to previous year
Adjust the nodes according to your setup
1[{"id":"569773ae.930abc","type":"inject","z":"344c547c.b230c4","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":300,"wires":[["e066ce90.46f758"]]},{"id":"e066ce90.46f758","type":"function","z":"344c547c.b230c4","name":"Via function","func":"// The simplest way\nmsg.payload=\"Benvenuti,Wilkommen,Wellcome!\";\nreturn msg;\n","outputs":1,"noerr":0,"x":370,"y":300,"wires":[["3d9635bc.53c14a"]]},{"id":"c272b47c.41e238","type":"inject","z":"344c547c.b230c4","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":340,"wires":[["2fcffdb7.1c76ea"]]},{"id":"2fcffdb7.1c76ea","type":"function","z":"344c547c.b230c4","name":"Set volume","func":"// Set the Volume\nmsg.volume=\"60\"; // If not set, will take the volume from setting page\nmsg.payload=\"Benvenuti,Wilkommen,Wellcome!\";\nreturn msg;\n\n","outputs":1,"noerr":0,"x":370,"y":340,"wires":[["3d9635bc.53c14a"]]},{"id":"2bd6fd7f.9b9ae2","type":"inject","z":"344c547c.b230c4","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":380,"wires":[["aa3b6e42.669fc"]]},{"id":"aa3b6e42.669fc","type":"function","z":"344c547c.b230c4","name":"Array of messages","func":"// Create an array of messages\nvar aMessages=[];\n// Add random messages\naMessages.push({volume:\"50\",payload:\"Benvenuti.\"});\n// Wheater in Italy\naMessages.push({volume:\"40\",payload:\"http://media.ilmeteo.it/audio/2020-12-23.mp3\"});\n// Add random messages\naMessages.push({volume:\"30\",payload:\"Cambia la tua voce nei settaggi.\"});\nreturn [aMessages];\n","outputs":1,"noerr":0,"x":390,"y":380,"wires":[["3d9635bc.53c14a"]]},{"id":"3e0d9b5c.fe01b4","type":"inject","z":"344c547c.b230c4","name":"Hello World","topic":"","payload":"Ciao Mondo! Come stai?","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":260,"wires":[["3d9635bc.53c14a"]]},{"id":"42e6fab4.e8d154","type":"comment","z":"344c547c.b230c4","name":"Play text on Sonos. Single player or Group of players","info":"","x":360,"y":220,"wires":[]},{"id":"3d9635bc.53c14a","type":"ttsultimate","z":"344c547c.b230c4","name":"","voice":"Brian","ssml":false,"sonosipaddress":"192.168.1.109","sonosvolume":"30","sonoshailing":"Hailing_Hailing.mp3","config":"557d8082.eb5a8","property":"payload","propertyType":{},"rules":[],"x":610,"y":260,"wires":[[]]},{"id":"557d8082.eb5a8","type":"ttsultimate-config","z":"","name":"googletranslate","noderedipaddress":"192.168.1.219","noderedport":"1980","purgediratrestart":"leave","ttsservice":"googletranslate"}]
Due to Microsoft Azure SDK limitation, the node can only be installed on systems with 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.).
This node transforms a text into a speech audio that you can hear natively via SONOS speakers.
You can also generate an audio file for bluetooth speakers, web pages, etc.
Uses Amazon Polly (standard and neural engines), Google TTS voices (even without credentials nor registration) and Microsoft TTS Azure voices, ElevenLabs.io TTS 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.
The node can also create a TTS file (without the use of any Sonos device), to be read by third parties nodes.
This is a major upgrade from the previously popular node SonosPollyTTS (SonosPollyTTS is not developed anymore).
UPDATE PATH FROM SONOSPOLLYTTS TO TTS-ULTIMATE
Supergiovane takes care about your brain and your time.
Install TTS-Ultimate. Both SonosPollyTTS and TTS-Ultimate can cohexist.
Then just delete your old SonosPollyTTS nodes and replace it with TTS-Ultimate nodes.
The cache will remain the same. Your own audio files and hailing files won't be touched. You'll find it again in TTS-Ultimate
NOTE IF YOU CANNOT UPLOAD YOUR OWN FILES
If you're running node-red as "plugin" for homeassistant, redmatic etc...
You may expect not to be able to upload your own files. Please check that the user running node-red, has premission to write to the filesystem.
Here you can set all parameters you need. All nodes will refer to this config node, so you need to set it only once.
IF YOU RUN NODE-RED BEHIND DOCKER OR SOMETHING ELSE, BE AWARE:
PORT USED BY THE NODE ARE 1980 (DEFAULT) AND 1400 (FOR SONOS DISCOVER).
PLEASE ALLOW MDNS AND UDP AS WELL
TTS Service
You can choose between Elevenlabs.io, Google (without credentials), Amazon AWS (Polly), Google TTS (require credentials and registration to google) or Microsoft Azure TTS engines.
For Google TTS Engine, you can choose pitch and speed rate of the voice.
TTS Service using Amazon AWS (Polly)
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
AWS Access key
AWS access key credential
AWS Secret key
AWS access Secret key.
TTS Service using Google (without credentials)
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.
Select or create a Cloud Platform project
Enable billing for your project
Enable the Google Cloud Text-to-Speech API
Node-Red IP
set IP of your node-red machine. Write AUTODISCOVER to allow the node to auto discover your IP.
Host Port
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.
TTS Cache
Purge and delete the TTS cache folder at deploy or restart
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.
Leave the TTS cache folder untouched (suggested only if you have enough disk space)
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.
Cache root folder
Set your preferred output folder for the files downloaded by the TTS Engine.
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.
Leave this field blank for the default.
Examples
1// Play a message 2msg.payload = "Hello, the current temperature is 12°"; 3return msg;
1// Play a message, forcing no hailing 2msg.nohailing = true; 3msg.payload = "I won't disturb with my hailing, this time."; 4return msg;
1// Play a message with custom voice ID 2msg.payload = "Hello, the current temperature is 12°"; 3msg.voiceId = 2 4return msg;
1// Play smoke detection 2msg.sonoshailing = "SmokeAlert"; 3msg.payload = "Warning, smoke detected. Fire extinguishers are in the kitchen, hall and garage."; 4return msg;
1// Play an mp3 2msg.sonoshailing = "MeteoJingle"; 3msg.payload = "http://192.125.22.44/meteotoday.mp3"; 4return msg;
1// Play priority message 2msg.priority = true; 3msg.payload = "Warning. Intruder in the dinning room."; 4return msg;
1// Stop whatever is playing 2msg.stop = true; 3return msg;
You can change the configuration of tts-ultimate, via msg.setConfig property.
The property is a JSON object.
1// Set main player IP 2// The setting is retained until the node receives another msg.setConfig or until node-red is restarted. 3var config= { 4 setMainPlayerIP:"192.168.1.109" 5}; 6msg.setConfig = config; 7return msg;
1// Set player IP and additional players with their optional adapted volume, relative to the main sonos player volume. 2// You can specify the aditional player's volume adaptation 3// The setting is retained until the node receives another msg.setConfig or until node-red is restarted. 4var config= { 5 setMainPlayerIP:"192.168.1.109", 6 setPlayerGroupArray:[ 7 "192.168.1.110", // This additional player will use the same volume as the main sonos player. 8 "192.168.1.111#-10", // This additional player will use the main sonos player's volume, minus 10. 9 "192.168.1.112#20" // This additional player will use the main sonos player's volume, plus 20. 10 ] 11}; 12msg.setConfig = config; 13return msg;
1// If you have only one additional player, without setting their adjusted volume. 2// The setting is retained until the node receives another msg.setConfig or until node-red is restarted. 3var config= { 4 setMainPlayerIP:"192.168.1.109", 5 setPlayerGroupArray:["192.168.1.110"] 6}; 7msg.setConfig = config; 8return msg;
Adjust the nodes according to your setup
1[{"id":"4b4514d.047366c","type":"ttsultimate","z":"235d8e3d.a7583a","name":"","voice":"de-DE","ssml":false,"sonosipaddress":"192.168.1.109","sonosvolume":"5","sonoshailing":"0","config":"feee307e.54bca","property":"payload","propertyType":{},"rules":[],"x":430,"y":360,"wires":[["2b2d7556.251d0a"],["2978fe86.e680aa"]]},{"id":"2b2d7556.251d0a","type":"debug","z":"235d8e3d.a7583a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":340,"wires":[]},{"id":"2978fe86.e680aa","type":"debug","z":"235d8e3d.a7583a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":380,"wires":[]},{"id":"9d9e06be.09718","type":"function","z":"235d8e3d.a7583a","name":"Change Config","func":"// Set the main player IP and each IP belonging to the player's group\nvar config= {\n setMainPlayerIP:\"192.168.1.109\",\n setPlayerGroupArray:[\n \"192.168.1.110\",\n \"192.168.1.111\",\n \"192.168.1.112\"\n ]\n};\nmsg.setConfig = config;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":360,"wires":[["4b4514d.047366c"]]},{"id":"c3da8b3a.e8f2c8","type":"inject","z":"235d8e3d.a7583a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello","payloadType":"str","x":110,"y":360,"wires":[["9d9e06be.09718"]]},{"id":"c55b7140.4a7cc8","type":"comment","z":"235d8e3d.a7583a","name":"Change the player and/or group of players via msg property.","info":"","x":270,"y":300,"wires":[]},{"id":"feee307e.54bca","type":"ttsultimate-config","name":"Config","noderedipaddress":"192.168.1.161","noderedport":"1980","purgediratrestart":"leave","ttsservice":"googletranslate"}]
Adjust the nodes according to your setup
1[{"id":"db0ea33.f1186e","type":"ttsultimate","z":"c6efd2b6.ab02e8","name":"","voice":"en-AU-Standard-A#en-AU#FEMALE","ssml":false,"sonosipaddress":"192.168.1.109","sonosvolume":"25","sonoshailing":"Hailing_Hailing.mp3","config":"4f941d61.f52c4c","propertyType":{},"rules":[],"x":670,"y":240,"wires":[[]]},{"id":"c7fb2970.271978","type":"ownfileultimate","z":"c6efd2b6.ab02e8","name":"","selectedFile":"OwnFile_Tur geoeffnet.mp3","x":490,"y":220,"wires":[["db0ea33.f1186e"]]},{"id":"fef80c5b.49f9e","type":"inject","z":"c6efd2b6.ab02e8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":220,"wires":[["c7fb2970.271978"]]},{"id":"807f0f6c.6d59c","type":"comment","z":"c6efd2b6.ab02e8","name":"You can upload your own voice messages and use it with ttsultimate","info":"","x":310,"y":180,"wires":[]},{"id":"536e58b3.bb8468","type":"ownfileultimate","z":"c6efd2b6.ab02e8","name":"","selectedFile":"OwnFile_Tur geoeffnet.mp3","x":490,"y":260,"wires":[["db0ea33.f1186e"]]},{"id":"26c339f9.346fbe","type":"inject","z":"c6efd2b6.ab02e8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":260,"wires":[["25016441.6447bc"]]},{"id":"25016441.6447bc","type":"function","z":"c6efd2b6.ab02e8","name":"Dynamically Select file","func":"// Override the selected file.\nmsg.selectedFile=\"Porta aperta\"\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":260,"wires":[["536e58b3.bb8468"]]},{"id":"4f941d61.f52c4c","type":"ttsultimate-config","z":"","name":"GoogleTTS","noderedipaddress":"192.168.1.219","noderedport":"1980","purgediratrestart":"leave","ttsservice":"googletts"}]
This node allow you to upload your custom message and play it via ttsultimate without the need of an internet connection. You can use it, for example, with your alarm panel, to annuce a zone breach, a doorbell or so.
Name
Node name
File to be played
Select a file to be played. You can upload one or multiple files at the same time via the "upload" button.
Priority
If set to true, the OwnFile message will cancel the current TTS queue, will stop the current phrase being spoken and the TTS-Ultimate node will play this priority message.
Please refer to msg.priority msg input property of TTS-Ultimate for info on how this message will be handled
msg.payload = true
Begin play of the message
msg.selectedFile = "Garage door open"
Overrides the selected message and plays the filename you passed in. Please double check the spelling of the filename (must be the same as you can see in the dropdown list of your own files, in the node config window) and do not include the .mp3 extenson.
msg.priority
If set to true, the OwnFile message will cancel the current TTS queue, will stop the current phrase being spoken and the TTS-Ultimate node will play this priority message.
Please refer to msg.priority msg input property of TTS-Ultimate for info on how this message will be handled
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 8
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More