Transcription model override

This commit is contained in:
Elizabeth Cray
2024-10-16 09:52:53 -04:00
parent e8bdc317f5
commit 659cf3728a
2 changed files with 6 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ parser.add_argument('--output', type=str, help='Path to the output file, will no
parser.add_argument('--save-transcription', type=str, help='Path to save the transcription to')
parser.add_argument('--skip-summary', action='store_true', help='Do not summarize')
parser.add_argument('--force', action='store_true', help='Overwrite existing output file without asking')
parser.add_argument('--transcription-model', type=str, help='Override the default model used for transcription (Defaults to openai/whisper-large-v3)')
args = parser.parse_args()
if not args.input:
@@ -32,7 +33,8 @@ if args.save_transcription:
audio_file = media_convert.process(args.input)
transcription = transcribe.process(audio_file)
model = args.transcription_model or "openai/whisper-large-v3"
transcription = transcribe.process(audio_file, model)
if os.path.isfile(audio_file):
os.remove(audio_file)