Commit aa197e1
Make the TTS voices type exportable (#577)
When using the voice agent in typed code, it is suboptimal and error
prone to type the TTS voice variables in your code independently.
With this commit we are making the type exportable so that developers
can just use that and be future-proof.
Example of usage in code:
```
DEFAULT_TTS_VOICE: TTSModelSettings.TTSVoice = "alloy"
...
tts_voice: TTSModelSettings.TTSVoice = DEFAULT_TTS_VOICE
...
output = await VoicePipeline(
workflow=workflow,
config=VoicePipelineConfig(
tts_settings=TTSModelSettings(
buffer_size=512,
transform_data=transform_data,
voice=tts_voice,
instructions=tts_instructions,
))
).run(audio_input)
```
---------
Co-authored-by: Rohan Mehta <[email protected]>1 parent 8fd7773 commit aa197e1
2 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
0 commit comments