Skip to content

Add sepreformer example#5472

Open
samanklesaria wants to merge 1 commit into
google:mainfrom
samanklesaria:audio_example
Open

Add sepreformer example#5472
samanklesaria wants to merge 1 commit into
google:mainfrom
samanklesaria:audio_example

Conversation

@samanklesaria
Copy link
Copy Markdown
Collaborator

This PR adds a guide showing how to use NNX for an audio task (source separation). Examples of the audio files are embedded in the notebook, as myst-nb makes it difficult to copy static files to the html build dir.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@samanklesaria samanklesaria requested a review from vfdev-5 May 26, 2026 16:29
@samanklesaria samanklesaria force-pushed the audio_example branch 2 times, most recently from 008ac2a to 45e1324 Compare May 26, 2026 21:04
Comment thread docs_nnx/guides/audio.md

# Building a Choral Source Separator with SepReformer in JAX

This tutorial demonstrates how to perform audio source separation using the `SepReformer`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put a link to SepReformer paper/project/code

Comment thread docs_nnx/guides/audio.md
# Building a Choral Source Separator with SepReformer in JAX

This tutorial demonstrates how to perform audio source separation using the `SepReformer`
architecture. We'll use `flax.nnx` for the neural network, with `beartype` for runtime type checking.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using any 3rd party packages, please put a line on how to install them.

Comment thread docs_nnx/guides/audio.md
def __len__(self) -> int:
return len(self.songs)

dataset = JaCappellaDataset("/space/samanklesaria/data/jacappella")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, we can use some temporary folder instead of your specific folder, e.g. /tmp/data/jacappella?

Comment thread docs_nnx/guides/audio.md
if epoch % 20 == 0:
log_audio_samples(model, loader, writer, epoch)
writer.close()
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a conclusion section to recap the tutorial, otherwise it ends a bit weirdly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants