Transcription fails with AttributeError
when attempting to transcribe a torch array
#930
Answered
by
jongwook
MrEnigmamgine
asked this question in
Q&A
-
Hi. To save on memory I'm trying to transcribe only short segments at a time. However, whenever I feed a torch array into the transcribe function the process errors out with the following error:
Here is the code I'm using to reproduce the error:
|
Beta Was this translation helpful? Give feedback.
Answered by
jongwook
Feb 6, 2023
Replies: 1 comment
-
Hi, I think the model is treating each channel separately and running a batch inference, hence returning a list instead of a I'd recommend using |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jongwook
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I think the model is treating each channel separately and running a batch inference, hence returning a list instead of a
DecodingResult
instance.I'd recommend using
whisper.audio.load_audio()
function, which takes care of converting the sampling rate to 16,000Hz, as expected by the model.