Drop cloud and Ollama engine choices so audio stays on-machine via Docker Whisper, and tighten orphan detection plus UI around a single local flow.
131 lines
3.6 KiB
Markdown
131 lines
3.6 KiB
Markdown
# AndyTranscribe
|
|
|
|
Upload pocket-recorder audio (MP3, WAV, OGG, and more), extract embedded metadata, and transcribe locally with [faster-whisper-server](https://github.com/fedirz/faster-whisper-server) via Docker. Audio never leaves your machine.
|
|
|
|
Built with Laravel 13, Blade, Tailwind CSS 4, and [Laravel AI](https://github.com/laravel/ai).
|
|
|
|
## Features
|
|
|
|
- Upload common audio formats (MP3, WAV, OGG, FLAC, M4A, AAC, WebM, WMA, AIFF — up to 100 MB)
|
|
- Automatic metadata extraction when tags are present (title, artist, album, duration, recorded date)
|
|
- Search recordings by title, artist, or transcript
|
|
- Queued local transcription (faster-whisper in Docker)
|
|
- Live transcription progress (stage, %, elapsed time)
|
|
- Stop or restart a run anytime
|
|
- Copy finished transcripts from the recording detail page
|
|
|
|
## Requirements
|
|
|
|
- PHP 8.3+ (8.5 recommended)
|
|
- Composer
|
|
- Node.js & npm
|
|
- SQLite (default) or another supported database
|
|
- [Docker](https://docs.docker.com/get-docker/) for the Whisper container
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
composer setup
|
|
```
|
|
|
|
That installs PHP and JS dependencies, copies `.env` if needed, generates the app key, runs migrations, and builds frontend assets.
|
|
|
|
Or step by step:
|
|
|
|
```bash
|
|
composer install
|
|
cp .env.example .env
|
|
php artisan key:generate
|
|
touch database/database.sqlite # if using SQLite
|
|
php artisan migrate
|
|
npm install
|
|
npm run build
|
|
```
|
|
|
|
## Local Whisper (Docker)
|
|
|
|
Transcription calls an OpenAI-compatible HTTP API. This project ships Compose for that:
|
|
|
|
```bash
|
|
# CPU (works everywhere; slower on long files)
|
|
docker compose up -d whisper
|
|
|
|
# Optional: NVIDIA GPU
|
|
docker compose --profile gpu up -d whisper-gpu
|
|
```
|
|
|
|
First start downloads the model into a Docker volume (can take a few minutes).
|
|
|
|
Check it:
|
|
|
|
```bash
|
|
curl -s http://127.0.0.1:8090/health
|
|
```
|
|
|
|
Laravel talks to it at `LOCAL_WHISPER_URL` (default `http://127.0.0.1:8090/v1`). Port **8090** is used so it does not conflict with `php artisan serve` on 8000.
|
|
|
|
Stop:
|
|
|
|
```bash
|
|
docker compose down
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Copy values from `.env.example`. The transcription-related settings are:
|
|
|
|
| Variable | Purpose |
|
|
| --- | --- |
|
|
| `LOCAL_WHISPER_URL` | Local faster-whisper base URL (default `http://127.0.0.1:8090/v1`) |
|
|
| `LOCAL_WHISPER_API_KEY` | API key for local server (often unused) |
|
|
| `LOCAL_WHISPER_MODEL` | Model name for local transcription |
|
|
| `WHISPER_HOST_PORT` | Host port published by Compose (default `8090`) |
|
|
| `TRANSCRIPTION_TIMEOUT` | Job/HTTP timeout in seconds (default `600`) |
|
|
| `DB_QUEUE_RETRY_AFTER` | Database queue retry window; must exceed `TRANSCRIPTION_TIMEOUT` (default `660`) |
|
|
| `QUEUE_CONNECTION` | Use `database` (default) so transcription runs in the background |
|
|
|
|
Finished transcripts are stored on the recording (`transcript` column) and are included in the recordings search box (title, artist, album, filename, and transcript).
|
|
|
|
Ensure `APP_URL` matches how you access the app (default `http://localhost:8000`).
|
|
|
|
## Running locally
|
|
|
|
Start Whisper, then the app stack:
|
|
|
|
```bash
|
|
docker compose up -d whisper
|
|
composer run dev
|
|
```
|
|
|
|
Or separately:
|
|
|
|
```bash
|
|
docker compose up -d whisper
|
|
php artisan serve
|
|
php artisan queue:work
|
|
npm run dev
|
|
```
|
|
|
|
Open [http://localhost:8000/recordings](http://localhost:8000/recordings).
|
|
|
|
Transcription jobs are queued — keep a queue worker running or jobs will stay pending.
|
|
|
|
## Usage
|
|
|
|
1. **Upload** audio from Recordings → Upload (optional title override).
|
|
2. Open the recording and start transcription.
|
|
3. Watch live progress until the transcript appears (or stop and restart).
|
|
4. Search the list by title, artist, or transcript text.
|
|
|
|
## Tests
|
|
|
|
```bash
|
|
composer test
|
|
# or
|
|
php artisan test
|
|
```
|
|
|
|
## License
|
|
|
|
MIT
|