https://github.com/aaronsb/whisper-client
A command-line client for transcribing audio files and YouTube videos using OpenAI's Whisper model via the whisper-service backend. Supports batch processing, job tracking, and markdown output format.
https://github.com/aaronsb/whisper-client
Last synced: 8 months ago
JSON representation
A command-line client for transcribing audio files and YouTube videos using OpenAI's Whisper model via the whisper-service backend. Supports batch processing, job tracking, and markdown output format.
- Host: GitHub
- URL: https://github.com/aaronsb/whisper-client
- Owner: aaronsb
- License: mit
- Created: 2024-12-17T21:02:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-05T22:11:51.000Z (about 1 year ago)
- Last Synced: 2025-09-06T00:59:15.911Z (9 months ago)
- Language: Rust
- Size: 229 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Whisper Client
A command-line client for transcribing audio files using OpenAI's Whisper model via the [whisper-service](https://github.com/aaronsb/whisper-service) backend.
## Features
- Transcribe audio files to text using Whisper
- Transcribe YouTube videos by URL
- Support for batch processing directories of audio files
- Track transcription job status
- View job history
- Terminate running jobs
- Responsive to external state changes
- Configurable service endpoint
- Markdown output format
## Installation
### Using Build Scripts
#### Linux
```bash
# Build and test
./build.sh
# Build, test, and install to /usr/local/bin
./build.sh --install
```
#### Windows
```powershell
# Build and test
.\build.ps1
# Build, test, and install to Program Files
.\build.ps1 -Install
```
### Manual Installation
```bash
# Build from source
cargo build --release
# Copy to a location in your PATH
sudo cp target/release/whisper-client /usr/local/bin/
```
## Configuration
On first run, the client creates a configuration file at:
- Linux: `~/.config/whisper-client/config.json`
- Windows: `%USERPROFILE%\.config\whisper-client\config.json`
Default configuration:
```json
{
"service_url": "http://localhost:8000"
}
```
Edit this file to point to your whisper-service instance if it's running on a different host or port.
## Usage
For detailed usage instructions, see the [usage guide](docs/usage.md).
### Transcribe a YouTube Video
```bash
whisper-client transcribe-youtube --url YOUTUBE_URL
```
### Transcribe a Single File
```bash
whisper-client transcribe PATH_TO_FILE
```
### Transcribe a Directory
```bash
# Process all audio files in directory
whisper-client transcribe PATH_TO_DIR
# Process directory recursively
whisper-client transcribe -r PATH_TO_DIR
```
### List All Jobs
```bash
whisper-client list-jobs
# With detailed information
whisper-client list-jobs -v
```
### Check Job Status
```bash
whisper-client status --job-id JOB_ID
# With transcription output (if completed)
whisper-client status --job-id JOB_ID -v
```
### Terminate a Job
```bash
whisper-client terminate --job-id JOB_ID
```
## Output
Transcriptions are saved as markdown files next to the source audio files, containing:
- Transcribed text
- Timestamps for each segment
- Job metadata
## Service Requirements
This client requires a running instance of [whisper-service](https://github.com/aaronsb/whisper-service). By default, it expects the service to be running at `http://localhost:8000`. You can modify the service URL in the configuration file.
## Supported Audio Formats
The client supports common audio formats including:
- WAV
- MP3
- M4A
- FLAC
- OGG
- MKV
## Error Handling
- Automatically retries failed connections
- Graceful handling of service interruptions
- Responsive to external state changes (e.g., jobs terminated via the server API)
- Clear error messages for common issues
- CTRL+C support for canceling running jobs
## Development
Built with Rust, using:
- clap for CLI argument parsing
- reqwest for HTTP requests
- tokio for async runtime
- serde for JSON handling
## License
MIT License