[Feature][Relax][ONNX] Support STFT (Short-Time Fourier Transform) operator in Relax ONNX frontend

Đang mở
#20,966 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
machine-learning

Hướng nghiên cứu

Start with python/tvm/relax/frontend/onnx/onnx_frontend.py and the ONNX opset 17 STFT specification in the issue. Check how the frontend handles the related DFT operator and how its tests cover ONNX imports. Done means STFT models import successfully with framing, optional windowing, and the expected real and imaginary output shape.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Feature Description

Support the ONNX STFT (Short-Time Fourier Transform) operator in the Apache TVM Relax ONNX frontend (python/tvm/relax/frontend/onnx/onnx_frontend.py).

Motivation

In ONNX opset 17, DFT and STFT were introduced as the standard Fourier transform operators for audio and signal processing pipelines. While DFT support is being added, STFT is currently missing in the Relax ONNX frontend.

STFT is widely used in speech recognition, audio processing, and generative audio pipelines (such as Whisper, EnCodec, AudioLDM), which segment raw waveforms into overlapping windowed frames and compute discrete Fourier transforms. Importing ONNX models containing STFT fails with:

NotImplementedError: The following operators are not supported: ['STFT']

This operator was also highlighted in the ONNX operator coverage RFC tracking issue #20124 under Signal Processing operators.

Operator Specification (ONNX Opset 17+)
  • Inputs:
    1. signal: Input tensor of shape (batch, signal_length) or (batch, signal_length, 1) or (batch, signal_length, 2) (for complex audio signal).
    2. frame_step: Scalar integer representing the hop size between consecutive frames.
    3. window (optional): 1-D window tensor (e.g. Hann, Hamming) of length frame_length.
    4. frame_length (optional): Scalar integer representing the length of each frame (defaults to window length if window is provided).
  • Attributes:
    • onesided: int (default 1) - whether to return half spectrum for real signals.
  • Outputs:
    1. output: 4-D tensor of shape (batch, frames, dft_unique_bins, 2) representing real and imaginary frequency components.
Expected Behavior

The Relax ONNX frontend should implement STFT by framing the input signal (sliding window with frame_step and frame_length), applying the window function if provided, and computing discrete Fourier transforms across frames.

Ngôn ngữ chính
Python
Star
13.9k
Fork
4.1k
Merge trung bình
4 ngày 22 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/tvm

Tất cả issue của apache/tvm

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.