MP4 などの動画・音声ファイルから、話者分離付きの文字起こしを行うデスクトップアプリです。
Electron + Vue 3 のフロントエンドと、Python (FastAPI) のバックエンドで構成されています。
動作環境: macOS (Apple Silicon) 専用です。
| レイヤー | 技術 |
|---|---|
| フロントエンド | Electron 35, Vue 3, TypeScript |
| バックエンド | Python 3.13, FastAPI, uvicorn |
| 文字起こし | Whisper MLX (mlx-whisper) |
| 話者分離 | pyannote.audio |
| パッケージ管理 (Python) | uv |
| パッケージ管理 (Node) | pnpm |
依存関係のインストールに使用します。未導入の場合は先にインストールしてください。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"話者分離モデル (pyannote/speaker-diarization-community-1) の利用に必要です。
- https://huggingface.co/settings/tokens でアクセストークン (
hf_xxx...) を発行する - 以下のモデルページでアクセス申請(利用規約への同意)を行う
ビルド済みアプリを Homebrew 経由でインストールします。
brew install --cask nanasi-apps/tap/transcriberインストール後、アプリを起動する前に HF_TOKEN を macOS のシステム環境変数 として設定する必要があります。
macOS の GUI アプリはターミナルのシェル環境を引き継がないため、~/.zshrc への追記では反映されません。
① 今すぐ反映(現在のログインセッションのみ)
launchctl setenv HF_TOKEN "hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"設定後、Transcriber を起動(または再起動)してください。
② 再起動後も永続化する
~/Library/LaunchAgents/me.transcriber.env.plist を以下の内容で作成します。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>me.transcriber.env</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>setenv</string>
<string>HF_TOKEN</string>
<string>hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>作成後、ログインエージェントとして読み込みます。
launchctl load ~/Library/LaunchAgents/me.transcriber.env.plist次回ログイン以降は自動で環境変数が設定されます。
Brewfile から次の依存関係をまとめて導入します。
python@3.13uvnodepnpmffmpeg
git clone https://github.com/nanasi-apps/transcriber
cd transcriber./setup.shスクリプトが以下を自動で行います。
brew bundleでBrewfileの依存関係をインストール.env.localが未作成の場合、HF_TOKENの入力プロンプトを表示(またはスキップして雛形を作成)- バックエンドの依存関係インストール (
uv sync --project backend --python python3.13) - フロントエンドの依存関係インストール (
pnpm install --frozen-lockfile)
Homebrew だけ先に反映したい場合は単独でも実行できます。
brew bundle install.env.local を手動で作成する場合:
HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
雛形は .env.local.example にあります。
./start.shバックエンド (FastAPI) と Electron が同時に起動します。
| プロセス | 説明 |
|---|---|
BACKEND |
FastAPI サーバー (http://127.0.0.1:8765) |
ELECTRON |
Electron アプリ |
pnpm --dir frontend build:mac| 出力先 | 内容 |
|---|---|
frontend/out/ |
ビルド成果物 |
frontend/dist/ |
配布用 .dmg |
GitHub に v* タグを push すると、以下が自動で行われます。
- GitHub Releases に arm64 の
.dmgを公開 nanasi-apps/homebrew-tapの Cask を自動更新
この自動更新には、Actions secret
TAP_GITHUB_TOKENが必要です。
transcriber/
├── backend/ # Python バックエンド
│ ├── src/transcriber/ # アプリケーションコード
│ │ ├── server.py # FastAPI サーバー
│ │ ├── pipeline.py # 文字起こしパイプライン
│ │ ├── asr.py # Whisper MLX による音声認識
│ │ └── diarization.py# pyannote による話者分離
│ └── pyproject.toml
├── frontend/ # Electron + Vue 3 フロントエンド
│ ├── src/
│ └── package.json
├── Brewfile # Homebrew 依存関係
├── setup.sh # セットアップスクリプト
├── start.sh # 起動スクリプト
└── .env.local # ローカル環境変数 (Git 管理外)