Speech-focused STFT surface used by voice models in this repo. It assumes real float input and returns one-sided complex or magnitude output.
| 35 | // Speech-focused STFT surface used by voice models in this repo. |
| 36 | // It assumes real float input and returns one-sided complex or magnitude output. |
| 37 | class STFT { |
| 38 | public: |
| 39 | AudioTensor compute_magnitude( |
| 40 | const std::vector<float> & waveform, |
| 41 | const std::vector<float> & window, |
| 42 | int64_t batch, |
| 43 | int64_t samples, |
| 44 | const STFTConfig & config, |
| 45 | size_t threads = 0) const; |
| 46 | |
| 47 | AudioTensor compute_complex( |
| 48 | const std::vector<float> & waveform, |
| 49 | const std::vector<float> & window, |
| 50 | int64_t batch, |
| 51 | int64_t samples, |
| 52 | const STFTConfig & config, |
| 53 | size_t threads = 0) const; |
| 54 | }; |
| 55 | |
| 56 | class ISTFT { |
| 57 | public: |
no outgoing calls