Remove audio when done

This commit is contained in:
Elizabeth Cray 2024-10-16 09:47:00 -04:00
parent 34b8ffe5d7
commit e8bdc317f5

View File

@ -34,6 +34,9 @@ audio_file = media_convert.process(args.input)
transcription = transcribe.process(audio_file) transcription = transcribe.process(audio_file)
if os.path.isfile(audio_file):
os.remove(audio_file)
if args.save_transcription: if args.save_transcription:
with open(args.save_transcription, 'w') as f: with open(args.save_transcription, 'w') as f:
f.write(transcription) f.write(transcription)