mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Added stft and istft in the header
This commit is contained in:
@@ -464,8 +464,8 @@ void init_fft(nb::module_& parent_module) {
|
||||
"stft",
|
||||
[](const mx::array& x,
|
||||
int n_fft = 2048,
|
||||
int hop_length = -1,
|
||||
int win_length = -1,
|
||||
std::optional<int> hop_length = std::nullopt,
|
||||
std::optional<int> win_length = std::nullopt,
|
||||
const mx::array& window = mx::array(),
|
||||
bool center = true,
|
||||
const std::string& pad_mode = "reflect",
|
||||
@@ -486,8 +486,8 @@ void init_fft(nb::module_& parent_module) {
|
||||
},
|
||||
"x"_a,
|
||||
"n_fft"_a = 2048,
|
||||
"hop_length"_a = -1,
|
||||
"win_length"_a = -1,
|
||||
"hop_length"_a = nb::none(),
|
||||
"win_length"_a = nb::none(),
|
||||
"window"_a = mx::array(),
|
||||
"center"_a = true,
|
||||
"pad_mode"_a = "reflect",
|
||||
@@ -515,8 +515,8 @@ void init_fft(nb::module_& parent_module) {
|
||||
m.def(
|
||||
"istft",
|
||||
[](const mx::array& stft_matrix,
|
||||
int hop_length = -1,
|
||||
int win_length = -1,
|
||||
std::optional<int> hop_length = std::nullopt,
|
||||
std::optional<int> win_length = std::nullopt,
|
||||
const mx::array& window = mx::array(),
|
||||
bool center = true,
|
||||
int length = -1,
|
||||
@@ -533,8 +533,8 @@ void init_fft(nb::module_& parent_module) {
|
||||
s);
|
||||
},
|
||||
"stft_matrix"_a,
|
||||
"hop_length"_a = -1,
|
||||
"win_length"_a = -1,
|
||||
"hop_length"_a = nb::none(),
|
||||
"win_length"_a = nb::none(),
|
||||
"window"_a = mx::array(),
|
||||
"center"_a = true,
|
||||
"length"_a = -1,
|
||||
|
||||
Reference in New Issue
Block a user