fetch_media
Download media from a Telegram message and derive text from it. Transcribe audio/video, extract text from documents, or download files; returns local path and content.
Instructions
Download a message's media to local disk and derive text from it. action: auto (transcribe audio/video, extract text from pdf/docx/xlsx/txt/csv), download (file only, e.g. photos), transcribe, extract. Returns the local file path (this machine) and the transcript / document text. Voice messages in private chats and groups are transcribed automatically on arrival, so check get_messages first. Already-processed media is returned immediately; force=True redoes the work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | ||
| force | No | ||
| action | No | auto | |
| msg_id | Yes | ||
| chat_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |