<p dir="auto">As far as I understand, for the time being STFT <a href="https://github.com/onnx/onnx/blob/master/docs/Operators.md">isn't natively supported by ONNX</a></p>
<p dir="auto">STFT can be exported as a Conv1d op with precomputed (windowed) Fourier basis: <a href="https://github.com/NVIDIA/mellotron/blob/master/stft.py">https://github.com/NVIDIA/mellotron/blob/master/stft.py</a></p>
<p dir="auto">This is useful for tracking/exporting speech recongition models.</p>
<p dir="auto">I've done a pure PyTorch version in <a href="https://github.com/vadimkantorov/convasr/blob/master/models.py#L315-L334">https://github.com/vadimkantorov/convasr/blob/master/models.py#L315-L334</a> and it seems to work</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/houseroad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/houseroad">@houseroad</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spandantiwari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spandantiwari">@spandantiwari</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lara-hdr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lara-hdr">@lara-hdr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BowenBao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BowenBao">@BowenBao</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/neginraoof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/neginraoof">@neginraoof</a></p>
<p dir="auto">how can i put “torch.stft“ and” torch.istft” function into onnx？</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BowenBao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BowenBao">@BowenBao</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/neginraoof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/neginraoof">@neginraoof</a></p>