-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (59 loc) · 2.09 KB
/
Copy pathMakefile
File metadata and controls
72 lines (59 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.PHONY: help dev test format lint clean transcribe install
PYTHON := python3
PIP := pip3
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Main Commands:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@echo ''
@echo 'Quick Start:'
@echo ' make quick-setup # Show setup instructions'
@echo ' make transcribe # Run main transcription script'
dev: ## Install development dependencies
$(PIP) install -r requirements-dev.txt
$(PIP) install -e .
install: ## Install production dependencies
$(PIP) install -r requirements.txt
test: ## Run tests
pytest tests/ -v --cov=src/transcriber
format: ## Format code with black and isort
black src/ tests/
isort src/ tests/
lint: ## Run linting with ruff and mypy
ruff check src/ tests/
mypy src/ tests/
clean: ## Clean build artifacts
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
transcribe: ## Run the main transcription script
@echo "🎙️ Starting Whisper Transcription..."
@if [ ! -f "./whisper-transcribe-with-download.sh" ]; then \
echo "❌ Main script not found!"; \
echo ""; \
echo "📋 Setup Instructions:"; \
echo "1. Install whisper-cli: https://github.com/ggerganov/whisper.cpp"; \
echo "2. Install dependencies: brew install ffmpeg sox yt-dlp"; \
echo "3. Download Whisper models to ~/whisper-models/"; \
echo ""; \
echo "💡 Or run: make quick-setup"; \
exit 1; \
fi
@echo "Make sure whisper-cli and dependencies are installed!"
@echo ""
./whisper-transcribe-with-download.sh
quick-setup: ## Quick setup and run
@echo "🔧 Quick Setup Guide:"
@echo "1. Install whisper-cli from: https://github.com/ggerganov/whisper.cpp"
@echo "2. Install dependencies: brew install ffmpeg sox yt-dlp"
@echo "3. Download Whisper models to ~/whisper-models/"
@echo "4. Run: make transcribe"
build: ## Build package
$(PYTHON) -m build
publish: ## Publish to PyPI (requires credentials)
$(PYTHON) -m twine upload dist/*
# Default target
.DEFAULT_GOAL := help