Skip to content

Commit da6389d

Browse files
Merge pull request #507 from sally-baolian/patch-19
Real-time avatar connection
2 parents 78f1744 + 09238ae commit da6389d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

articles/ai-services/speech-service/speech-services-quotas-and-limits.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ The limits in this table apply per Speech resource when you create a personal vo
136136
| Quota | Free (F0)| Standard (S0) |
137137
|-----|-----|-----|
138138
| New connections per minute | Not available for F0 | 2 new connections per minute |
139+
| Max connection duration with speaking | Not available for F0 | 10 minutes<sup>1</sup> |
140+
| Max connection duration with idle state | Not available for F0 | 5 minutes |
141+
142+
<sup>1</sup> To ensure continuous operation of the real-time avatar for more than 10 minutes, you can enable auto-reconnect. For information about how to set up auto-reconnect, refer to this [sample code](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/js/browser/avatar/README.md) (search "auto reconnect").
139143

140144
#### Audio Content Creation tool
141145

articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,20 @@ avatarSynthesizer.speakTextAsync(spokenText).then(
180180

181181
You can find end-to-end working samples on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/js/browser/avatar).
182182

183+
## Close the real-time avatar connection
184+
185+
To avoid unnecessary costs after you finish using the real-time avatar, it’s important to close the connection. There are several ways to do this:
186+
187+
- When the browser web page is closed, the WebRTC client side peer connection object will be released, and the avatar connection will be automatically closed after a few seconds.
188+
- If the avatar remains idle for 5 minutes, the connection will be automatically closed by the avatar service.
189+
- You can proactively close the avatar connection by running the following code:
190+
191+
```javascript
192+
avatarSynthesizer.close()
193+
```
194+
195+
You can find end-to-end working samples on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/js/browser/avatar).
196+
183197
## Edit background
184198

185199
The avatar real-time synthesis API currently doesn't support setting a background image/video and only supports setting a solid-color background, without transparent background support. However, there's an alternative way to implement background customization on the client side, following these guidelines:

0 commit comments

Comments
 (0)