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

Segmentation fault (core dumped) #98

Open
JinYuanZhang999 opened this issue Nov 14, 2024 · 0 comments
Open

Segmentation fault (core dumped) #98

JinYuanZhang999 opened this issue Nov 14, 2024 · 0 comments

Comments

@JinYuanZhang999
Copy link

I was able to run the programmatic code normally before, but now it throws an error. Below are my running code and the error message:

code:

import dac
from audiotools import AudioSignal
import time
import torch

model_path = dac.utils.download(model_type="24khz")

start_time1=time.time()

model = dac.DAC.load(model_path)

model.to('cuda')

signal = AudioSignal('Encodec_sample.wav')

start_time = time.time()

signal.to(model.device)

x = model.preprocess(signal.audio_data, signal.sample_rate)
z, codes, latents, _, _ = model.encode(x)

end_time = time.time()
print(f"编码过程耗时: {end_time - start_time} 秒")

start_time = time.time()

y = model.decode(z)

end_time = time.time()
print(f"解码过程耗时: {end_time - start_time} 秒")

output_signal = AudioSignal(y.detach().cpu(), sample_rate=signal.sample_rate)

output_signal.write('output.wav')

The error message is as follows in the image:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant