Skip to content

Directory not automatically created & index.json missingΒ #9

@ArrowM

Description

@ArrowM

First of all, thank you for you work on this project! I am attempting to run this with Docker + WSL2. I'm getting some parts to work, but having issues with others. I'll document everything here.

EDIT

I'll leave my issue descriptions below, but I've figured out some fixes for them that I'll put here above. I'm pretty confused because the code in Docker's version of the files doesn't seem to match this repo, otherwise I'd make a PR.

Fixing # 2

/app/dswav/__main__.py:23
add

    if not os.path.exists(f"{config.project_path}/ds/wavs"):
        os.mkdir(f"{config.project_path}/ds/wavs")

This code seems to be in this repo, but missing from the docker code.

Fixing # 3

/app/dswav/ds.py:231
add

        if merge:

It seems like config.merges is populated with [""] by default, so it searches for ./index.json even if you leave the UI box blank. Adding the if statement skips the blank string. There might be a better solution, but this works well enough for me.

Fixing # 1 and # 4

I haven't fixed these, please consider them :)

Issues

1. Input Audio File Path

The way to format that path may not be immediately obvious to Windows users. A tooltip like:

formatted as ./projects/{project_name}/{audio_file}" where you replace project_name and audio_file. Do not use a full path

would be useful.

2. wavs directory not created automatically.

The {project}/ds directory is created automatically, but {project}/ds/wavs is not. As a result, the wav files are never written out and the rest of the process fails. I can make it manually for now, I'm not sure where automatic creation should be added in the code.

3. [Errno 2] No such file or directory: '/index.json'

  File "/app/dswav/__main__.py", line 34, in build_handler
    process(config)
  File "/app/dswav/ds.py", line 203, in process
    merge_sentences = add_merges(config)
                      ^^^^^^^^^^^^^^^^^^
  File "/app/dswav/ds.py", line 231, in add_merges
    with open(f"{merge}/index.json", "r") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/index.json'

This is where I am currently stuck. I'm assuming I need to put something in the last box of the Gradio UI, but even after reading the label "List of paths to folders with contents..." a few times, I still have no idea what I'm supposed to do. I'm hoping you could elaborate on what needs to be done with an index file. If it helps, I'm hoping to use this output formatted for TTS, LJSpeech.

4. Copying results out of the Docker container

It would be nice to automatically write out the result in the same directory as the input audio file. Or to have a CMD arg for a result output path. I'm guessing not everyone will know to look in the docker files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions