2026年1月22日 星期四

障礙排除 winpc ( whisper )


方法 1:把 Scripts 資料夾加到 PATH

  1. 找到路徑:

    程式碼
    C:\Users\Anderson0709\AppData\Roaming\Python\Python314\Scripts
    

    這裡應該有 whisper.exe

  2. 在 Windows 搜尋「環境變數」→ 打開 編輯系統環境變數

  3. 在「使用者變數」或「系統變數」找到 Path → 編輯 → 新增:

    程式碼
    C:\Users\Anderson0709\AppData\Roaming\Python\Python314\Scripts
    
  4. 按下確定,重新開啟 PowerShell。

  5. 測試:

    powershell
    whisper --help
    

方法 2:直接用 Python 執行(不用改 PATH)

如果你不想改環境變數,可以直接用:

powershell
python -m whisper --help
python -m whisper your_audio_file.mp3 --model small

✅ 建議:先試試 python -m whisper --help,確認 Whisper 可以跑;再把 Scripts 資料夾加到 PATH,這樣就能直接用 whisper 指令了。







這個不是 ffmpeg 的問題,是 Chocolatey 權限/鎖檔卡死,而且我可以很明確跟你說:不用重裝 Windows,也不用放棄

重點只有一句話👇
👉 你現在不是用「系統管理員」身分在跑 PowerShell,而且 Choco 之前留下了鎖檔


問題重點(白話版)

錯誤在這幾句:

  • Unable to obtain lock file access

  • UnauthorizedAccessException

  • 拒絕存取 C:\ProgramData\chocolatey\lib-bad

意思是:

  • Chocolatey 在 C:\ProgramData(系統資料夾)

  • 沒有管理員權限

  • 或之前安裝中斷 → 鎖檔殘留


✅ 解法 A(最快、最乾淨,強烈推薦)

1️⃣ 關掉現在的 PowerShell

全部關掉。


2️⃣ 用「系統管理員」開 PowerShell

很重要 ⚠️

  • 開始功能表

  • 搜尋 PowerShell

  • 👉 右鍵 → 以系統管理員身分執行

你會看到視窗標題寫:
Administrator: Windows PowerShell


3️⃣ 手動刪掉卡住的鎖檔(安全)

在「管理員 PowerShell」貼上:

Remove-Item "C:\ProgramData\chocolatey\lib\c00565a56f0e64a50f2ea5badcb97694d43e0755" -Force -ErrorAction SilentlyContinue Remove-Item "C:\ProgramData\chocolatey\lib-bad" -Recurse -Force -ErrorAction SilentlyContinue

(這只是清垃圾,不會壞系統)


4️⃣ 再裝一次 ffmpeg

choco install ffmpeg -y

5️⃣ 驗證

ffmpeg -version

看到版本資訊 = 100% 成功


✅ 解法 B(如果你不想再碰 Chocolatey)

直接手動裝 ffmpeg(Whisper 完全 OK)

步驟超簡版

  1. 下載 ffmpeg(Windows build)

  2. 解壓到例如:

    C:\ffmpeg\
  3. 確認有:

    C:\ffmpeg\bin\ffmpeg.exe
  4. C:\ffmpeg\bin 加進 PATH

  5. 重開 PowerShell

  6. 測試:

    ffmpeg -version

👉 Whisper 不在乎你用不用 choco,只在乎 ffmpeg.exe 找不找得到

沒有留言:

張貼留言

video2ppt.git from github

  Video2PPT 專案執行指南 本文件旨在解決 macOS 環境下 Python 套件安裝受限(PEP 668)的問題,並提供完整的環境架設流程。 1. 快速開始 (指令彙整) 請在您的終端機 ( Terminal ) 中,於專案根目錄下依序複製並執行以下指令: Bash ...