c47089aa0d
- Add support for WAV files with automatic conversion to MP3 - Save converted MP3 files in the same directory as WAV files - Reuse existing MP3 files if already converted - Update documentation and requirements
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
# Command-line interface for mknotes
|
|
|
|
import argparse
|
|
|
|
def parse_args():
|
|
parser = argparse.ArgumentParser(
|
|
description="Transcribe audio files and enhance notes using GPT-4.1"
|
|
)
|
|
parser.add_argument(
|
|
"--input-dir",
|
|
type=str,
|
|
required=True,
|
|
help="Directory containing audio files (.mp3, .m4a, .wav)"
|
|
)
|
|
parser.add_argument(
|
|
"--output-dir",
|
|
type=str,
|
|
default="output",
|
|
help="Directory to save output files (default: output)"
|
|
)
|
|
parser.add_argument(
|
|
"--model-size",
|
|
type=str,
|
|
default="medium",
|
|
choices=["tiny", "base", "small", "medium", "large"],
|
|
help="Faster Whisper model size (default: medium)"
|
|
)
|
|
parser.add_argument(
|
|
"--turbo",
|
|
action="store_true",
|
|
help="Enable turbo mode for faster inference (uses int8_float16 compute type)"
|
|
)
|
|
parser.add_argument(
|
|
"--force",
|
|
action="store_true",
|
|
help="Force re-processing of files even if output files already exist"
|
|
)
|
|
return parser.parse_args()
|