HOW CAN WE PROCESS MULTIPLE AUDIOS PARALLELY USING 15GB Nvidia GPU #1996
Unanswered
sudo-tahirsaeed
asked this question in
Q&A
Replies: 2 comments 1 reply
-
your gpu cannot hold more than 1 instance of whisper so no |
Beta Was this translation helpful? Give feedback.
1 reply
-
Use multi-threads |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey is there any way we can process multiple audios parallelly asynchronously with whisper 'large' i have Nvidia GPU 15GB it takes around 9.7GB after loading model but i have large amount of audios so basically i want to process more than one audio at a time so how many roughly i can process if each audio is 3 min large on avg
Is there any way to process longer audio at once eliminating 30s limitation ?
And how can we parallely process multiple audios with python here is my usage example code
audio = whisper.load_audio("/content/audiH.wav")
audio = whisper.pad_or_trim(audio)
mel = whisper.log_mel_spectrogram(audio=audio, n_mels=128).to(model.device)
_, probs = model.detect_language(mel)
print(f"Detected language: {max(probs, key=probs.get)}")
decode the audio
options = whisper.DecodingOptions(language="ur",without_timestamps=True)
result = whisper.decode(model, mel, options)
output=[]
a=''
sentences = result.text.split(' ')
for sentence in sentences:
# if all(char in string for char in (chr(i) for i in range(ord('A'), ord('Z')+1))):
# a=a+" "+sentence
# print(a)
output.append(sentence)
out = ' '.join(output)
output = '\u202B' + out + '\u202C'
print(output)
Beta Was this translation helpful? Give feedback.
All reactions