Skip to content

Commit dc38c43

Browse files
add supertonic library (#1876)
~~Waiting for this pr to be merged~~ it is merged: https://huggingface.co/Supertone/supertonic/discussions/16 --------- Co-authored-by: Lucain <[email protected]>
1 parent ee822fc commit dc38c43

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,19 @@ from models.birefnet import BiRefNet
19611961
model = BiRefNet.from_pretrained("${model.id}")`,
19621962
];
19631963

1964+
export const supertonic = (model: ModelData): string[] => [
1965+
`from supertonic import TTS
1966+
1967+
tts = TTS(auto_download=True)
1968+
1969+
style = tts.get_voice_style(voice_name="M1")
1970+
1971+
text = "The train delay was announced at 4:45 PM on Wed, Apr 3, 2024 due to track maintenance."
1972+
wav, duration = tts.synthesize(text, voice_style=style)
1973+
1974+
tts.save_audio(wav, "output.wav")`,
1975+
];
1976+
19641977
export const swarmformer = (model: ModelData): string[] => [
19651978
`from swarmformer import SwarmFormerModel
19661979

packages/tasks/src/model-libraries.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
11691169
filter: true,
11701170
countDownloads: `path:"models/default.zip"`,
11711171
},
1172+
supertonic: {
1173+
prettyLabel: "Supertonic",
1174+
repoName: "Supertonic",
1175+
repoUrl: "https://github.com/supertone-inc/supertonic",
1176+
snippets: snippets.supertonic,
1177+
filter: false,
1178+
},
11721179
swarmformer: {
11731180
prettyLabel: "SwarmFormer",
11741181
repoName: "SwarmFormer",

0 commit comments

Comments
 (0)