whisper を使って日本語の文字起こしをするGUIアプリケーション(Flet 製)。
Note
このソフトは ffmpeg を必要とします。PCにはfmpegがインストールされていて、なおかつffmpegのパスがユーザー環境変数に追加されている必要があります。
okoshi.exe
単体で動きます。適当なフォルダに配置してから、ファイルをダブルクリックして起動してください。
黒い画面がしばらく(数十秒~)表示されたあと、メイン画面が立ち上がります。
おそらく初回の起動時に、Windows からの警告が表示されます。有効化するには下記の操作をしてください。
対象の音声ファイル
と出力フォルダ
を指定するQuality
のドロップダウンリストから文字起こしの品質を指定する- medium(高品質)以上を指定すると処理に数時間~数日かかることがあります
文字起こしを実行する
のボタンを押すと処理が開始します- 実行中はボタンなどが反応しなくなります
- 黒い画面に進捗が表示されます
- メイン画面も黒い画面も閉じずにそのまま待機してください
- 実行中はPCがとても重くなるので注意してください
mail
にメールアドレスを指定すると、文字起こしが完了した段階でメールで通知します- メールには文字起こし結果のテキストファイルが添付されます
- メール通知後もプログラムを実行したPCには音声ファイルとテキストファイルが残っているので、適宜片付けてください
- 黒い画面かメイン画面のどちらかを閉じるとプログラムが終了します
Create .env
into assets
folder and set your mail setting.
.\
├─main.py
└─assets
└─.env
.env
:
SENDER_ADDRESS=●●
CC_ADDRESS=●●
SENDER_PASSWORD=●●
SMTP_HOST=●●
SMTP_PORT=●●
Create venv.
python -m venv .venv
Install packages:
python -m pip install flet
python -m pip install python-dotenv
python -m pip install openai-whisper
Build pyinstaller locally (.exe
generated with pip-installed pyinstaller is often considered as virus by security soft):
git clone https://github.com/pyinstaller/pyinstaller
cd .\pyinstaller\bootloader\
python .\waf all
- Build would fail, but it is ignorable.
- Visual Studio C++ compiler is required for build.
- It can be installed with Scoop :
scoop install vcredist2015
.
- It can be installed with Scoop :
- In my environment, 2015 and 2022 were installed. If just installing vcredist2015 results in error, try installing the latest version as well.
cd ..
(move topyinstaller
directory)pip install .
- Delete
pyinstaller
folder.- This folder is used only for package build and no longer used.
-
Enter venv (skippable on VSCode)
.\.venv\Scripts\activate
-
Run:
pyinstaller --onefile --name okoshi --collect-data whisper --add-data "assets\.env;assets" .\main.py
- If error was raised around pathlib, uninstall it:
python -m pip uninstall pathlib -y
- After build, re-install:
python -m pip install pathlib
- If error was raised around pathlib, uninstall it:
-
Exit from venv (skippable on VSCode)
deactivate