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
UTMOSv2/utmosv2/dataset/_utils.py", line 8, in load_audio if file.suffix == ".wav": ^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'suffix'
Just a clean Python environment (3.11)
Expected behavior: no error. This works for me to fix it:
def load_audio(cfg, file: str) -> np.ndarray: file = Path(file) if file.suffix == ".wav": y, sr = librosa.load(file, sr=None) y = librosa.resample(y, orig_sr=sr, target_sr=cfg.sr) else: y = np.load(file) return y
No response
The text was updated successfully, but these errors were encountered:
Thank you for reporting the bug. I'll fix it.
Sorry, something went wrong.
file_path
str
Path
Successfully merging a pull request may close this issue.
☑️ Checks
✏️ Description
UTMOSv2/utmosv2/dataset/_utils.py", line 8, in load_audio
if file.suffix == ".wav":
^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'suffix'
Environment
Just a clean Python environment (3.11)
Expected behavior
Expected behavior: no error. This works for me to fix it:
Steps to reproduce
Additional notes
No response
The text was updated successfully, but these errors were encountered: