IAHispano / Applio

A simple, high-quality voice conversion tool focused on ease of use and performance.
https://applio.org
MIT License
1.7k stars 276 forks source link

Add fallback logic to select different server port on OSError. #395

Closed RatDotRaw closed 6 months ago

RatDotRaw commented 6 months ago

Added fallback logic that selects a different port if gradio returns an OSError. If the error is triggered, gradio will be launched again on a port decreased with -1. There is a limit of max 10 attempts to prevent a infinite loop.

Why I added this: I ran into the problem that port 6969 is already in use. I have always fixed this issue by changing the port in the app.py to something else, but with every git pull I had to change it again and was craving for a long term solution.

Why you should consider merging: the same problem for any other user without the technical knowledge to resolve it themselves runs into the same problem can be avoided.

blaisewf commented 6 months ago

ok, can be a good solution.

this is mainly an error caused by don't closing python properly

RatDotRaw commented 6 months ago

ok, can be a good solution.

this is mainly an error caused by don't closing python properly

pretty sure thats not the case on my end, but I'll look into it anyway. Can't be bad to double check.