Giter VIP home page Giter VIP logo

flet-whisper's Introduction

README

whisper を使って日本語の文字起こしをするGUIアプリケーション(Flet 製)。

Note

このソフトは ffmpeg を必要とします。PCにはfmpegがインストールされていて、なおかつffmpegのパスがユーザー環境変数に追加されている必要があります。

USAGE

okoshi.exe 単体で動きます。適当なフォルダに配置してから、ファイルをダブルクリックして起動してください。 黒い画面がしばらく(数十秒~)表示されたあと、メイン画面が立ち上がります。

img

初回起動時のみ必要な操作

おそらく初回の起動時に、Windows からの警告が表示されます。有効化するには下記の操作をしてください。

  1. 「PC が保護されました」という表示の場合は「詳細情報」をクリック。

    img

  2. 表示される「実行」ボタンをクリックするとアプリが起動します。

    img

2回目以降

  1. 対象の音声ファイル出力フォルダ を指定する
  2. Quality のドロップダウンリストから文字起こしの品質を指定する
    • medium(高品質)以上を指定すると処理に数時間~数日かかることがあります
  3. 文字起こしを実行する のボタンを押すと処理が開始します
    • 実行中はボタンなどが反応しなくなります
    • 黒い画面に進捗が表示されます
    • メイン画面も黒い画面も閉じずにそのまま待機してください
    • 実行中はPCがとても重くなるので注意してください
  4. mail にメールアドレスを指定すると、文字起こしが完了した段階でメールで通知します
    • メールには文字起こし結果のテキストファイルが添付されます
    • メール通知後もプログラムを実行したPCには音声ファイルとテキストファイルが残っているので、適宜片付けてください
  5. 黒い画面かメイン画面のどちらかを閉じるとプログラムが終了します

Build (for developper)

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):

  1. git clone https://github.com/pyinstaller/pyinstaller
  2. cd .\pyinstaller\bootloader\
  3. 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 .
    • In my environment, 2015 and 2022 were installed. If just installing vcredist2015 results in error, try installing the latest version as well.
  4. cd .. (move to pyinstaller directory)
  5. pip install .
  6. Delete pyinstaller folder.
    • This folder is used only for package build and no longer used.

Build okoshi.exe

  1. Enter venv (skippable on VSCode)

    .\.venv\Scripts\activate
    
  2. 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
  3. Exit from venv (skippable on VSCode)

    deactivate
    

flet-whisper's People

Contributors

awtnb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.