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
These parameters are part of the `Smallest` instance. They can be set when creating the instance (as shown above). However, the `synthesize` function also accepts kwargs, allowing you to override these parameters for a specific synthesis request.
81
+
82
+
For example, you can modify the speech speed and sample rate just for a particular synthesis call:
83
+
```py
84
+
client.synthesize(
85
+
"Hello, this is a test for sync synthesis function.",
86
+
save_as="sync_synthesize.wav",
87
+
speed=1.5, # Overrides default speed
88
+
sample_rate=16000# Overrides default sample rate
89
+
)
90
+
```
91
+
79
92
80
93
### Async
81
94
Asynchronous text-to-speech synthesis client.
@@ -107,7 +120,18 @@ if __name__ == "__main__":
107
120
-`speed`: Speech speed multiplier (default: 1.0)
108
121
-`add_wav_header`: Include WAV header in output (default: True)
109
122
-`transliterate`: Enable text transliteration (default: False)
These parameters are part of the `AsyncSmallest` instance. They can be set when creating the instance (as shown above). However, the `synthesize` function also accepts kwargs, allowing you to override any of these parameters on a per-request basis.
126
+
127
+
For example, you can modify the speech speed and sample rate just for a particular synthesis request:
128
+
```py
129
+
audio_bytes =await tts.synthesize(
130
+
"Hello, this is a test of the async synthesis function.",
0 commit comments