You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-5Lines changed: 39 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,20 +15,54 @@ uv pip install voicehub
15
15
16
16
## 📚 Usage
17
17
18
+
VoiceHub provides a simple, unified interface for working with various Text-to-Speech (TTS) models. Below are examples showing how to use different supported TTS models with the same consistent approach.
19
+
20
+
### OrpheusTTS Model
21
+
18
22
```python
19
23
from voicehub.automodel import AutoInferenceModel
20
24
21
-
# Create model using the static from_pretrained method
22
25
model = AutoInferenceModel.from_pretrained(
23
26
model_type="orpheustts", # or "dia" or "vui"
24
27
model_path="canopylabs/orpheus-3b-0.1-ft",
25
28
device="cuda",
26
29
)
27
30
28
-
# Generate speech with the model
31
+
output = model("Hello, how are you today?", voice="tara", output_file="output.wav")
32
+
```
33
+
34
+
### DiaTTS Model
35
+
36
+
```python
37
+
from voicehub.automodel import AutoInferenceModel
38
+
39
+
model = AutoInferenceModel.from_pretrained(
40
+
model_type="dia", # or "dia" or "vui"
41
+
model_path="dia/dia-100m-base.pt",
42
+
device="cuda",
43
+
)
44
+
29
45
output = model(
30
-
"Hello, how are you today?", voice="tara", output_file="output"
31
-
) # voice param is only for orpheustts
46
+
text="Hey, here is some random stuff, the text the less likely the model can cope!",
47
+
output_file="output.wav",
48
+
)
49
+
```
50
+
51
+
### VuiTTS Model
52
+
53
+
```python
54
+
from voicehub.automodel import AutoInferenceModel
55
+
56
+
model = AutoInferenceModel.from_pretrained(
57
+
model_type="vui", # or "dia" or "vui"
58
+
model_path="vui-100m-base.pt",
59
+
device="cuda",
60
+
)
61
+
62
+
output = model(
63
+
text="Hey, here is some random stuff, the text the less likely the model can cope!",
0 commit comments