Repacked as a FastAPI application. api.py is the entry point.
The original README.md is here.
1. Put your checkpoints and config files in the statics directory with specific names.
2. Add them to the
models
varieable (here) with the following format:models = {
"hamidashi": ["hamidashi_604_epochs.pth", "hamidashi_config.json"],
"yuzusoft": ["yuzusoft_365_epochs.pth", "yuzusoft_config.json"],
}
3. Create a subclass of
BaseModel
and its implementation using your models as Hamidashi or Yuzusoft.6. Run the application.
The application will run the sample for audition at startup.
Use
http://localhost:10721
to access the application by default.- /text
text
to synthesize, return the synthesized WAV file directly.http://localhost:10721/让宁宁说こんにちは
->宁宁: こんにちは
The application will use the file that is already existing/synthesized in the output directory as cache.
- /text?local
text
to synthesize, return the local absolute path of synthesized WAV file.http://localhost:10721/让芳乃说こんにちは?local
->./.../filename.wav
Avaliable only when accessed by localhost. Act as
/text
otherwise.
- /text?remote
text
to synthesize, return the remote path snippet of synthesized WAV file.http://localhost:10721/让妃爱说こんにちは?remote
->/output/filename.wav
- /output/filename
filename
that is already synthesized, return the synthesized WAV file directly.Use/text?remote
to get the remote path snippet.http://localhost:10721/output/filename.wav
->妃爱: こんにちは