We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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")
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} 秒")
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:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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:
The text was updated successfully, but these errors were encountered: