New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added websocket server #1029
base: v2.1
Are you sure you want to change the base?
added websocket server #1029
Conversation
this required to refactor some of the code to avoid circular dependencies. as a result the CLI code could be greatly reduced and is now pretty simple * pytaglib was added as requirement, which is now used to keep meta data from the source file and to add meta data with the RVC generation flags to the output file (this could/should probably also be added to batch conversion) * cli interface was made executable so that it can be run from CLI on linux/mac systems
…the original data (which we want to send back as part of the Websocket response)
…ebugging added (optional) incremental file naming if the output file exists already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function of the src
folder is similar to existing lib
folder, thus all of its contents can be merged into lib
.
@@ -70,6 +58,10 @@ def forward_dml(ctx, x, scale): | |||
mem = [] | |||
if_gpu_ok = False | |||
|
|||
|
|||
|
|||
start_websocket_server('127.0.0.1', 15159) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also add this to config and add a commandline parameter to control this.
@@ -18,26 +18,23 @@ | |||
from subprocess import Popen | |||
from time import sleep | |||
|
|||
from src.configuration import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to specify all components used but not *
.
import os | ||
from src.configuration import weight_root | ||
|
||
def get_voice_weights(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this can be put into lib/audio.py
yeah, doesn't make sense to make any changes now if the PR is stall anyways and conflicting with the cleanup which is in progress now... I'll eventually come back to this when the cleanup is done. |
OK. It won't take a long time. |
this required to refactor some of the code to avoid circular dependencies. as a result the CLI code could be greatly reduced and is now pretty simple
websocket server listens by default on localhost:15159 (it's NOT recommended to run the websocket server on a public network/interface, since there's no security checks implemented)
example requests:
process an audio file and save the output to
get a list of available voice weights