erew123 / alltalk_tts

AllTalk is based on the Coqui TTS engine, similar to the Coqui_tts extension for Text generation webUI, however supports a variety of advanced features, such as a settings page, low VRAM support, DeepSpeed, narrator, model finetuning, custom models, wav file maintenance. It can also be used with 3rd Party software via JSON calls.
GNU Affero General Public License v3.0
686 stars 71 forks source link

How to enable the "listen" flag of the standalone version of AllTalk? #228

Closed guispfilho closed 2 months ago

guispfilho commented 2 months ago

I'm running Silly Tavern locally, and accessing it using Tailscale though my phone, tablet and other devices. Auto1111 and Oobabooga are connecting with no issue when I access Silly Tavern through these other devices, but only after I enabled the "listen" flag in both of them. However, although AllTalk is connecting while using Silly Tavern in my host computer, it isn't connecting when accessing ST with the other devices, and I can't find the option to turn on "listen". Does it need Silly Tavern Extra, or other extension to work like that? Is there a specific file that needs to be altered? Or am I just missing something obvious?

Thank you for your time.

erew123 commented 2 months ago

Hi @guispfilho

On a standard setup, AllTalk will be running on IP address 127.0.0.1 which is a local machines loop back address. This will restrict AllTalk to only being accessible on the specific machine its running on.

If you want it to be accessible remotely, you have to change the IP address in the documents and settings page to the IP address of your machine e.g. if your machine is running on 192.168.0.10, then you have to go into AllTalk's settings page an change the IP in there to 192.168.0.10 and restart AllTalk.

Making this change will bind AllTalk to that IP address and as long as your machines firewall isnt blocking access to port 7851, then you will be able to access AllTalk remotely, setting 192.168.0.10:7851 as the IP address SillyTavern or whatever you are using will be connecting to AllTalk on.

Obviously, its best to hard code your machines IP address to a fixed IP address so that it remains the same when AllTalk starts up.

Its a bit of a frustration I know. The next version of AllTalk will be working in a different way, whereby it binds to all IP addresses on your machine, hence no need to change any settings in AllTalk.

Hope that covers it.

Thanks

guispfilho commented 2 months ago

Uhm… it’s of confusing to me, as I don’t have the basic knowledge of coding. But Auto1111, Silly Tavern and Oobabooga also have local IPs, same as 127.0.0.1x but with different ports. And running the Tailscale allow me to use the IPv4 of my host desktop computer, followed by the port, to access them from my other devices, without having to change anything else other than enabling the “listen” flag.

erew123 commented 2 months ago

Sorry, let me clarify.

So you have SillyTavern, Text-gen-webui and AllTalk running on your local computer. You can then using Tailscale Tunneling/VPN to connect to say your SillyTavern web page. And I assume Tailscale gives you a web page link like `your-computer.ts.net"

Am I correct so far?

If so, then it will all depend on how Tailscale communicates in on your computer.

Again, if I am correct in your above setup, then in the SillyTavern > TTS extensions > AllTalk, I would think you would put in:

http://your-computer.ts.net:7851

OR

https://your-computer.ts.net:7851 note https

and I would assume that will probably work, but it depends on how Tailscale works.

If not, then you would probably have to setup AllTalk to be on the fixed IP address of your local computers network card, in AllTalks settings page. Then restart AllTalk and I would re-try the above methods I mention.

If this doesnt help you, can you give me an example of the address you would connect to your SillyTavern or Text-gen-webui webpages through your Tailscale connection, then I will probably be able to understand how the communication is working.

Thanks

guispfilho commented 2 months ago

So you have SillyTavern, Text-gen-webui and AllTalk running on your local computer. Yes, SillyTavern, Text-gen-webui and AllTalk (Standalone version) are running locally on my desktop.

You can then using Tailscale Tunneling/VPN to connect to say your SillyTavern web page. And I assume Tailscale gives you a web page link like `your-computer.ts.net"

Yes, Tailscale gives me an iP like devicename.tail2fd8j7.ts.net or a numeric ip like 100.95.210.13

So usually I'd run SillyTavern, Text-gen-webui and AllTalk interfaces, and add Text-gen-webui's server URL to Silly Tavern (which by default is http://0.0.0.0:5000), and in the TTS section, I'd select AllTalk and add http://localhost:7851 as "AllTalk Endpoint:"

But by using Tailscale, I can add my devices to Tailscale machine, enable Silly Tavern's "listen" flag" and access my Silly Tavern's interface, which is running on my desktop, through my cellphone. But, instead of using the usual local Silly Tavern address, which is 127.0.0.1:8000, I need to use the Tailscale addresses + the port, like these random examples: devicename.tail2fd8j7.ts.net:8000 or 100.95.210.13:8000.

The same happens for Text-gen-webui and Automatic1111. After enabling the "listen" flag" I may use the Tailscale address to access the webui though any other device connected to my Tailscale machine: devicename.tail2fd8j7.ts.net:7860 or 100.95.210.13:7860.

Again, if I am correct in your above setup, then in the SillyTavern > TTS extensions > AllTalk, I would think you would put in:

http://your-computer.ts.net:7851

OR

https://your-computer.ts.net:7851 note https

and I would assume that will probably work, but it depends on how Tailscale works.

SillyTavern, Text-gen-webui and Automatic1111 all work like this, however when it commes to AllTalk, if I do the same things, but with port 7851, the browser can't find AllTalk Settings & Documentation's webpage: devicename.tail2fd8j7.ts.net:7851 or 100.95.210.13:7851. Nor can Silly Tavern at it's AllTalk Endpoint's field.

If not, then you would probably have to setup AllTalk to be on the fixed IP address of your local computers network card, in AllTalks settings page. Then restart AllTalk and I would re-try the above methods I mention.

Following your suggesstion, I altered AllTalk's ip by editing the confignew.json and changing "ip_address": "127.0.0.1" to my Tailscale address: "ip_address": "100.95.210.13".

And the wierdest part is... Now If I use 100.95.210.13:7851 or localhost:7851 in my browser, it will return AllTalk Settings & Documentation's webpage, but if I use the same URL into Silly Tavern, in the field "AllTalk Endpoint", it returns "TTS Provider not ready. TypeError: Load failed".

If this doesnt help you, can you give me an example of the address you would connect to your SillyTavern or Text-gen-webui webpages through your Tailscale connection, then I will probably be able to understand how the communication is working.

Currenly I'm able to connect to Silly Tavern through my iPad and Phone's browser using a URL like this: http://100.95.210.13:8000. Also, I'm able to connect to Text-gen-webui or Automatic1111 through http://100.95.210.13:7860.

At the same time, while using Silly Tavern, in the Server URL, I use the same as in the desktop: http://0.0.0.0:5000.

And, after your suggestion, I'm able to connect to AllTalk Settings & Documentation's webpage through my browser the same way as Silly Tavern and Text-gen-webui or Automatic1111, using a URL like: http://100.95.210.13:7851, but I'm unable, for all that it's sacret and holy, make Silly Tavern connect to this address, or ano other.

Sorry for the gigantic text wall, but I tried to add everything that could help understand this problem.

erew123 commented 1 month ago

Hi @guispfilho

Thanks for all the detail, that does give me all the information I need to fully understand it.

Its quite a complicated reason to explain why its an issue with v1.x of AllTalk to make it work with the setup you have and to resolve it requires some changes/recoding along with various settings changes at your end.

Which is part of the reason why Im re-working things on v2. In theory, v2 should just work within your setup.

Unfortunately this leaves the current best situation for you at, give me a couple of weeks, v2 should (fingers crossed) be out, at least in a BETA form. I cant give you an absolute "this is the date it will be out" as I still have quite a bit of coding to be on with and there's always unexpected issues along the way. On the flip side of that, I can say that Ive managed to achieve some good milestones recently with things that I thought would be a horrific problem, so that gives me reasonable confidence I will have something out in the near future.

Sorry I cant give you a quick fix at this time, but please keep an eye on the Discussion board here as thats where Ill be posting a beta/setup instructions at some point in the future.

Thanks

guispfilho commented 1 month ago

No problem. Do you recommend another setup that might work? I’ve set to receive email notifications for updates to this topic, so I’ll have my eyes on it, thank you very much.

erew123 commented 1 month ago

Hi

Re:Do you recommend another setup that might work?

Not currently no. But as I say, this will be resolved in v2 so hopefully Ill get that out soon.

Thanks