TTS-ultimate in a docker container

Thanks @Janvda for reply and help!
Problem is that I have nothing in folder docker/nodered/data/settings.js as you can see in picture below:


If I check permisions of folder docker/nodered/data quest have read write permision as you can see here:

Interesting is that I have no idea where it is instaled and where are all folders and files of nodered because nodered is working without volume configuration as you can see in my previous post option 1.
Thanks for each help!

Ok, in that case i think that the node-red user has no rights to create files in that folder.

So, can you give “everyone” the right to write to that folder ?

Yes, you have docker/nodered/data as your /data folder now.

I think you mentioned that TTS is working but you cant find the files

  1. TTS must have the access rights to generate new files ..otherwise you would not hear anything
  2. it looks like that your docker/nodered/data folder is somewhere else

Pls share the log-file again .. to see what /data folder is showing on Node-Red startup !!

Alternatively you can mount a shared Synology-path to your /data folder (just ensure your access permissions are set!... I would set everybody to RW for the time being ... your Everyone user is READ-Only!)

Thanks guys a lot! Great help and work! I really appreeciate!
All is working, exactly as you wrote I just change permision of docker shared folder "everyone" to READ/WRITE and start to work!!!


many many thanks

Regarding xx_Nexus_xx first comment in this topic above TTS via browser:
My TTS is working but I have tried to play it by browser as you mewntioned but it is not working:
http://192.168.1.219:1880/Hailing_VintageSpace.mp3
image

I have also added 2 debug node for TTS output
image
but there is no name of mp3 file and also no full path of TTS file:
image
I am doing again something wrong ? :slight_smile:

Hi , a few things

  1. before playing the files in browser you need to find your folder and see the file (the naming is case sensitive and will not play with wrong spelling)
  2. after you found the files, you need to find your relativ position to the /data folder ... I think there was a statement in your logs that TTS files are at this endpoint **http://192.168.1.219:1980/tts **


==> maybe it will play with http://192.168.1.219:1980/tts/Hailing_VintageSpace.mp3
3) yes, you are right with our debug nodes .. the filename and path is not visible anymore (i think that was in an earlier release)
4) you really have to check your log file when Node-Red is starting ... this usually will give you all the necessary path information
5) Final tip .. I have a few phrases which repeat very often (e.g. "Frontdoor was opened", or "Frontdoor was closed" .. I have copied the respective MP3 file into my data folder and play it directly via the TTS node , this way it works even without internet connect

good luck :wink:

Thanks xx_Nexus_xx for reply and help!
1.Here you can see folder and mp3 files:



2.You are right but I have checked log again and here you can see:


So I have tried in browser again link:
http://192.168.1.219:1980/tts/Hailing_VintageSpace.mp3

And it only offer me to download mp3 file instead of play:

and after download I am not able to play this file...
If i check downloaded files is here and have 14B size:

  1. aha ok I suppose i am doing something wrong again
    Thanks

Please put your own mp3 file in this folder (e.g. Gate_is_open.mp3) .. ensure there are no spaces!

than play via browser (it can be 1980 instead of 1880)

http://192.168.1.219:1880/sonospollyttsstorage/ttspermanentfiles/Gate_is_open.mp3

to clarify ... http://192.168.2.1.219:1880 is representing your /data folder ..all sharable files are relativ to this folder ... so you just have to follow the folder structure in your /data folder

Thanks xx_Nexus_xx for reply and help!
I have copied to ttspermanentfiles folder TTS mp3 (working mp3 I have tried to play in filestation) named 123 as you can see:


Regarding port 1880 or 1980 I suppose it should be defined in config node here and I have there 1980 as you can see here:

So I have tried to play by browser as you mentioned:

  1. At first with port 1880
    http://192.168.1.219:1880/sonospollyttsstorage/ttspermanentfiles/123.mp3
    here is reply:

  2. With port 1980:
    http://192.168.1.219:1980/sonospollyttsstorage/ttspermanentfiles/123.mp3
    It open window to save the tts.mp3 file:


    and after I save the file and try to play media player is unable to play:

The message "Cannot get" shows that you are accessing the wrong folder

you have to try different paths (check/share the node-red log from start-up showing the TTS init phase as well the Node-Red folders)

the download from this link will never work .. the file has to play in the browser

options can be:

I think your access is sorted .. you just have to find your right folder structure and starting point .. maybe start with the /data folder directly to try

you can try:

  1. Copy your 123.mp3 to the /data folder
  2. play the file with http://192.168.1.219:1980/123.mp3
  3. or with http://192.168.1.219:1980/data/123.mp3

Hi again..Thanks for help.
I have tried all options (even in chrome and firefox browser) and links you have sent even copied 123.mp3 to data folder and tried but always give me only option to download mp3...
So I have switched off and and switched on nodered and here is my log:


Any help please?

OK here is my log file .... and in regards of the TTS settings it looks identical (besides the IP-adress) to your log

However, I have seen a difference ... you need to configure your HTTP Static to /data as well

additionally I would recommend to change your Context Store to module=localfilesystem this will ensure that your variables and settings will be persistant

these modifications need to be done in settings.js ... just ensure to restart node-red after the change

good luck

Thanks Nexus.
So due to HTTP Static configuration it cant play mp3 files in browser?
Can you please give me here your configuration setting.js for HTTP static and Context Store how I should change it please?
I suppose I will just swith off nodered, edit file setting.js (Of course before edit I will do backup of setting.js file for sure) in notepad++ for example and after that switch on nodered is that correct?
HTTP Static in my setting.js:



Context Store in my setting.js:

One more info from log. Always when I try to play mp3 from browser this error apear in log:

Thanks

I really don't know if HTTP Static is the root cause but thats the only difference in between your and my settings, and it plays well for me

// When httpAdminRoot is used to move the UI to a different root path, the
// following property can be used to identify a directory of static content
// that should be served at http://localhost:1880/.
httpStatic: '/data',
// Context Storage
// The following property can be used to enable context storage. The configuration
// provided here will enable file-based context that flushes to disk every 30 seconds.
// Refer to the documentation for further options: https://nodered.org/docs/api/context/
//
   contextStorage: {
	default    : { module: "localfilesystem"},
	memoryOnly : { module: "memory" }
},

if that does not help ... I cant think of anything else ... just to be clear ... after HTTP Static update .. you still have to find the correct path and I would recommend testing with that /data path first

this works for me: http://192.168.1.219:1880/123.mp3

Thanks Nexus for help!
I was out so late reply sorry...
You were right! Mp3 are playing over browser. I have to change to HTTP static in settings.js:

and in log appears as you have:

And after that I have tried in browser and it start play via browser:


As you can see we used wrong port 1980 instead of 1880 and also no data folder needed in link so such links works:
http://192.168.1.219:1880/123.mp3
http://192.168.1.219:1880/sonospollyttsstorage/ttspermanentfiles/123.mp3

To be honest I dont really understand in context store change but I did it as you send:
setting.js:

log:

Is it ok?
Thanks for help!

The Context store is to keep your global/flow variables persistant ... e.g. I have a global variable "Sonos_MSG_Player" .. based on preference I can choose where my TTS is played ... after a reboot of Node-Red ... this Sonos_MSG_Player will get its latest value from the Context store .. it remembers the state before the reboot

Thanks nexus for explanation I understand now the point!
Do you have Loxone miniserver?
I am thinking what is the best way to do comunication between Loxone miniserver and nodered to have TTS in sonos players. Do you have some examples?
I have conected loxone miniserver and nodered in both directions by UDP and it is working but I am not sure if this is the best way or if there is some better way and also I am not sure if I should create each UDP command for each TTS in loxone or how to send some analog value for example temperature to nodered for TTS.
Any idea where should I find some examples?
Thanks a lot!

Why are not using the Loxone integration nodes instead of RAW UDP?

Sorry, Im not using Loxone miniserver ... but as recommended by @jaeti01 i would always try an existing node (like this) before i start developing on the raw message protocol.

there are lots of Loxone examples here

Thanks to all and @jaeti01 and @xx_Nexus_xx for help!
I have tried many things to solve it but I have opened new topic becasue this is not related to this topic...
You can see new topic about this issue here:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.