Skip to content

Batch process: one GPU, but need to generate multiple voice files at once #1123

Open
@WinfredHuang

Description

@WinfredHuang

Checks

  • This template is only for usage issues encountered.
  • I have thoroughly reviewed the project documentation but couldn't find information to solve my problem.
  • I have searched for existing issues, including closed ones, and couldn't find a solution.
  • I am using English to submit this issue to facilitate community communication.

Environment Details

Windows 11, Python 3.10, Torch 2.7.1, CUDA 12.8

Steps to Reproduce

English Version

I have deployed the repo and successfully inferred for one output. I need to know how to generate multiple files with one reference audio, because for now, the program needs to load the model every time it starts to generate one file, and that wastes time.

For instance, it could be a YAML, TOML or any formatted text indicating the reference audio, the multiple sentences to be generated and their respective file name. Then, the program will read the model and the reference audio once, but then infer multiple times to produce multiple audio files.

I know the program can cut long sentences into chunks, so it could also be modifying the code, so that the program won't concatenate generated audio clips together. But it's just a workaround, not a real solution, plus I'm unfamiliar with Python.

I need the solution to be implemented using CLI rather than Gradio, because Gradio is not working on my machine.

Chinese Version

我已经可以通过一次推理生成一段语音,但我需要知道如何用一段参考音频,一次性生成多条语音,以节省载入模型的时间。
例如,可以使用任何标记语言写一个文本文件,指明参考音频、需要生成的语句,以及每一条语句对应的文件名。这样,程序只需要载入模型一次,然后通过多次推理批量生成语音。
我也知道现在的程序可以将长句子切分,这样只要修改代码,让程序不连接音频片段即可。但这只是绕过问题,而且我不熟悉Python。
我需要命令行下的解决方案,因为Gradio在我的机器上不工作。

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions