Skip to content

Commit 970b1d4

Browse files
add vui code snippet
1 parent 2413423 commit 970b1d4

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,22 @@ export const voicecraft = (model: ModelData): string[] => [
13321332
model = VoiceCraft.from_pretrained("${model.id}")`,
13331333
];
13341334

1335+
export const vui = (model: ModelData): string[] => [
1336+
`import torchaudio
1337+
1338+
from vui.inference import render
1339+
from vui.model import Vui,
1340+
1341+
model = Vui.from_pretrained().cuda()
1342+
waveform = render(
1343+
model,
1344+
"Hey, here is some random stuff, usually something quite long as the shorter the text the less likely the model can cope!",
1345+
)
1346+
print(waveform.shape)
1347+
torchaudio.save("out.opus", waveform[0], 22050)
1348+
`,
1349+
];
1350+
13351351
export const chattts = (): string[] => [
13361352
`import ChatTTS
13371353
import torchaudio

packages/tasks/src/model-libraries.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
10221022
docsUrl: "https://github.com/jasonppy/VoiceCraft",
10231023
snippets: snippets.voicecraft,
10241024
},
1025+
vui: {
1026+
prettyLabel: "VUI",
1027+
repoName: "VUI",
1028+
repoUrl: "https://github.com/vui-ai/vui",
1029+
countDownloads: `path_extension:"pt"`,
1030+
snippets: snippets.vui,
1031+
},
10251032
wham: {
10261033
prettyLabel: "WHAM",
10271034
repoName: "wham",

0 commit comments

Comments
 (0)