Skip to content

Nemo ASR: AttributeError: np.sctypes was removed in the NumPy 2.0 release. Access dtypes explicitly instead. #14745

@conceptofmind

Description

@conceptofmind

Describe the bug

Nemo ASR requires numpy<2.0:

AttributeError: `np.sctypes` was removed in the NumPy 2.0 release. Access dtypes explicitly instead.

This breaks python 3.13 environments as well as numerous incompatibilities with other packages.

Steps/Code to reproduce bug

uv add -U nemo_toolkit['asr']

    class NemoTranscriptionUDF:
        def __init__(
            self,
            model_name: str = model_name,
            batch_size: int = batch_size,
            device: str = "cuda",
        ):
            from nemo.collections.asr.models import ASRModel

            self.asr_ast_model = ASRModel.from_pretrained(
                model_name=model_name
            )

            self.device = device
            self.batch_size = batch_size

        def __call__(self, audios):
            with torch.inference_mode():
                outputs = self.asr_ast_model.transcribe(audios.to_pylist(), batch_size=self.batch_size)
            return [output[0].text for output in outputs]

Expected behavior
Transcribe content and do not need to have older numpy versions.

Thanks,

Enrico

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions