mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-03 06:00:34 +00:00
BIG PYTHON REFACTOR
Python scripts moved out of python/ folder to root to be unified with plugins + frontend extension around api calls
This commit is contained in:
parent
f94b7d742c
commit
d02dda3667
326 changed files with 1096 additions and 862 deletions
|
|
@ -1,18 +0,0 @@
|
|||
from python.helpers.api import ApiHandler, Request, Response
|
||||
|
||||
from python.helpers import runtime, settings, whisper
|
||||
|
||||
class Transcribe(ApiHandler):
|
||||
async def process(self, input: dict, request: Request) -> dict | Response:
|
||||
audio = input.get("audio")
|
||||
ctxid = input.get("ctxid", "")
|
||||
|
||||
if ctxid:
|
||||
context = self.use_context(ctxid)
|
||||
|
||||
# if not await whisper.is_downloaded():
|
||||
# context.log.log(type="info", content="Whisper STT model is currently being initialized, please wait...")
|
||||
|
||||
set = settings.get_settings()
|
||||
result = await whisper.transcribe(set["stt_model_size"], audio) # type: ignore
|
||||
return result
|
||||
Loading…
Add table
Add a link
Reference in a new issue