iFlytek Invoice OCR Recognition
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_265fda35/test1-v2-new.
About this skill
The Problem
Manually transcribing amounts, dates, and vendor names from paper or scanned invoices—VAT invoices, taxi receipts, train tickets, medical bills—gets slow and error-prone once volume grows past a handful of documents per day. Maintaining an expense ledger by hand stops being viable. This skill collapses the "snap a photo → get structured data" step into a single API call.
How It Works
- Stdlib only: the script
scripts/invoice.pyrelies solely on the Python 3 standard library—nopip installrequired. - Auth handled for you: set
XFYUN_APP_ID,XFYUN_API_KEY, andXFYUN_API_SECRETas environment variables. The script computes the HMAC-SHA256 signature and calls the iFlytek endpoint internally, so you never write signing logic by hand. - Broad format support:
png,jpg/jpeg,bmp,gif,tif/tiff, andpdfare all accepted; scanned documents can be passed as PDF directly. - Two output modes: by default the output is human-readable structured fields (amount, date, vendor, etc.). Pass
--rawto get the full API JSON response for downstream parsing or database ingestion. - Traceable errors: code
0means success; codes like10105(invalid signature),10163(request body too large), and11200(quota exceeded) are documented, making it straightforward to debug.
Boundaries & Caveats
- Recognition accuracy is heavily dependent on image quality—blur, occlusion, or poor lighting will degrade field extraction. Shoot clearly and crop to the invoice area when possible.
- The API enforces image-size and call-quota limits that vary by your iFlytek service tier; verify your quota before batch runs.
- The skill targets Chinese invoice and receipt types (VAT invoices, taxi receipts, train tickets, medical bills); English or non-Chinese invoices are not listed in the supported scope.
Use Cases
- Finance receives taxi receipt or train ticket photos and needs amounts, dates, and vendors for a reimbursement ledger.
- Operations staff convert multiple receipt photos into structured fields after business trips to avoid manual form entry.
- Administrative staff convert scanned PDF medical bills into readable fields for archiving and reconciliation.
- Developers call the recognition script in an automation flow to get formatted text or `--raw` JSON output.
Best For
- Finance or expense accounting staff who want amounts, dates, and vendors from Chinese receipts turned into bookkeeping-ready fields.
- Operations or administrative staff who need to organize trip receipts into reimbursement data without manual transcription.
- Automation engineers who want to integrate the recognition script and consume `--raw` JSON output downstream.
- Administrative or audit assistants who need scanned bills converted into structured text for review and archiving.
Related Skills
Organizes files by extension into subfolders like Documents, Code, and Archives, then outputs a report.
Extract tables, formulas, charts, and layout from invoices, reports, papers, and multi-column documents.
Generates a multi-sheet Excel report containing only structured data tables from byteplan-analysis results.
Automatically sort directory files into type-based folders, with dry-run preview, reports, and JSON custom rules.