feat: add SST

This commit is contained in:
h
2026-05-29 20:45:02 +02:00
parent 51093da660
commit bfd16ab02c
11 changed files with 196 additions and 4 deletions
+8
View File
@@ -3,6 +3,8 @@ from pyrogram.types import Message
from userbot import PyroClient
from userbot.modules.capture import capture_message
from userbot.modules.capture.chat_meta import meta_from_chat
from userbot.modules.stt import is_transcribable
from userbot.modules.stt.gate import safe_transcribe
@PyroClient.on_message()
@@ -15,6 +17,12 @@ async def on_message(client: PyroClient, message: Message) -> None:
if not toggles.messages:
return
await capture_message(client, message, ctx, toggles)
if (
toggles.stt
and is_transcribable(message)
and (message.outgoing or message.unread_media is False)
):
await safe_transcribe(client, ctx, meta.chat_id, message.id)
handlers = on_message.handlers