Google TTS node - problem. Something weird happening with output

Hi again folks.

Ongoing from my other quest I have found this problem with the google TTS node.

I got bitten by the cuteness of a site which gives Quotes of the day and so I got inventive and was/am/still am trying to get it working 100%.

After the problem from yesterday, there is a new one.
(Of course)


[{"id":"b0b9889d3818a108","type":"inject","z":"60d0e3e966d484ae","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"this is  a test","payloadType":"str","x":4240,"y":2160,"wires":[["59ccb687dfcfc704"]]},{"id":"810634a27dc413d1","type":"inject","z":"60d0e3e966d484ae","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Eckhart Tolle says The present moment has always been available to spiritual seekers, but as long as you are seeking you are not available to the present moment. Seeking implies that you are looking to the future for some answer, or for some achievement, spiritual or otherwise.","payloadType":"str","x":4260,"y":2120,"wires":[["59ccb687dfcfc704"]]},{"id":"41a8b8ef84a6be13","type":"inject","z":"60d0e3e966d484ae","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Eckhart Tolle says The present moment has always been available to spiritual seekers, but as long as you are seeking you are not available to the present moment. Seeking implies that you are looking to the future for some answer, or for some achievement, spiritual or otherwise. Everybody is in the seeking mode, seeking to add something to who they are, whether it be money, relationships, possessions, knowledge, status.. or spiritual attainment","payloadType":"str","x":4260,"y":2080,"wires":[["59ccb687dfcfc704"]]},{"id":"59ccb687dfcfc704","type":"ttsultimate","z":"60d0e3e966d484ae","name":"TTS-Ultimate","voice":"en-AU","ssml":false,"sonosipaddress":"","sonosvolume":"20","sonoshailing":"0","config":"557d8082.eb5a8","property":"payload","propertyType":{},"rules":[],"playertype":"noplayer","speakingrate":"1","speakingpitch":"0","unmuteIfMuted":true,"elevenlabsStability":"0.5","elevenlabsSimilarity_boost":"0.5","x":4440,"y":2020,"wires":[["eddc469dd44ddef0","921cfd903b789ce2"],[]]},{"id":"eddc469dd44ddef0","type":"function","z":"60d0e3e966d484ae","name":"get voice message","func":"msg.payload = msg.filesArray[0].file;\n\nmsg.volume = 1\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":4565,"y":2020,"wires":[["4fc8e8dcbbe54ad3","1c329421b6c8dbbe"]],"l":false},{"id":"4fc8e8dcbbe54ad3","type":"template","z":"60d0e3e966d484ae","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{{payload}}} -af \"volume={{volume}}\" -f wav - | DISPLAY=:0 aplay","output":"str","x":4670,"y":2020,"wires":[["a90e3d865b2d6f42","26334f9ce96ae3fd"]]},{"id":"a90e3d865b2d6f42","type":"exec","z":"60d0e3e966d484ae","command":"ffmpeg -i","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":4840,"y":2020,"wires":[[],[],[]]},{"id":"557d8082.eb5a8","type":"ttsultimate-config","name":"googletranslate","noderedipaddress":"","noderedport":"1980","purgediratrestart":"leave","ttsservice":"googletranslate","TTSRootFolderPath":""}]

And sorry I didn't name the inject nodes.


If they quote is short it works.
But this one doesn't work.

If I press this is a test it works.
This is establishing the base line. :wink:

After the TTS node, there is a function node.
This parses the message and puts things ready for the next bit.
msg.payload = msg.filesArray[0].file;
As the magic stuff is in msg.filesArray[0].file

And it sets the volume (not shown here but needed later on)

So then I have the other two inject nodes.
They have the FULL message and the other one (lower of the two) has a snip of the bigger message.

NEITHER get through the google TTS node.

And - interestingly - sometimes the smaller one DOES get an output but the message sent out of the TTS node is different in structure to how it normally is.

Bad example

Good example

So that got through and you see the message going into the exec node.


The test one works. Well, it gets to send a message to the exec node correctly.
EITHER of the other two inject nodes, it just fails.

While doing this, I heard a fairly long QOTD come through and work.
So that kind of invalidates my theory that it is too long.
There were " in the original one too, and I took them out just to be sure of other problems from yesterday.

Anyway: the question stands to why the test message gets through and it output in the expected structure and why (the top of the two) the inject node that sends a briefer message than the bottom one (or is that the other way around?) (Doesn't really matter)
It sends a differently structured message out.

Of course the code will fail with the different structure.
But if you look closely at even the good one, the TTS node spits out an incorrectly formatted message.
You can just see it at the top of the picture. But then it spits out a correctly structured one and all is good.

The other thing which is kind of annoying.
This i done my my BIG machine.
Testing on the RasPi is cruel as it already has a job and takes a while to DEPLOY.
But the sound plays, and all is otherwise good.

THIS machine no sound is played.
If I open a terminal and do the command as presented to the exec node: it plays.
So that is another problem. Not sure it is relevant to the problem, but I'm mentioning it anyway.

Someone - please?