feat: add SST

This commit is contained in:
hh committed 2026-05-29 20:45:02 +02:00
1 parent 51093da660
commit bfd16ab02c
11 files changed
+196 -4

No files matched your search

@@ -0,0 +1,22 @@
from pyrogram import raw
from userbot import PyroClient
from userbot.modules.capture.chat_meta import meta_from_peer
from userbot.modules.stt import repository
HANDLES = (raw.types.UpdateTranscribedAudio,)
async def handle(
client: PyroClient,
update: raw.types.UpdateTranscribedAudio,
users: dict,
chats: dict,
) -> None:
ctx = client.capture
if ctx is None or not update.text:
return
meta = meta_from_peer(update.peer, chats, users, ctx.contacts.ids)
await repository.set_extracted_text(
ctx.pool, ctx.account_id, meta.chat_id, update.msg_id, update.text
)