Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当mp3时长超过3755秒时,就会报错:torch.OutOfMemoryError: CUDA out of memory. #2376

Open
libingbingd opened this issue Feb 8, 2025 · 1 comment
Labels
question Further information is requested

Comments

@libingbingd
Copy link

在调用代码时,当mp3时长超过3755秒时,就会报错:torch.OutOfMemoryError: CUDA out of memory.

代码如下:
def load_model_to_asr(local_path):
model = AutoModel(
model=model_dir,
vad_model=vad_model,
punc_model=punc_model,
spk_model=spk_model,
vad_kwargs={"max_single_segment_time": 30000},
device="cuda:0",
)

# en
res = model.generate(
    #input=f"{model.model_path}/example/en.mp3",
    input=local_path,
    cache={},
    language="auto",  # "zn", "en", "yue", "ja", "ko", "nospeech"
    use_itn=True,
    batch_size_s=6000,
    merge_vad=True,  #
    merge_length_s=1500,
)

请问大佬们如何解决,或者如何使用多GPu;求解答

@libingbingd libingbingd added the question Further information is requested label Feb 8, 2025
@WThirteen
Copy link

如果爆显存,不如把MP3的内容切开?然后再拼接再一起,分开进行语音识别。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants