facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
29.75k stars 6.3k forks source link

Imports in meta-mms example notebooks need to be updated: np.complex --> complex #5505

Open kaizengrowth opened 2 weeks ago

kaizengrowth commented 2 weeks ago

🐛 Bug

Example notebooks for meta-mms on Google CoLab fail to import the data_utils library required for loading text to audio.

To Reproduce

Run cell 3. "Load the checkpoint`

Error message given:

AttributeError: module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
The aliases was originally deprecated in NumPy 1.20;

Code sample

from data_utils import TextAudioLoader, TextAudioCollate, TextAudioSpeakerLoader, TextAudioSpeakerCollate

Expected behavior

Usage of np.complex inside of data_utils need to be updated to complex or np.complex128 so that this library can be successfully imported.

Environment

Google CoLab notebook