Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,29 @@ export const voicecraft = (model: ModelData): string[] => [
model = VoiceCraft.from_pretrained("${model.id}")`,
];

export const voxcpm = (model: ModelData): string[] => [
`import soundfile as sf
from voxcpm import VoxCPM

model = VoxCPM.from_pretrained("${model.id}")

wav = model.generate(
text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.",
prompt_wav_path=None, # optional: path to a prompt speech for voice cloning
prompt_text=None, # optional: reference text
cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse
inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed
normalize=True, # enable external TN tool
denoise=True, # enable external Denoise tool
retry_badcase=True, # enable retrying mode for some bad cases (unstoppable)
retry_badcase_max_times=3, # maximum retrying times
retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech
)

sf.write("output.wav", wav, 16000)
print("saved: output.wav")`,
];

export const vui = (): string[] => [
`# !pip install git+https://github.com/fluxions-ai/vui

Expand Down
7 changes: 7 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
docsUrl: "https://github.com/jasonppy/VoiceCraft",
snippets: snippets.voicecraft,
},
voxcpm: {
prettyLabel: "VoxCPM",
repoName: "VoxCPM",
repoUrl: "https://github.com/OpenBMB/VoxCPM",
snippets: snippets.voxcpm,
filter: false,
},
vui: {
prettyLabel: "Vui",
repoName: "Vui",
Expand Down
Loading