Skip to content

mx.concat/mx.concatenate incompatible with MLX 0.30.6 (axis keyword arg rejected) #49

Description

@JarodTan01

Description

With parakeet-mlx==0.5.0 and mlx==0.30.6, streaming transcription via transcribe_stream() / add_audio() fails immediately with a TypeError from MLX's concat/concatenate functions.

Error

TypeError: concat(): incompatible function arguments. The following argument types are supported:
    1. concat(arrays: list[array], axis: Optional[int] = 0, *, stream: Union[None, Stream, Device] = None) -> array

Invoked with types: list, kwargs = { axis: int }

Root Cause

Two issues:

  1. mx.concat is removed/broken in MLX 0.30.6 — should use mx.concatenate instead. Affected files:

    • parakeet.py:1004mx.concat([self.audio_buffer, audio], axis=0)
    • parakeet.py:1025mx.concat([self.mel_buffer, mel], axis=1)
    • audio.py:146mx.concat([x[:1], ...], axis=0)
    • conformer.py:293mx.concat([...])
  2. axis cannot be passed as a keyword argument in MLX 0.30.6's pybind11 bindings — it must be positional. All calls like mx.concatenate([...], axis=N) need to become mx.concatenate([...], N). Affected files:

    • cache.py — multiple occurrences with axis=1 and axis=2

Additionally, add_audio() in parakeet.py receives numpy arrays from audio capture, but mx.concatenate can't handle mixed np.ndarray / mx.array lists. Adding if not isinstance(audio, mx.array): audio = mx.array(audio) before the concatenate call fixes this.

Environment

  • macOS 15 (Apple Silicon)
  • Python 3.14.0
  • mlx==0.30.6
  • parakeet-mlx==0.5.0

Workaround

Replace all mx.concatmx.concatenate, change axis=N keyword args to positional N, and convert numpy input to mx.array in add_audio().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions