diff --git a/notebooks/00_GettingStarted.ipynb b/notebooks/00_GettingStarted.ipynb index 813b7e8e1..b0d674763 100644 --- a/notebooks/00_GettingStarted.ipynb +++ b/notebooks/00_GettingStarted.ipynb @@ -1248,8 +1248,11 @@ "model = BaseModel.from_pretrained(\"mpariente/DPRNNTasNet-ks2_WHAM_sepclean\")\n", "\n", "# You can pass a NumPy array:\n", - "mixture, _ = sf.read(\"female-female-mixture.wav\", dtype=\"float32\")\n", - "model.separate(mixture)\n", + "mixture, _ = sf.read(\"female-female-mixture.wav\", dtype=\"float32\", always_2d=True)\n", + "# Soundfile returns the mixture as shape (time, channels), and Asteroid expects (batch, channels, time)\n", + "mixture = mixture.transpose()\n", + "mixture = mixture.reshape(1, mixture.shape[0], mixture.shape[1])\n", + "out_wavs = model.separate(mixture)\n", "\n", "# Or simply a file name:\n", "model.separate(\"female-female-mixture.wav\")"