{"id":50913177,"url":"https://github.com/p4suta/mojiokoshi","last_synced_at":"2026-06-16T12:02:20.467Z","repository":{"id":350858716,"uuid":"1208522839","full_name":"P4suta/mojiokoshi","owner":"P4suta","description":"Local audio transcription tool with real-time progress, powered by faster-whisper and CUDA","archived":false,"fork":false,"pushed_at":"2026-06-04T19:29:18.000Z","size":187,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T21:17:20.490Z","etag":null,"topics":["audio-transcription","cuda","docker","fastapi","faster-whisper","gpu","python","self-hosted","speech-to-text","sveltekit","transcription","whisper"],"latest_commit_sha":null,"homepage":"https://p4suta.github.io/mojiokoshi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/P4suta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-12T12:00:13.000Z","updated_at":"2026-06-04T19:29:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/P4suta/mojiokoshi","commit_stats":null,"previous_names":["p4suta/mojiokoshi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/P4suta/mojiokoshi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fmojiokoshi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fmojiokoshi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fmojiokoshi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fmojiokoshi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/P4suta","download_url":"https://codeload.github.com/P4suta/mojiokoshi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4suta%2Fmojiokoshi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34404748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-transcription","cuda","docker","fastapi","faster-whisper","gpu","python","self-hosted","speech-to-text","sveltekit","transcription","whisper"],"created_at":"2026-06-16T12:02:19.417Z","updated_at":"2026-06-16T12:02:20.462Z","avatar_url":"https://github.com/P4suta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mojiokoshi\n\nLocal audio transcription tool with real-time progress display, powered by [faster-whisper](https://github.com/SYSTRAN/faster-whisper) and NVIDIA CUDA.\n\n## Features\n\n- **High-accuracy transcription** using Whisper large-v3 model by default\n- **GPU-accelerated** with automatic CUDA detection and CPU fallback\n- **Real-time progress** showing elapsed time, percentage, and ETA during transcription\n- **Live segment display** as each part of the audio is transcribed\n- **Multi-language support** with Japanese, English, Chinese, Korean, and auto-detection\n- **Modern web UI** with dark/light theme, drag-and-drop upload, copy and download results\n- **Structured logs and RFC 7807 error responses** for easier debugging and monitoring\n- **Docker-first workflow** with GPU passthrough for zero-config deployment\n\n## Quick Start\n\nRequires [Docker](https://docs.docker.com/get-docker/) and, for GPU acceleration, the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).\n\n```bash\ngit clone https://github.com/P4suta/mojiokoshi.git\ncd mojiokoshi\ndocker compose up\n```\n\nThen open \u003chttp://localhost:8000\u003e in your browser.\n\nThe first run downloads the Whisper model (~3 GB for `large-v3`) into a persistent Docker volume, so subsequent starts are fast.\n\n\u003e No host-side Python or Node install is needed — everything runs inside containers.\n\n## How It Works\n\n1. **Upload** an audio file (drag-and-drop or click to browse)\n2. **Select language** (defaults to Japanese, or choose auto-detect)\n3. **Click Transcribe** and watch results appear in real-time\n4. **Copy or download** the transcription as a text file\n\nDuring transcription, you'll see:\n- A progress bar with percentage\n- Elapsed time and estimated time remaining\n- Each segment as it's transcribed with timestamps\n\n## Supported Audio Formats\n\n| Format | Extension |\n|--------|-----------|\n| MP3 | `.mp3` |\n| WAV | `.wav` |\n| M4A | `.m4a` |\n| OGG | `.ogg` |\n| FLAC | `.flac` |\n| WebM | `.webm` |\n| WMA | `.wma` |\n| AAC | `.aac` |\n\nMaximum file size: **500 MB**\n\n## Models\n\n| Model | Parameters | VRAM (float16) | Speed | Accuracy | Best For |\n|-------|-----------|----------------|-------|----------|----------|\n| `tiny` | 39M | ~1 GB | Fastest | Lower | Quick drafts, testing |\n| `base` | 74M | ~1 GB | Fast | Fair | Short clips |\n| `small` | 244M | ~2 GB | Moderate | Good | General use |\n| `medium` | 769M | ~5 GB | Slower | High | Important content |\n| `large-v3` | 1.5B | ~6 GB | Slowest | Highest | Production (default) |\n\nIf your GPU doesn't have enough VRAM, either switch to a smaller model or let the app fall back to CPU (slower, but no VRAM limit).\n\n## Languages\n\n| Language | Code |\n|----------|------|\n| Japanese | `ja` (default) |\n| English | `en` |\n| Chinese | `zh` |\n| Korean | `ko` |\n| Auto-detect | `auto` |\n\nAuto-detect works well for most audio, but specifying the language usually yields better results.\n\n## Configuration\n\nAll runtime behavior is controlled via `MOJIOKOSHI_*` environment variables (or a local `.env` file). Commonly-tweaked values:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `MOJIOKOSHI_LOG_FORMAT` | `console` | `json` for structured/prod-style logs, `console` for dev |\n| `MOJIOKOSHI_LOG_LEVEL` | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` / `CRITICAL` |\n| `MOJIOKOSHI_PORT` | `8000` | Web UI / API port |\n| `MOJIOKOSHI_DEFAULT_MODEL` | `large-v3` | Any Whisper model name |\n| `MOJIOKOSHI_OPEN_BROWSER` | `true` | Whether to auto-open a browser tab on startup |\n| `MOJIOKOSHI_SENTRY_DSN` | *(unset)* | Enables Sentry error reporting when set (requires the `observability` extra) |\n\nLarger fixed values (supported formats, upload size cap, transcription timeout) live in `src/mojiokoshi/config.py`.\n\n## Development\n\nThe project is Docker-first: all tooling (Python, uv, ruff, pytest, pyrefly) runs inside the container, so you don't need to install anything on the host besides Docker.\n\n### Option A — VS Code Dev Containers\n\n1. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).\n2. Open the repo and run **\"Dev Containers: Reopen in Container\"**.\n3. VS Code drops you into `/app` with the venv already synced and pre-commit hooks installed.\n\n### Option B — Taskfile on the host\n\nWith [Task](https://taskfile.dev/installation/) installed, all common dev commands are one-liners:\n\n```bash\ntask up             # Start the dev stack (GPU + hot reload)\ntask shell          # Shell into the app container\ntask lint           # ruff + pyrefly (read-only)\ntask fix            # ruff --fix + ruff format (writes)\ntask test           # Fast test suite\ntask test:all       # Full suite including integration/slow marks\ntask precommit      # Run all pre-commit hooks\ntask down           # Stop the dev stack\n```\n\n### Running Tests\n\nTests are enforced at 100% branch coverage.\n\n```bash\ntask test           # Fast suite\ntask test:all       # Include integration + slow tests\n```\n\n### Linting and Formatting\n\nRuff (strict ruleset) and pyrefly run on every PR. Locally:\n\n```bash\ntask lint           # Check only\ntask fix            # Auto-fix + format\n```\n\nPre-commit hooks (ruff, gitleaks, hadolint, zizmor, standard hygiene) are installed automatically in the Dev Container; outside of it, run `pre-commit install` once.\n\n## Troubleshooting\n\n### \"Model is still loading, please wait\"\n\nThe model loads in the background after server startup. For `large-v3`, the first download is ~3 GB and may take several minutes. Subsequent starts use the cached model and load in seconds. Watch the startup status on the web UI.\n\n### CUDA not detected (falling back to CPU)\n\n- Ensure NVIDIA drivers are installed: `nvidia-smi`\n- Check that CUDA 12+ is available\n- For Docker, install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)\n- CPU mode works but is significantly slower (5–10×)\n\n### Out of memory (OOM) error\n\nYour GPU doesn't have enough VRAM for the selected model. Options:\n- Switch to a smaller model by setting `MOJIOKOSHI_DEFAULT_MODEL=small`\n- Close other GPU-intensive applications\n- Use CPU mode (slower but no VRAM limit)\n\n### Transcription is slow\n\n- **GPU recommended**: CPU transcription is 5–10× slower than GPU\n- **Model size matters**: `tiny` is ~20× faster than `large-v3`\n- **Long audio files**: A 1-hour file with `large-v3` on GPU takes ~2–5 minutes\n\n### \"Processing is taking longer than expected\"\n\nThis warning appears if no new segments arrive for 30 seconds. It usually means the model is working on a difficult section (background noise, multiple speakers, etc.). Wait a bit longer, or cancel and retry with a smaller model.\n\n### File upload fails\n\n- Check file size (max 500 MB)\n- Ensure the file format is supported (see table above)\n- Try converting to MP3 or WAV first\n\n### Docker build fails\n\n- Ensure Docker has network access for pulling dependencies\n- The build requires ~10 GB of disk space (CUDA base image + model)\n- On Windows, ensure WSL2 is configured for Docker\n\n## Tech Stack\n\n- **Backend**: Python 3.12, FastAPI, faster-whisper, uvicorn, structlog, pydantic-settings\n- **Frontend**: Svelte 5, SvelteKit, Tailwind CSS 4, Vite 8\n- **Transcription**: faster-whisper (CTranslate2-based Whisper implementation)\n- **Package managers**: uv (Python), Bun (JavaScript)\n- **Container**: Docker multi-stage build on NVIDIA CUDA 12.9.1\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4suta%2Fmojiokoshi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4suta%2Fmojiokoshi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4suta%2Fmojiokoshi/lists"}