Skip to content

feat: allow simple filenames for synthesis - #24

Merged
roedoejet merged 5 commits into
mainfrom
dev.ap/synthesis-improvements
Aug 25, 2026
Merged

feat: allow simple filenames for synthesis#24
roedoejet merged 5 commits into
mainfrom
dev.ap/synthesis-improvements

Conversation

@roedoejet

Copy link
Copy Markdown
Member

Comment thread styletts2/cli/synthesize.py Outdated
Comment thread styletts2/cli/synthesize.py Outdated

Or, for batch synthesis from a filelist:

**everyvoice synthesize text-to-wav logs_and_checkpoints/.../stage-2-last.ckpt \\

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This \\ at the end yields something that is not cut-and-pastable as is. But if you use \\ \\ instead, the output has a single \ and then multi-line cut and paste works.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another option that works even better is

    ```
    everyvoice synthesize text-to-wav logs_and_checkpoints/.../stage-2-last.ckpt \\
        --reference path/to/reference.wav  \\
        --text "Hello world" --text "How are you?"
    ```

this gives you something displayed as a code block, preserving indentation (the current solution does not), which is even better.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suppose, though, cut and pasting in this case is a silly concept, maybe never mind. But I might still consider using the code block option for our examples.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yea, I don't think copy/paste is that important here. the code block option formats things a bit weirdly in my terminal, I think I'll leave this as is if that's alright

Comment thread styletts2/cli/synthesize.py
Comment thread styletts2/cli/synthesize.py Outdated
Comment thread styletts2/cli/synthesize.py
@roedoejet
roedoejet requested a review from joanise August 21, 2026 17:17

@joanise joanise left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

# Fix a bug in the ffmpeg installation via awalsh128/cache-apt-pkgs-action
LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/lapack:/usr/lib/x86_64-linux-gnu/blas
steps:
- uses: actions/checkout@v6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The current best practice recommendations are to add

   with:
     persist-credentials: false

every time we use actions/checkout, except for the rare cases where true is required (e.g., a workflow to needs to push to gh-pages), but I see that I have not started making that change anywhere in EV, nor even in Studio. It seems I only did it in g2p so far, so this comment is out-of-scope for this PR, but I wanted to mention it as something that I'll eventually spread everywhere, and is best practice to use when you create a new workflow.

" You can only synthesize using one of these options",
file=sys.stderr,
)
sys.exit(1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, another change that's going to be out of scope for this PR: this should be

        raise typer.BadParameter(
            "Got arguments for both --text and --filelist."
            " You can only synthesize using one of these options"
        )

instead of print and exit.

But I see that we have 39 instances of raise typer.BadParameter(...) and 43 instances of sys.exit(1) in the repo, so I'll make this a separate issue to do systematically: EveryVoiceTTS/EveryVoice#855

@roedoejet
roedoejet force-pushed the dev.ap/synthesis-improvements branch from ab60d37 to c5aa11b Compare August 25, 2026 16:43
@roedoejet
roedoejet merged commit c5aa11b into main Aug 25, 2026
1 of 2 checks passed
@roedoejet
roedoejet deleted the dev.ap/synthesis-improvements branch August 25, 2026 16:43
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