We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86f04f7 commit 86cdc6bCopy full SHA for 86cdc6b
lightllm/models/whisper/whisper_audio.py
@@ -193,11 +193,10 @@ def encode(self, audio_items: List[AudioItem]):
193
ready_audio = self.cache_client.root.get_items_data(uuids)
194
ids_to_set = []
195
for i, ready in enumerate(ready_audio):
196
- if ready:
197
- continue
198
- uid = uuids[i]
199
- cur_embed_bytes = tensor2bytes(audios[i][: audio_token_num[i]])
200
- create_shm(get_shm_name_data(uid), cur_embed_bytes)
201
- ids_to_set.append(uid)
+ if not ready:
+ uid = uuids[i]
+ cur_embed_bytes = tensor2bytes(audios[i][: audio_token_num[i]])
+ create_shm(get_shm_name_embed(uid), cur_embed_bytes)
+ ids_to_set.append(uid)
202
if ids_to_set:
203
self.cache_client.root.set_items_data(ids=ids_to_set)
0 commit comments