Skip to content

streaming_demo.py crashes with shape mismatch #4

@cobalamin

Description

@cobalamin

Hi there! Thank you for providing code and checkpoints for your work, especially the streaming implementation :)

Unfortunately at the moment the streaming_demo.py is not working on my machine. It runs into the following error immediately when running the recommended command PYTHONPATH=./ python src/examples/streaming_demo.py:

An unexpected error occurred: The size of tensor a (295) must match the size of tensor b (63) at non-singleton dimension 1
Traceback (most recent call last):
  File "/export/home/.../CleanUMamba/src/examples/streaming_demo.py", line 135, in <module>
    model_output = model.feed(tensor_chunk)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/export/home/.../CleanUMambaEnv/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/export/home/.../src/network/CleanUMamba.py", line 403, in feed
    out = self._denoise_frame(frame)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/export/home/.../src/network/CleanUMamba.py", line 477, in _denoise_frame
    x += skip_i[..., :x.shape[-1]]
RuntimeError: The size of tensor a (295) must match the size of tensor b (63) at non-singleton dimension 1

I did not modify the script or any parameters, keeping everything default. Might there a a configuration mismatch between the default checkpoint and the chunksize values etc. configured in the script, causing this shape mismatch? I don't get any error from PyAudio, so I'm assuming that it is accepting the sampling rate of 16000 Hz for my local soundcard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions