ClipQuery / transcription_tool.py
maguid28's picture
initial commit
45b9636
raw
history blame
456 Bytes
"""CLI helper to transcribe a media file and dump JSON of segments.
Example usage:
python transcription_tool.py path/to/audio.mp3 > segments.json
"""
import json, sys
from transcription import run_whisper_transcription
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python transcription_tool.py <media_path>")
sys.exit(1)
segments = run_whisper_transcription(sys.argv[1])
json.dump(segments, sys.stdout)