Skip to content

Commit 11d291c

Browse files
committed
[docs sprint] using synthesizers docs update
1 parent e1f6fbd commit 11d291c

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed

docs/open-source/using-synthesizers.mdx

+31-23
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Vocode currently supports the following synthesizers:
1616
3. Eleven Labs
1717
4. Rime
1818
5. Play.ht
19-
6. Coqui TTS
20-
7. GTTS (Google Text-to-Speech)
21-
8. Stream Elements
22-
9. Bark
19+
6. GTTS (Google Text-to-Speech)
20+
7. Stream Elements
21+
8. Bark
22+
9. Amazon Polly
2323

2424
These synthesizers are defined using their respective configuration classes, which are subclasses of the `SynthesizerConfig` class.
2525

@@ -46,6 +46,33 @@ server = InboundCallServer(
4646
In this example, the `ElevenLabsSynthesizerConfig.from_telephone_output_device()` method is used to create a configuration object for the Eleven Labs synthesizer.
4747
The method hardcodes some values like the `sampling_rate` and `audio_encoding` for compatibility with telephone output devices.
4848

49+
#### ElevenLabs Input Streaming
50+
51+
You can try out our experimental implementation of ElevenLabs' [input streaming API](https://elevenlabs.io/docs/api-reference/websockets) by passing in `experimental_websocket=True` into the config, like:
52+
53+
```
54+
...
55+
synthesizer_config=ElevenLabsSynthesizerConfig.from_telephone_output_device(
56+
api_key=os.getenv("ELEVENLABS_API_KEY"),
57+
voice_id=os.getenv("YOUR VOICE ID"),
58+
experimental_websocket=True
59+
)
60+
...
61+
```
62+
63+
#### Play.ht v2
64+
65+
We now support Play.ht's new [gRPC streaming API](https://docs.play.ht/reference/python-sdk-audio-streaming), which runs much faster than their HTTP API and is designed for realtime communication.
66+
67+
```
68+
...
69+
synthesizer_config=PlayHtSynthesizerConfig.from_telephone_output_device(
70+
api_key=os.getenv("PLAY_HT_API_KEY"),
71+
user_id=os.getenv("PLAY_HT_USER_ID"),
72+
)
73+
...
74+
```
75+
4976
### Example 2: Using Azure in StreamingConversation locally
5077

5178
```python
@@ -67,22 +94,3 @@ conversation = StreamingConversation(
6794

6895
In this example, the `AzureSynthesizerConfig.from_output_device()` method is used to create a configuration object for the Azure synthesizer.
6996
The method takes a `speaker_output` object as an argument, and extracts the `sampling_rate` and `audio_encoding` from the output device.
70-
71-
## When to Use Configs vs. Synthesizer Objects
72-
73-
- For everything except `StreamingConversation`, you must use configuration objects.
74-
- For `StreamingConversation`, you can use the actual synthesizer object, but you still need to initialize it with a configuration object.
75-
76-
## Synthesizer Comparisons
77-
78-
| Provider | Latency | Voice Cloning | Natural Sounding | Notes |
79-
| ----------------- | ------- | ------------- | ---------------- | ----------- |
80-
| Azure (Microsoft) | Low | No | | |
81-
| Google | Low | No | | |
82-
| Eleven Labs | High | Yes | | |
83-
| Rime | Low | No | | |
84-
| Play.ht | High | Yes | | |
85-
| Coqui TTS | | | | Open source |
86-
| GTTS | | | | |
87-
| Stream Elements | | | | |
88-
| Bark | | | | |

0 commit comments

Comments
 (0)