videotomp3transcriptor/scripts/transcribe.sh
StillHammer 849412c3bd Initial commit: Video to MP3 Transcriptor
- YouTube video/playlist download as MP3 (yt-dlp)
- Audio transcription with OpenAI (gpt-4o-transcribe, whisper-1)
- Translation with GPT-4o-mini (chunking for long texts)
- Web interface with progress bars and drag & drop
- CLI and REST API interfaces
- Linux shell scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:40:23 +08:00

33 lines
847 B
Bash

#!/bin/bash
# Transcribe an audio file
# Usage: ./transcribe.sh <file> [language] [model]
cd "$(dirname "$0")/.."
FILE="$1"
LANGUAGE="${2:-}"
MODEL="${3:-gpt-4o-transcribe}"
if [ -z "$FILE" ]; then
echo "Usage: ./transcribe.sh <audio_file> [language] [model]"
echo ""
echo "Languages: en, fr, es, de, it, pt, zh, ja, ko, ru, etc."
echo "Models: gpt-4o-transcribe (default), gpt-4o-mini-transcribe, whisper-1"
echo ""
echo "Examples:"
echo " ./transcribe.sh ./output/video.mp3"
echo " ./transcribe.sh ./output/video.mp3 fr"
echo " ./transcribe.sh ./output/video.mp3 en gpt-4o-mini-transcribe"
exit 1
fi
ARGS="$FILE"
if [ -n "$LANGUAGE" ]; then
ARGS="$ARGS -l $LANGUAGE"
fi
if [ -n "$MODEL" ] && [ "$MODEL" != "gpt-4o-transcribe" ]; then
ARGS="$ARGS -m $MODEL"
fi
npm run cli transcribe $ARGS