Skip to content

Commit dc3b086

Browse files
Deep-unlearningWauplinVaibhavs10
authored
add vui code snippet (#1522)
Waiting for this PR to be merged: https://huggingface.co/fluxions/vui/discussions/1/files --------- Co-authored-by: Lucain <[email protected]> Co-authored-by: vb <[email protected]>
1 parent 44ed927 commit dc3b086

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,24 @@ export const voicecraft = (model: ModelData): string[] => [
13541354
model = VoiceCraft.from_pretrained("${model.id}")`,
13551355
];
13561356

1357+
export const vui = (model: ModelData): string[] => [
1358+
`# !pip install git+https://github.com/fluxions-ai/vui
1359+
1360+
import torchaudio
1361+
1362+
from vui.inference import render
1363+
from vui.model import Vui,
1364+
1365+
model = Vui.from_pretrained().cuda()
1366+
waveform = render(
1367+
model,
1368+
"Hey, here is some random stuff, usually something quite long as the shorter the text the less likely the model can cope!",
1369+
)
1370+
print(waveform.shape)
1371+
torchaudio.save("out.opus", waveform[0], 22050)
1372+
`,
1373+
];
1374+
13571375
export const chattts = (): string[] => [
13581376
`import ChatTTS
13591377
import torchaudio

packages/tasks/src/model-libraries.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
10631063
docsUrl: "https://github.com/jasonppy/VoiceCraft",
10641064
snippets: snippets.voicecraft,
10651065
},
1066+
vui: {
1067+
prettyLabel: "Vui",
1068+
repoName: "Vui",
1069+
repoUrl: "https://github.com/vui-ai/vui",
1070+
countDownloads: `path_extension:"pt"`,
1071+
snippets: snippets.vui,
1072+
},
10661073
wham: {
10671074
prettyLabel: "WHAM",
10681075
repoName: "wham",

0 commit comments

Comments
 (0)