Instructions to use jjiang4/acesinger_svs_train_visinger2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ESPnet
How to use jjiang4/acesinger_svs_train_visinger2 with ESPnet:
unknown model type (must be text-to-speech or automatic-speech-recognition)
- Notebooks
- Google Colab
- Kaggle
Download src/inference.py from jjiang4/acesinger_svs_train_visinger2: direct link, hf CLI and curl.
- Browser
- Download file 874 Bytes
-
https://huggingface.co/jjiang4/acesinger_svs_train_visinger2/resolve/main/src/inference.py
- Command line
-
hf download hf://jjiang4/acesinger_svs_train_visinger2/src/inference.py
-
curl -L -o inference.py https://huggingface.co/jjiang4/acesinger_svs_train_visinger2/resolve/main/src/inference.py
874 Bytes
| """Inference output formatting for the ACE-Opencpop SVS recipe.""" | |
| def build_output(data, model_output, idx): | |
| """Turn one ``SingingGenerate`` result into the record the infer stage writes. | |
| ``conf/inference.yaml`` points ``output_fn`` here. ``wav`` is written as a | |
| wav file, while ``text`` and ``ref`` (the recorded singing) go to SCP files | |
| for the measure stage. | |
| Args: | |
| data: Dataset sample built with ``inference: true``. | |
| model_output: ``SingingGenerate`` output, whose ``wav`` is the | |
| synthesized singing. | |
| idx: Index of the sample within its test set (unused). | |
| Returns: | |
| Dict with ``utt_id``, ``text``, ``ref`` and ``wav``. | |
| """ | |
| return { | |
| "utt_id": data["utt_id"], | |
| "text": data["raw_text"], | |
| "ref": data["wav_path"], | |
| "wav": model_output["wav"].cpu().numpy(), | |
| } | |