Skip to content

Cleanup and rewrites in preparations for v2.3.0#37

Open
limitcantcode wants to merge 20 commits into
mainfrom
prep-2.3.0
Open

Cleanup and rewrites in preparations for v2.3.0#37
limitcantcode wants to merge 20 commits into
mainfrom
prep-2.3.0

Conversation

@limitcantcode
Copy link
Copy Markdown
Owner

This project has been riddled with technical debt since it's inception while I was getting a grip with the field. This is a mass change to fix many of the problems I've had while using and maintaining this project, trying to put into practice packages that make more sense and reimplementing functionality with a proper lens.

Old API implemented using Flask/Quart was hard to expand, debug, and
document. Reimplementing with FastAPI lessens this burden and supports
features to make a more robust API. This is only an initial
implementation and likely to be riddled with inconsistencies, however
it's needed to start updating the rest of the API.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Consolidate UUID used for tracking http requests and websocket events.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Fix all linting errors now that we've added black/ruff.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Lifetime of application layer and ws server were handled by server
start wrapping function. This is bad practice in FastAPI and can cause
unintended side-effects. Replaced this wrapping function with a FastAPI lifespan context and start the server from main.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Correctly await close() on AsyncOpenAI client

Signed-off-by: limitcantcode <limit@limit-cc.com>
Use rich to format logs for both console and files. Force FastAPI to use
same logging format and restructured log names for differentiating
between sessions.

Signed-off-by: unknown <limit@limit-cc.com>
Cleanup implementation of websocket server and specify usage for
broadcasting events. This is in preparation to expand the websocket
server.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Simplified implementation of operation manager. Previously a mass of
duplicate code and branching code simply to support lazy importing for
installations where not all features are setup. However, now setup
supports all features out of the box so it makes sense to bring imports
to top-level and consolidate logic.

While time to initialize application has increased, normal usage latency
and memory requirements have not changed significantly.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Previous update to logging didn't include fix to formatting of logs sent
to the log file. This changes includes it and makes logs readable in
utf-8.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Singleton is an anti-pattern in Python and over time has promoted a
messy layout to this project. Replace singleton with module-level instances and dependency injection.

Signed-off-by: limitcantcode <limit@limit-cc.com>
This was accidently deleted while attempting to unstage some changes

Signed-off-by: limitcantcode <limit@limit-cc.com>
Python 3.10 is reaching EOL. Updating to Python 3.12 as it has the most
compatibility with the existing packages, and updating required versions
of packages to reflect that.

Signed-off-by: limitcantcode <limit@limit-cc.com>
Outdated and replaced by `/docs` endpoint

Signed-off-by: limitcantcode <limit@limit-cc.com>
KoboldCPP is no longer supported, effective immediately. TTS has plenty
of alternatives, while STT and T2T are handled by WhisperCPP and
LlamaCPP respectively.

In addition to direct replacement, LlamaCPP is also implemented as an
embedding backend.

And for some reason theres also the following changes
- T2T operations support json-schema, even though nothing supplies them
  at the moment
- Removal of Process Manager as operations no longer share a process
  instance and manage a private one

Signed-off-by: limitcantcode <limit@limit-cc.com>
Signed-off-by: limitcantcode <limit@limit-cc.com>
Signed-off-by: limitcantcode <limit@limit-cc.com>
Signed-off-by: limitcantcode <limit@limit-cc.com>
Since forking and using the pypi version of rvc, the sdk changed and
RVCFilter was left unusable. This updates the implementation to use the
new sdk

Signed-off-by: limitcantcode <limit@limit-cc.com>
Signed-off-by: limitcantcode <limit@limit-cc.com>
Signed-off-by: limitcantcode <limit@limit-cc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant