You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the win_duration is greater than or equal to the length of audio (audio_signal.signal_duration), then the model fails to decompress the audio when calling model.decompress() . This error appears in only some samples - not sure why. Below is some code to reproduce the error:
fromaudiotoolsimportAudioSignalimportdacfromdatasetsimportload_datasetmodel_type="24khz"model_path=dac.utils.download(model_type=model_type)
model=dac.DAC.load(model_path)
ds=load_dataset("DynamicSuperb/SourceSeparation_libri2Mix_test", split="test")
ds=ds.with_format("torch")
# find the index of the failing casefname="data/test/1089-134686-0008_8230-279154-0012.wav"fori, dinenumerate(ds):
ifd["file"] ==fname:
break# Load audio signala=AudioSignal(ds[i]["audio"]["array"], sample_rate=ds[i]["audio"]["sampling_rate"].item())
# Run modelz=model.compress(a, win_duration=5.0)
synth=model.decompress(z) # <--- Error
This gives the following error and traceback:
Traceback (most recent call last):
File "/home/.idea/dac_codec_fail.py", line 24, in <module>
synth = model.decompress(z) # <--- Error
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/dac/model/base.py", line 289, in decompress
recons.audio_data = recons.audio_data.reshape(
RuntimeError: shape '[-1, 1, 58240]' is invalid for input of size 58234
Please note: setting win_duration=1.0 resolves this issue, but the model is substantially slower.
The text was updated successfully, but these errors were encountered:
Guppy16
changed the title
Model @ 24kbps
Model @ 24kHz : Runtime Error: shape is invalid
Jul 10, 2024
When the
win_duration
is greater than or equal to the length of audio (audio_signal.signal_duration
), then the model fails to decompress the audio when callingmodel.decompress()
. This error appears in only some samples - not sure why. Below is some code to reproduce the error:This gives the following error and traceback:
Please note: setting
win_duration=1.0
resolves this issue, but the model is substantially slower.The text was updated successfully, but these errors were encountered: