Question about more time is required to transcribe audio file to text

73 views Asked by At

Regarding to above title, I am using whisper module to transcribe audio file to text but more time is taking this process in python.

I am trying to convert audio file to text in minimum time, below is the that I am using

def transcribe_audio(filename): 
        print(filename)
        location =    r"C:\Users\shree\Desktop\projects\Summarization_project\Point_Extraction\media\audio_files"
        file_path = os.path.join(location, filename)
        model = whisper.load_model('tiny')
        result = model.transcribe(file_path, fp16=False)
        text = result['text']
        text = auto_correct_text(text)
        print(text)
        os.remove(file_path)
        print(f"Deleted: {filename}")
        return text
0

There are 0 answers