Python, Data Science, AI, NLP, Programming.
whisper.log_mel_spectrogram(audio).to(model.device) # detect the spoken language _, probs = model.detect_language(mel) detected_lang = max(probs, key=probs.get) # decode the audio options = whisper.DecodingOptions(fp16 = False) result = whisper.decode(model, mel, options) # print the recognized