From 19416a8d84d89dbfacd53a3c61071c5930efd0c6 Mon Sep 17 00:00:00 2001 From: Zoubaolian <82649822+sally-baolian@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:48:58 +0800 Subject: [PATCH 1/3] Update speech-services-quotas-and-limits.md --- .../speech-service/speech-services-quotas-and-limits.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/articles/ai-services/speech-service/speech-services-quotas-and-limits.md b/articles/ai-services/speech-service/speech-services-quotas-and-limits.md index 8af46d9720..a346a8c22d 100644 --- a/articles/ai-services/speech-service/speech-services-quotas-and-limits.md +++ b/articles/ai-services/speech-service/speech-services-quotas-and-limits.md @@ -136,6 +136,10 @@ The limits in this table apply per Speech resource when you create a personal vo | Quota | Free (F0)| Standard (S0) | |-----|-----|-----| | New connections per minute | Not available for F0 | 2 new connections per minute | +| Max connection duration with speaking | Not available for F0 | 10 minutes1 | +| Max connection duration with idle state | Not available for F0 | 5 minutes | + +1 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"). #### Audio Content Creation tool From 63797f3eef9941f88e979f88789dafdb4b4aa84c Mon Sep 17 00:00:00 2001 From: Zoubaolian <82649822+sally-baolian@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:57:39 +0800 Subject: [PATCH 2/3] Update real-time-synthesis-avatar.md --- .../real-time-synthesis-avatar.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md b/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md index 2533bd3055..5062c97def 100644 --- a/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md +++ b/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md @@ -180,6 +180,20 @@ avatarSynthesizer.speakTextAsync(spokenText).then( 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). +## Close the real-time avatar connection + +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: + +- 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. +- If the avatar remains idle for 5 minutes, the connection will be automatically closed by the avatar service. +- You can proactively close the avatar connection by running the following code: + + ```javascript + avatarSynthesizer.close(); + ``` + +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). + ## Edit background 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: From 09238aee75ac8c94167e0cabd0393b0804b6d917 Mon Sep 17 00:00:00 2001 From: Zoubaolian <82649822+sally-baolian@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:08:49 +0800 Subject: [PATCH 3/3] Update real-time-synthesis-avatar.md --- .../text-to-speech-avatar/real-time-synthesis-avatar.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md b/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md index 5062c97def..7066022829 100644 --- a/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md +++ b/articles/ai-services/speech-service/text-to-speech-avatar/real-time-synthesis-avatar.md @@ -189,10 +189,10 @@ To avoid unnecessary costs after you finish using the real-time avatar, it’s i - You can proactively close the avatar connection by running the following code: ```javascript - avatarSynthesizer.close(); + avatarSynthesizer.close() ``` -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). + 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). ## Edit background