I am collecting some flight server data in Node Red and sending the data as a text string to Home Assistant to use with Google TTS speech. The issue I have is that the Callsign part is a string of letters such as RYR1234G, which I want to be spoken as characters not a word. I know that a space and/or a full-stop between each character may do the trick (R .Y .R .1 .2 .3 .4 .G ), but my solution is ugly, due to a lack of knowledge and although it sort of works, I don't know how do this with a random length of characters.
Please can someone show me a better way of doing this or should I be doing something with the Google TTS coding?
[{"id":"da8a6ef0b3c9a5c8","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"ef9f06be11be1595","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"RYR123G","payloadType":"str","x":350,"y":140,"wires":[["c25bd685916af4ca"]]},{"id":"777ae9cd4da78bd3","type":"debug","z":"da8a6ef0b3c9a5c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":140,"wires":[]},{"id":"c25bd685916af4ca","type":"function","z":"da8a6ef0b3c9a5c8","name":"","func":"var call = msg.payload;\nlet one = call.substr(0,1);\nlet two = call.substr(1,1);\nlet three = call.substr(2,1);\nlet four = call.substr(3,1);\nlet five = call.substr(4,1);\nlet six = call.substr(5,1);\nlet seven = call.substr(6,1);\nlet eight = call.substr(7,1);\n\n\n//return {payload:{one}};\nreturn {payload:{one:one,two:two,three:three,four:four,five:five,six:six,seven:seven,eight:eight}}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":140,"wires":[["0fb13606396dd088"]]},{"id":"0fb13606396dd088","type":"change","z":"da8a6ef0b3c9a5c8","name":"","rules":[{"t":"set","p":"payload.all","pt":"msg","to":"$string(payload.one) & \" .\" & $string(payload.two) & \" .\" & $string(payload.three) & \" .\" & $string(payload.four) & \" .\" & $string(payload.five) & \" .\" & $string(payload.six) & \" .\" & $string(payload.seven) & \" .\" & $string(payload.eight) & \" .\" ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":140,"wires":[["9442164bb3990b3f"]]},{"id":"9442164bb3990b3f","type":"change","z":"da8a6ef0b3c9a5c8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.all","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":140,"wires":[["777ae9cd4da78bd3"]]},{"id":"3da6785dbcb2f779","type":"comment","z":"da8a6ef0b3c9a5c8","name":"Splitup a code with .'s","info":"Splitup a code with .'s","x":360,"y":80,"wires":[]}]