Repository 指南 · 架構 · v2
openai / whisper · 架構
一個由 'whisper' 套件加上 'tests' 組成的 Python repository。偵測到的唯一進入點是 whisper/transcribe.py 的 __main__ 守衛,它會呼叫 cli(),而每一條有界路徑都停在外部或未解析的目標。模組角色來自靜態呼叫次數。記錄到的 1,388 條關係中有 1,233 條未解析,所以依賴樣貌並不完整,而且是靜態推論出來的。
- 原始 repository
- openai/whisper
- 授權
- MIT · 開源授權
- 分析的版本 · 最後驗證
- 86098128c0b4f24f0e2aa2994de830614b474227 ·
本頁中文由負責的 AI 編輯依英文正式版本 v2 翻譯;程式碼名稱、路徑、行號與數字都經確定性檢查,與英文版一致。陳述與依據表保留英文原文,因為那是獨立驗證者核對過的紀錄。看英文原文
openai/whisper 架構指南:結構與進入點
本頁用語說明
- Entrypoint record(進入點記錄)
- 分析器標記為「程式可能從這裡開始執行」的檔案。附有 __main__ guard 摘錄時,表示檔案裡有 if __name__ == "__main__": 區塊,摘錄顯示它呼叫了什麼;沒有摘錄時,只是依檔名判斷。
- Bounded static execution path(有界靜態執行路徑)
- 不執行程式、直接從原始碼重建出的呼叫鏈,走到固定步數就停。它說明在紙面上能追到多遠,不代表實際執行時會發生什麼。
- Unresolved boundary(未解析邊界)
- 靜態路徑停下的地方:下一個呼叫進入外部函式庫,或不執行就無法確定。這是本次分析的邊界,不是 repository 的缺陷。
- Static relations(靜態關係)
- 在原始碼中找到的呼叫與 import。「external or unresolved」表示指向分析範圍以外。
- Module role(模組角色)
- 分析器依呼叫進出次數推論的檔案標籤(例如 core、entry/orchestration、leaf)。它描述的是在呼叫圖中的位置,不是作者的設計意圖。
- Test-like files(類測試檔案)
- 名稱或位置看起來像測試的檔案。本次分析只計數,不執行。
- Observed · inferred · author-claimed · unresolved
- 每句話的依據:直接讀自分析的檔案;由分析器從檔案推論;repository 作者自述(metadata、README);或本次分析無法確定。
- Verified(已驗證)
- 本頁有兩種用法。在分析器的記錄裡(「verified provenance」「verified entrypoint」),它表示這筆記錄是直接從分析的檔案讀到的,也就是本指南所說的 observed;以進入點來說,就是檔案裡確實有 __main__ guard 的文字。分析器在 2026-10-04 修正後,只有 cli.py、main.py 這類像進入點的檔名、沒有 guard 的檔案,會記為 inferred(推測);在那之前分析的指南仍把這類檔案標成 verified,它依然只是對檔案用途的推測。它不代表程式被執行或測試過。「最後驗證」是這份指南最後一次通過本實驗室檢查的日期,檢查對象是所標示版本的分析記錄,不是對 repository 本身的審查。
整體樣貌
GitHub metadata 記錄的主要語言是 Python;repository 自己的描述「Robust Speech Recognition via Large-Scale Weak Supervision」是作者自述的 metadata,不是分析器確立的。
重建結果的計數:45 個被分析的檔案、1 個進入點、95 條已解析的靜態呼叫關係,以及 12 條有界執行路徑。有兩個頂層目錄被記錄為子系統候選:'whisper' 和 'tests'。分析器的摘要還描述程式碼是圍繞 data、notebooks、tests 和 whisper 組織的。
角色記錄點名了 whisper 套件的模組:__init__、__main__、audio、decoding、model、normalizers(basic 和 english)、timing、tokenizer、transcribe、triton_ops、utils,另有五個測試模組:test_audio、test_normalizer、test_timing、test_tokenizer、test_transcribe。
在根目錄,README.md、pyproject.toml、requirements.txt 和 LICENSE 被歸為專案層級的重要檔案。whisper/transcribe.py 被標為可能的進入點,分析資料偵測到的 __main__ 守衛就在這個檔案裡。
進入點與控制流
cli() 是第一個到達的函式:whisper/transcribe.py 裡有偵測到的 __main__ 守衛,守衛內容呼叫 cli():if __name__ == "__main__": cli()。
列出的每一條有界執行路徑,都從 whisper/transcribe.py:__main__ 出發,以本地呼叫到達 cli(),然後停在外部或未解析的目標,terminal_reason 是 'unresolved_boundary';沒有記錄到循環,也沒有路徑被標為截斷。點名的終點目標包括 argparse.ArgumentParser、幾個 parser.add_argument 呼叫,以及 torch.cuda.is_available。
路徑停在這些符號,是因為分析器把它們記錄為 external_or_unresolved,而不是解析進本地程式碼:這是一個有記錄的邊界,不是完成了的本地呼叫。分析器把 whisper/transcribe.py 標為 entry/orchestration 候選(3 個呼入、18 個靜態呼出)。
核心模組與推論出的角色
以下角色是分析器依已解析的靜態呼叫次數和是否屬於進入點推論出來的;它們描述的是呼叫圖的形狀,不是確認過的執行時職責。
- whisper/model.py:記錄到的連結度最高,22 個呼入、20 個呼出;service/core 候選。
- whisper/timing.py:16 入、9 出;whisper/utils.py:14 入、2 出;whisper/tokenizer.py:12 入、2 出,都是呼入次數高的 service/core 候選。
- whisper/decoding.py:11 入、13 出;whisper/audio.py:8 入、5 出,都是 service/core 候選。
- whisper/normalizers/english.py:3 入、3 出,service/core 候選;normalizers/__init__.py 和 basic.py:各 1 入、0 出,leaf/data-boundary 候選。
- whisper/triton_ops.py:1 入、1 出;whisper/__main__.py:0 入、1 出,orchestration 候選。
靜態路徑停在哪裡
分析資料記錄了 1,388 條靜態關係:1,207 個呼叫和 181 個 import,其中 1,233 條是 external_or_unresolved,155 條是本地的。
有界路徑停在 argparse.ArgumentParser、parser.add_argument 和 torch.cuda.is_available,每一個都記錄為 external_or_unresolved 的呼叫目標。torch 出現在邊界的兩側:它在 requirements.txt 裡被宣告為執行期依賴,又以未解析的外部目標的身分從 cli() 被呼叫到。
分析器記錄了:反射、執行期依賴注入、動態 import、monkey-patching、產生的程式碼、框架在執行期的接線和動態分派都沒有解析。1,388 條關係中有 1,233 條未解析,所以這份邊界清單就是靜態圖像的盡頭;超出這些邊的行為,這次分析無法確定。
各部分之間的依賴
requirements.txt 宣告了七個執行期依賴:numba、numpy、torch、tqdm、more-itertools、tiktoken 和 triton(>=2.0.0)。依賴記錄只來自 requirements 形式的清單檔;pyproject.toml 的依賴表不會被解析,所以這份清單可能不完整。
呼入次數集中的情形暗示,其餘程式碼最依賴的是 whisper/model.py、whisper/timing.py、whisper/utils.py 和 whisper/tokenizer.py。測試模組記錄到的呼入次數是零,只有往外的呼叫(例如 tests/test_timing.py 是 0 入、6 出),可以解讀成是測試在使用函式庫模組,而不是被它們呼叫。
因為 1,388 條關係中有 1,233 條未解析,這份分析資料無法給出完整的跨模組依賴圖。
這次靜態分析看不到的東西
這次分析只有靜態的部分:反射、執行期依賴注入、動態 import、monkey-patching、產生的程式碼、框架在執行期的接線和動態分派都沒有解析。
安裝、執行與建置的推論並不完整,安裝指令也沒有驗證。README 陳述的擷取是逐行進行的,可能抓到程式碼行而不是說明文字,所以來自 README 的陳述最多只算作者自述。
manifest 裡關於分析器實際能力的項目,描述的是分析器,不是這個 repository,所以不算在證據裡。程式碼在執行期的框架接線怎麼運作,這份分析資料的靜態關係無法確定;分析資料裡那條未解決的教學陳述也指出,靜態分析無法確定框架在執行期的行為。
有依據的閱讀順序
先從清單檔和專案層級的重要檔案開始:README.md、pyproject.toml、requirements.txt、LICENSE。接著,一條有依據的教學陳述建議:在改程式之前,追蹤有界執行路徑並檢查未解析的邊界。
然後從 whisper/transcribe.py 的 __main__ 守衛開始讀,順著 cli() 走到它未解析的邊;偵測到的進入點和列出的有界路徑都經過那裡。
最後看呼入次數高的模組:whisper/model.py、whisper/timing.py、whisper/utils.py、whisper/tokenizer.py,它們的靜態呼叫次數顯示它們是最被依賴的部分。
這次分析無法確定的事
這些是撰寫模型對分析記錄自己的說明。lim_3、exec_* 或 claim_… 這類識別碼指的是那次分析裡的記錄;陳述與依據表引用的也是同一批記錄。
- 重建概覽和 repository 摘要都回報 12 條有界執行路徑,但 execution_paths_static 只列出 10 筆記錄;本指南只引用列出的路徑記錄。
- 各目錄的檔案數(whisper/ 18、tests/ 7、根目錄 13、.github/ 3、data/ 2、notebooks/ 2)出現在檔案清單裡,但沒有引用 ID,所以目錄大小只透過 summary_repository 描述。
- boundaries_static 和 core_flow_static 的各行(包括 'k.title reached from whisper/transcribe.py [cli]')都沒有可引用的 ID,所以邊界只依據執行路徑記錄來陳述。
- 已解析關係的樣本行(例如測試 import whisper 模組)缺少引用 ID,所以測試對函式庫的依賴只透過推論出的角色次數描述。
- 分析資料沒有記錄任何外掛載入機制;這裡也不做任何這方面的陳述。
陳述與依據 — 40 條陳述,40 條經獨立驗證者確認(英文原文)
Every substantive statement above is a claim bound to grounding IDs of the analyzed revision. Global grounding IDs are namespaced by the analysis run.
| Claim | Epistemic status | Verifier | Grounding (global IDs) |
|---|---|---|---|
| c1 The repository's detected shape is a 'whisper' package plus a 'tests' directory, with one detected entrypoint in whisper/transcribe.py whose bounded static paths end at external or unresolved targets; 1,233 of 1,388 recorded relations are unresolved. | inferred | supported | analysis_ee52b965e66bce7b:summary_repository, analysis_ee52b965e66bce7b:py_entry_e9d8e13fe4d4, analysis_ee52b965e66bce7b:exec_210328c6174a, analysis_ee52b965e66bce7b:relation_counts |
| c2 Module roles and control flow in this asset are inferred from static call degree and bounded execution paths, not observed at runtime. | inferred | supported | analysis_ee52b965e66bce7b:role_10, analysis_ee52b965e66bce7b:exec_210328c6174a |
| c3 GitHub metadata records Python as the repository's primary language. | observed | supported | analysis_ee52b965e66bce7b:meta_primary_language |
| c4 The repository's GitHub description is 'Robust Speech Recognition via Large-Scale Weak Supervision'; this is author-claimed metadata, not analyzer-established. | author_claimed | supported | analysis_ee52b965e66bce7b:meta_description |
| c5 The architecture reconstruction records 45 analyzed files, 1 entrypoint, 95 resolved static call relations, and 12 bounded execution paths. | inferred | supported | analysis_ee52b965e66bce7b:architecture_reconstruction |
| c6 The packet's verified subsystem records mark two top-level directories as subsystem candidates: 'whisper' and 'tests'. | observed | supported | analysis_ee52b965e66bce7b:subsys_2, analysis_ee52b965e66bce7b:subsys_1 |
| c7 The analyzer's summary describes the code as organized around the directories data, notebooks, tests, and whisper, and notes the repository includes tests. | inferred | supported | analysis_ee52b965e66bce7b:summary_repository |
| c8 Role records name the whisper package's modules: __init__, __main__, audio, decoding, model, normalizers (basic and english), timing, tokenizer, transcribe, triton_ops, and utils; tests/ holds test_audio, test_normalizer, test_timing, test_tokenizer, and test_transcribe. | inferred | supported | analysis_ee52b965e66bce7b:role_6, analysis_ee52b965e66bce7b:role_7, analysis_ee52b965e66bce7b:role_8, analysis_ee52b965e66bce7b:role_9, analysis_ee52b965e66bce7b:role_10, analysis_ee52b965e66bce7b:role_11, analysis_ee52b965e66bce7b:role_12, analysis_ee52b965e66bce7b:role_13, analysis_ee52b965e66bce7b:role_14, analysis_ee52b965e66bce7b:role_15, analysis_ee52b965e66bce7b:role_16, analysis_ee52b965e66bce7b:role_17, analysis_ee52b965e66bce7b:role_18, analysis_ee52b965e66bce7b:role_1, analysis_ee52b965e66bce7b:role_2, analysis_ee52b965e66bce7b:role_3, analysis_ee52b965e66bce7b:role_4, analysis_ee52b965e66bce7b:role_5 |
| c9 The root inventory classifies README.md, pyproject.toml, requirements.txt, and LICENSE as project-level important files. | observed | supported | analysis_ee52b965e66bce7b:important_1, analysis_ee52b965e66bce7b:important_3, analysis_ee52b965e66bce7b:important_4, analysis_ee52b965e66bce7b:important_5 |
| c10 whisper/transcribe.py is flagged in the inventory as likely an entrypoint, and the packet's detected Python __main__ guard is in that file. | observed | supported | analysis_ee52b965e66bce7b:important_6, analysis_ee52b965e66bce7b:py_entry_e9d8e13fe4d4 |
c11 The detected entrypoint is a __main__ guard in whisper/transcribe.py whose body calls cli(): if __name__ == "__main__": cli(). |
observed | supported | analysis_ee52b965e66bce7b:py_entry_e9d8e13fe4d4 |
| c12 Every listed bounded execution path starts at whisper/transcribe.py:__main__, steps into cli() as a local call, then terminates at an external or unresolved target with terminal_reason 'unresolved_boundary'; no cycles are recorded and no path is truncated. | inferred | supported | analysis_ee52b965e66bce7b:exec_210328c6174a, analysis_ee52b965e66bce7b:exec_873b5bbd14cf, analysis_ee52b965e66bce7b:exec_bd66f158fc76 |
| c13 Named terminal targets are argparse.ArgumentParser, several parser.add_argument calls, and torch.cuda.is_available. | inferred | supported | analysis_ee52b965e66bce7b:exec_210328c6174a, analysis_ee52b965e66bce7b:exec_873b5bbd14cf, analysis_ee52b965e66bce7b:exec_bd66f158fc76 |
| c14 The paths end there because the analyzer records those symbols as external_or_unresolved rather than resolving them to local code; the stop is a recorded boundary, not a completed local call. | inferred | supported | analysis_ee52b965e66bce7b:exec_210328c6174a, analysis_ee52b965e66bce7b:relation_counts |
| c15 whisper/transcribe.py is labeled an entry/orchestration candidate, with 3 incoming and 18 outgoing static calls. | inferred | supported | analysis_ee52b965e66bce7b:role_16 |
| c16 Module roles are inferred by the analyzer from static resolved call degree and entrypoint membership; they describe call-graph shape, not confirmed runtime responsibility. | inferred | supported | analysis_ee52b965e66bce7b:role_10, analysis_ee52b965e66bce7b:role_14 |
| c17 whisper/model.py shows the highest recorded degree — 22 incoming and 20 outgoing calls — and is labeled a service/core candidate. | inferred | supported | analysis_ee52b965e66bce7b:role_10 |
| c18 whisper/timing.py (16 in, 9 out), whisper/utils.py (14 in, 2 out), and whisper/tokenizer.py (12 in, 2 out) are service/core candidates with high incoming counts. | inferred | supported | analysis_ee52b965e66bce7b:role_14, analysis_ee52b965e66bce7b:role_18, analysis_ee52b965e66bce7b:role_15 |
| c19 whisper/decoding.py (11 in, 13 out) and whisper/audio.py (8 in, 5 out) are labeled service/core candidates. | inferred | supported | analysis_ee52b965e66bce7b:role_9, analysis_ee52b965e66bce7b:role_8 |
| c20 The normalizers split into whisper/normalizers/english.py (3 in, 3 out; service/core candidate) and two leaf/data-boundary candidates — normalizers/__init__.py and basic.py — each with 1 incoming and 0 outgoing calls. | inferred | supported | analysis_ee52b965e66bce7b:role_13, analysis_ee52b965e66bce7b:role_11, analysis_ee52b965e66bce7b:role_12 |
| c21 Lowest-degree modules include whisper/triton_ops.py (1 in, 1 out) and whisper/__main__.py (0 in, 1 out; orchestration candidate). | inferred | supported | analysis_ee52b965e66bce7b:role_17, analysis_ee52b965e66bce7b:role_7 |
| c22 The packet records 1,388 static relations — 1,207 calls and 181 imports — of which 1,233 are external_or_unresolved and 155 are local. | observed | supported | analysis_ee52b965e66bce7b:relation_counts |
| c23 The bounded paths stop at argparse.ArgumentParser, parser.add_argument, and torch.cuda.is_available, each recorded as an external_or_unresolved call target. | inferred | supported | analysis_ee52b965e66bce7b:exec_210328c6174a, analysis_ee52b965e66bce7b:exec_873b5bbd14cf, analysis_ee52b965e66bce7b:exec_bd66f158fc76 |
| c24 torch appears on both sides of the boundary: declared as a runtime dependency in requirements.txt and reached from cli() as an unresolved external target. | inferred | supported | analysis_ee52b965e66bce7b:dep_3, analysis_ee52b965e66bce7b:exec_bd66f158fc76 |
| c25 The analyzer documents that reflection, runtime dependency injection, dynamic imports, monkey-patching, generated code, framework runtime wiring, and dynamic dispatch are not resolved. | observed | supported | analysis_ee52b965e66bce7b:lim_1 |
| c26 With 1,233 of 1,388 relations unresolved, this boundary list is where the static picture ends; behavior beyond those edges is not established by this analysis. | inferred | supported | analysis_ee52b965e66bce7b:relation_counts, analysis_ee52b965e66bce7b:lim_1 |
| c27 requirements.txt declares seven runtime dependencies: numba, numpy, torch, tqdm, more-itertools, tiktoken, and triton (version >=2.0.0). | observed | supported | analysis_ee52b965e66bce7b:dep_1, analysis_ee52b965e66bce7b:dep_2, analysis_ee52b965e66bce7b:dep_3, analysis_ee52b965e66bce7b:dep_4, analysis_ee52b965e66bce7b:dep_5, analysis_ee52b965e66bce7b:dep_6, analysis_ee52b965e66bce7b:dep_7 |
| c28 Dependency records come only from requirements-style manifests; pyproject.toml dependency tables are not parsed, so the declared list may be incomplete. | observed | supported | analysis_ee52b965e66bce7b:lim_3 |
| c29 Incoming-call concentrations suggest the rest of the code depends most on whisper/model.py, whisper/timing.py, whisper/utils.py, and whisper/tokenizer.py. | inferred | supported | analysis_ee52b965e66bce7b:role_10, analysis_ee52b965e66bce7b:role_14, analysis_ee52b965e66bce7b:role_18, analysis_ee52b965e66bce7b:role_15 |
| c30 Test modules are recorded with zero incoming calls and outward-only calls — for example tests/test_timing.py at 0 in and 6 out — which reads as tests exercising library modules rather than being called by them. | inferred | supported | analysis_ee52b965e66bce7b:role_3, analysis_ee52b965e66bce7b:role_1, analysis_ee52b965e66bce7b:role_2, analysis_ee52b965e66bce7b:role_4, analysis_ee52b965e66bce7b:role_5 |
| c31 Because 1,233 of 1,388 relations are unresolved, the packet does not yield a complete cross-module dependency map. | inferred | supported | analysis_ee52b965e66bce7b:relation_counts |
| c32 Reflection, runtime dependency injection, dynamic imports, monkey-patching, generated code, framework runtime wiring, and dynamic dispatch are not resolved by this static analysis. | observed | supported | analysis_ee52b965e66bce7b:lim_1 |
| c33 Install, run, and build inference is partial, and installation commands are not verified by the analyzer. | observed | supported | analysis_ee52b965e66bce7b:lim_2 |
| c34 README claim extraction is line-based and may capture code lines instead of prose, so README-derived statements are author-claimed at most. | observed | supported | analysis_ee52b965e66bce7b:lim_4 |
| c35 Manifest entries describing the analyzer's actual capabilities concern the analyzer, not the analyzed repository, and are excluded from repository evidence. | observed | supported | analysis_ee52b965e66bce7b:lim_5 |
| c36 How the code's runtime framework wiring behaves is not established by this packet's static relations; the packet's own unresolved teaching claim states static analysis cannot establish runtime framework behavior. | unresolved | supported | analysis_ee52b965e66bce7b:claim_7c9925f9c8f4, analysis_ee52b965e66bce7b:lim_1 |
| c37 A grounded teaching claim recommends starting with manifests and important symbols, then tracing the bounded execution path and inspecting unresolved boundaries before changing code. | inferred | supported | analysis_ee52b965e66bce7b:claim_e56db45165bf |
| c38 The packet classifies README.md, pyproject.toml, requirements.txt, and LICENSE as project-level important files. | observed | supported | analysis_ee52b965e66bce7b:important_1, analysis_ee52b965e66bce7b:important_3, analysis_ee52b965e66bce7b:important_4, analysis_ee52b965e66bce7b:important_5 |
| c39 A practical second step is whisper/transcribe.py: the detected __main__ guard and every listed bounded path run through its cli(). | inferred | supported | analysis_ee52b965e66bce7b:py_entry_e9d8e13fe4d4, analysis_ee52b965e66bce7b:exec_210328c6174a |
| c40 Finish with the high-incoming modules — whisper/model.py, whisper/timing.py, whisper/utils.py, whisper/tokenizer.py — since their static degree marks them as the most depended-upon parts. | inferred | supported | analysis_ee52b965e66bce7b:role_10, analysis_ee52b965e66bce7b:role_14, analysis_ee52b965e66bce7b:role_18, analysis_ee52b965e66bce7b:role_15 |
來源、權利與說明 · attribution-license-templates/v0.1
權利聲明。原始 repository 託管於 GitHub。其原始碼、文件、名稱、媒體與相關素材的權利,仍屬各自的作者、貢獻者與其他權利人所有,並受該 repository 的授權條款約束。
Original repository hosted on GitHub. Repository source code, documentation, names, media, and related project materials remain subject to the rights of their respective authors, contributors, and other rights holders and to applicable repository license terms.
平台聲明。GitHub 是所連結 repository 的來源託管平台。GitHub 與相關標誌為 GitHub, Inc. 的商標。除非另有明確說明,EVEMISS Technology 與 GitHub 之間沒有隸屬或背書關係。
GitHub is the source hosting platform for the linked repository. GitHub and related marks are trademarks of GitHub, Inc. EVEMISS Technology is not affiliated with or endorsed by GitHub unless explicitly stated otherwise.
這一頁怎麼來的。本頁由對應版本的 repository 分析與 AI 輔助的編輯工具產生。技術陳述綁定所分析的版本;原始 repository 更新後,可能重新驗證。
This page was produced using revision-aware repository analysis and AI-assisted editorial tooling. Technical claims are tied to the analyzed repository revision and may be revalidated when the source repository changes.
本頁包含 AI 輔助分析,並經 EVEMISS Technology 人工與 AI 協力審閱。 · 回報權利疑慮 · 回到概覽