[object Object][object Object][object Object]undefined
[object Object]
  • Function: Computes the Fourier transform of the input in a sliding window.

  • Formula:

    • When [object Object] is set to [object Object]:

      X[w,m]=k=0winLength1window[k]self[mhopLength+k]exp(j2πwknFft)X[w,m]=\sum_{k=0}^{winLength-1}window[k]*self[m*hopLength+k]*exp(-j*\frac{2{\pi}wk}{nFft})
    • When [object Object] is set to [object Object]:

      X[w,m]=1nFft(k=0winLength1window[k]self[mhopLength+k]exp(j2πwknFft))X[w,m]=\frac{1}{\sqrt{nFft}}(\sum_{k=0}^{winLength-1}window[k]*self[m*hopLength+k]*exp(-j*\frac{2{\pi}wk}{nFft}))

    Where:

    • FFT works on frequency [object Object].
    • [object Object] is the index of the sliding window.
    • [object Object] is a 1D or 2D tensor. When selfself is 1D, there is only one time sequence. When [object Object] is 2D, there are multiple time sequences.
    • [object Object] is the sliding window size.
    • [object Object] is a 1D tensor, which is the window function (for example, hann_window) of STFT. Its length is [object Object].
    • [object Object] is the rotation factor.
[object Object]

Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns:

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter verification. The following errors may be thrown:

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
  • The input [object Object] is different from that of the PyTorch interface. The input [object Object] of the PyTorch interface is the original input, while the input [object Object] of [object Object] is the result after the original input is padded by PyTorch.

  • When the shape of the input self is [B, L], if the calculation result of the following formula is large, the calculation of the current API may time out.

    B((LnFft)/hopLength+1)nFftB * ((L - nFft) / hopLength + 1) * nFft
  • nFft ≤ L

  • winLength ≤ nFft

  • normalized = True:

    STFT(w,m)=1NX[w,m]STFT(w,m)=\frac{1}{\sqrt{N}}X[w,m]
  • The mappings between the input and output data types of [object Object], [object Object], [object Object], and [object Object] are as follows:

    [object Object]undefined
  • Deterministic computing:

    • [object Object] defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]