File size: 456 Bytes
45b9636
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""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)