Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to inference to all voice files in the directory #129

Closed
kdrkdrkdr opened this issue Mar 26, 2023 · 1 comment · Fixed by #582
Closed

How to inference to all voice files in the directory #129

kdrkdrkdr opened this issue Mar 26, 2023 · 1 comment · Fixed by #582
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@kdrkdrkdr
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Additional context
Add any other context about the problem here.

"svc infer" This command can only be one file at a time. Is there a way to infer to multiple files at once?

@kdrkdrkdr kdrkdrkdr added the bug Something isn't working label Mar 26, 2023
@Satisfy256
Copy link

Satisfy256 commented Mar 26, 2023

If you know a bit of python, you can run a script like this and edit the variables inside the script.


import os
import subprocess

directory = 'D:/testfiles/wavs'
modelpath = 'D:/testfiles/logs/44k/G_12345.pth'
configpath = 'D:/testfiles/configs/44k/config.json'

for filename in os.listdir(directory):
    f = os.path.join(directory, filename)
    if os.path.isfile(f):
        subprocess.run([
        "svc",
        "infer",
        "-m", f"{modelpath}",
        "-c", f"{configpath}",
        f"{f}"
        ])

@34j 34j added enhancement New feature or request question Further information is requested and removed bug Something isn't working labels Apr 1, 2023
@GarrettConway GarrettConway self-assigned this May 1, 2023
@34j 34j closed this as completed in #582 May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants