Code Monkey home page Code Monkey logo

Comments (2)

thequilo avatar thequilo commented on August 15, 2024

Hi!

I agree that the code is a little (too) complex. It was part of a bigger project and had to support complex use-cases there. The hardest part in this code is support for variable-length sequences, which is not required for simple source separation.

To create the JSON file for WSJ0-2mix and WSJ0-3mix data, you can have a look at the files in padertorch/padertorch/contrib/data/wsj0_mix/. In general, the JSON structure has to look like this:

{
    "datasets": {
        "<dataset_name>": {
            "<example_id>": {
                "audio_path": {
                    "observation": "<path/to/observation.wav>",
                    "speech_source": [
                        "path/to/first/speech/source.wav",
                        "path/to/second/speech/source.wav",
                        "... (for three speakers)"
                    ]
                },
            },
            "...": {},
    }
}

To run the training on both two- and three-speaker mixtures, you have to include all datasets in the JSON file (or provide multiple JSON files) and set train_datasets to contain all datasets you want to train on. For WSJ0-2mix, the (simplest) command to run this (after installing padertorch and its dependencies) is

$ python -m padertorch.contrib.examples.source_separation.or_pit.train with database_json=/path/to/the/json(s) trainer.storage_dir=/path/to/store/experiment/checkpoints

This will run the training without fine-tuning (so, it only performs one iteration). If you want to perform fine-tuning, you can run

python -m padertorch.contrib.examples.source_separation.or_pit.train with database_json=/path/to/the/json(s) trainer.storage_dir=/path/to/store/experiment/checkpoints trainer.model.finetune=True load_model_from=/path/to/the/pre-trained/model

I hope this helps. Let me know if you have any troubles

from padertorch.

hangtingchen avatar hangtingchen commented on August 15, 2024

Thanks a lot. We can run this!

from padertorch.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.