Skip to content

Commit 322627a

Browse files
authored
Merge pull request #267649 from MicrosoftDocs/main
2/29 11:00 AM IST Publish
2 parents 41509d7 + 18938ee commit 322627a

File tree

78 files changed

+725
-810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+725
-810
lines changed

articles/ai-services/immersive-reader/how-to-cache-token.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
title: "Cache the authentication token"
33
titleSuffix: Azure AI services
4-
description: This article will show you how to cache the authentication token.
5-
author: rwallerms
4+
description: Learn how to cache the authentication token in the Immersive Reader app.
5+
author: sharmas
66
manager: nitinme
77

88
ms.service: azure-ai-immersive-reader
99
ms.topic: how-to
10-
ms.date: 01/14/2020
11-
ms.author: rwaller
10+
ms.date: 02/26/2024
11+
ms.author: sharmas
1212
ms.custom: "devx-track-js, devx-track-csharp"
1313
---
1414

1515
# How to cache the authentication token
1616

17-
This article demonstrates how to cache the authentication token in order to improve performance of your application.
17+
This article demonstrates how to cache the authentication token in order to improve the performance of your application.
1818

1919
## Using ASP.NET
2020

21-
Import the **Microsoft.Identity.Client** NuGet package, which is used to acquire a token.
21+
Import the `Microsoft.Identity.Client` NuGet package, which is used to acquire a token. For details, see [Install Identity Client NuGet package](quickstarts/client-libraries.md?pivots=programming-language-csharp#install-identity-client-nuget-package).
2222

2323
Create a confidential client application property.
2424

@@ -42,7 +42,7 @@ private IConfidentialClientApplication ConfidentialClientApplication
4242
Next, use the following code to acquire an `AuthenticationResult`, using the authentication values you got when you [created the Immersive Reader resource](./how-to-create-immersive-reader.md).
4343

4444
> [!IMPORTANT]
45-
> The [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package and Azure AD Authentication Library (ADAL) have been deprecated. No new features have been added since June 30, 2020. We strongly encourage you to upgrade, see the [migration guide](../../active-directory/develop/msal-migration.md) for more details.
45+
> The [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package and Azure AD Authentication Library (ADAL) have been deprecated. No new features have been added since June 30, 2020. We strongly encourage you to upgrade. To learn more, see the [migration guide](../../active-directory/develop/msal-migration.md).
4646
4747

4848
```csharp
@@ -59,11 +59,11 @@ public async Task<string> GetTokenAsync()
5959
}
6060
```
6161

62-
The `AuthenticationResult` object has an `AccessToken` property which is the actual token you will use when launching the Immersive Reader using the SDK. It also has an `ExpiresOn` property which denotes when the token will expire. Before launching the Immersive Reader, you can check whether the token has expired, and acquire a new token only if it has expired.
62+
The `AuthenticationResult` object has an `AccessToken` property, which is the actual token you use when launching the Immersive Reader using the SDK. It also has an `ExpiresOn` property that denotes when the token expires. Before launching the Immersive Reader, you can check whether the token is expired, and acquire a new token only if it expired.
6363

6464
## Using Node.JS
6565

66-
Add the [**request**](https://www.npmjs.com/package/request) npm package to your project. Use the following code to acquire a token, using the authentication values you got when you [created the Immersive Reader resource](./how-to-create-immersive-reader.md).
66+
Add the [request](https://www.npmjs.com/package/request) npm package to your project. Use the following code to acquire a token, using the authentication values you got when you [created the Immersive Reader resource](./how-to-create-immersive-reader.md).
6767

6868
```javascript
6969
router.get('/token', function(req, res) {
@@ -89,7 +89,7 @@ router.get('/token', function(req, res) {
8989
});
9090
```
9191

92-
The `expires_on` property is the date and time at which the token expires, expressed as the number of seconds since January 1, 1970 UTC. Use this value to determine whether your token has expired before attempting to acquire a new one.
92+
The `expires_on` property is the date and time at which the token expires, expressed as the number of seconds since January 1, 1970 UTC. Use this value to determine whether your token is expired before attempting to acquire a new one.
9393

9494
```javascript
9595
async function getToken() {
@@ -100,6 +100,7 @@ async function getToken() {
100100
}
101101
```
102102

103-
## Next steps
103+
## Next step
104104

105-
* Explore the [Immersive Reader SDK Reference](./reference.md)
105+
> [!div class="nextstepaction"]
106+
> [Explore the Immersive Reader SDK reference](reference.md)

articles/ai-services/immersive-reader/how-to-configure-read-aloud.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
title: "Configure Read Aloud"
33
titleSuffix: Azure AI services
4-
description: This article will show you how to configure the various options for Read Aloud.
5-
author: rwallerms
4+
description: Learn how to configure the various options for Read Aloud in Immersive Reader.
5+
author: sharmas
66
manager: nitinme
77

88
ms.service: azure-ai-immersive-reader
99
ms.topic: how-to
10-
ms.date: 06/29/2020
11-
ms.author: rwaller
10+
ms.date: 02/26/2024
11+
ms.author: sharmas
1212
---
1313

1414
# How to configure Read Aloud
1515

16-
This article demonstrates how to configure the various options for Read Aloud in the Immersive Reader.
16+
This article demonstrates how to configure the various options for Read Aloud in your Immersive Reader application.
1717

1818
## Automatically start Read Aloud
1919

@@ -34,7 +34,7 @@ ImmersiveReader.launchAsync(YOUR_TOKEN, YOUR_SUBDOMAIN, YOUR_DATA, options);
3434
3535
## Configure the voice
3636

37-
Set `voice` to either `male` or `female`. Not all languages support both voices. For more information, see the [Language Support](./language-support.md) page.
37+
Set `voice` to either `male` or `female`. Not all languages support both voices. For more information, see [Language support](./language-support.md).
3838

3939
```typescript
4040
const options = {
@@ -46,7 +46,7 @@ const options = {
4646

4747
## Configure playback speed
4848

49-
Set `speed` to a number between `0.5` (50%) and `2.5` (250%) inclusive. Values outside this range will get clamped to either 0.5 or 2.5.
49+
Set `speed` to a number between `0.5` (50%) and `2.5` (250%) inclusive. Values outside this range get clamped to either 0.5 or 2.5.
5050

5151
```typescript
5252
const options = {
@@ -56,6 +56,7 @@ const options = {
5656
};
5757
```
5858

59-
## Next steps
59+
## Next step
6060

61-
* Explore the [Immersive Reader SDK Reference](./reference.md)
61+
> [!div class="nextstepaction"]
62+
> [Explore the Immersive Reader SDK reference](reference.md)

articles/ai-services/immersive-reader/how-to-configure-translation.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: "Configure translation"
2+
title: Configure translation in Immersive Reader
33
titleSuffix: Azure AI services
4-
description: This article will show you how to configure the various options for translation.
5-
author: rwallerms
4+
description: Learn how to configure the various Immersive Reader options for translation.
5+
author: sharmas
66
manager: nitinme
77

88
ms.service: azure-ai-immersive-reader
99
ms.topic: how-to
10-
ms.date: 01/06/2022
11-
ms.author: rwaller
10+
ms.date: 02/27/2024
11+
ms.author: sharmas
1212
---
1313

1414
# How to configure Translation
@@ -17,7 +17,7 @@ This article demonstrates how to configure the various options for Translation i
1717

1818
## Configure Translation language
1919

20-
The `options` parameter contains all of the flags that can be used to configure Translation. Set the `language` parameter to the language you wish to translate to. See the [Language Support](./language-support.md) for the full list of supported languages.
20+
The `options` parameter contains all of the flags that can be used to configure Translation. Set the `language` parameter to the language you wish to translate to. For the full list of supported languages, see [Language support](language-support.md).
2121

2222
```typescript
2323
const options = {
@@ -31,7 +31,7 @@ ImmersiveReader.launchAsync(YOUR_TOKEN, YOUR_SUBDOMAIN, YOUR_DATA, options);
3131

3232
## Automatically translate the document on load
3333

34-
Set `autoEnableDocumentTranslation` to `true` to enable automatically translating the entire document when the Immersive Reader loads.
34+
Set `autoEnableDocumentTranslation` to `true` to enable automatic translation of the entire document when the Immersive Reader loads.
3535

3636
```typescript
3737
const options = {
@@ -41,7 +41,7 @@ const options = {
4141
};
4242
```
4343

44-
## Automatically enable word translation
44+
## Enable automatic word translation
4545

4646
Set `autoEnableWordTranslation` to `true` to enable single word translation.
4747

@@ -53,6 +53,7 @@ const options = {
5353
};
5454
```
5555

56-
## Next steps
56+
## Next step
5757

58-
* Explore the [Immersive Reader SDK Reference](./reference.md)
58+
> [!div class="nextstepaction"]
59+
> [Explore the Immersive Reader SDK reference](reference.md)
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,80 @@
11
---
22
title: "Edit the Immersive Reader launch button"
33
titleSuffix: Azure AI services
4-
description: This article will show you how to customize the button that launches the Immersive Reader.
4+
description: Learn how to customize the button that launches the Immersive Reader app.
55
#services: cognitive-services
6-
author: rwallerms
6+
author: sharmas
77
manager: nitinme
88

99
ms.service: azure-ai-immersive-reader
1010
ms.topic: how-to
11-
ms.date: 03/08/2021
12-
ms.author: rwaller
11+
ms.date: 02/23/2024
12+
ms.author: sharmas
1313
---
1414

1515
# How to customize the Immersive Reader button
1616

17-
This article demonstrates how to customize the button that launches the Immersive Reader to fit the needs of your application.
17+
This article demonstrates how to customize the button that launches the Immersive Reader, to fit the needs of your application.
1818

1919
## Add the Immersive Reader button
2020

21-
The Immersive Reader SDK provides default styling for the button that launches the Immersive Reader. Use the `immersive-reader-button` class attribute to enable this styling.
21+
The [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk) provides default styling for the button that launches the Immersive Reader. To enable this styling, use the `immersive-reader-button` class attribute.
2222

2323
```html
2424
<div class='immersive-reader-button'></div>
2525
```
2626

2727
## Customize the button style
2828

29-
Use the `data-button-style` attribute to set the style of the button. The allowed values are `icon`, `text`, and `iconAndText`. The default value is `icon`.
29+
To set the style of the button, use the `data-button-style` attribute. The allowed values are `icon`, `text`, and `iconAndText`. The default value is `icon`.
3030

3131
### Icon button
3232

33+
Use the following code to render the icon button.
34+
3335
```html
3436
<div class='immersive-reader-button' data-button-style='icon'></div>
3537
```
3638

37-
This renders the following:
38-
39-
![This is the rendered Text button](./media/button-icon.png)
39+
:::image type="content" source="media/button-icon.png" alt-text="Screenshot of the rendered button icon.":::
4040

4141
### Text button
4242

43+
Use the following code to render the button text.
44+
4345
```html
4446
<div class='immersive-reader-button' data-button-style='text'></div>
4547
```
4648

47-
This renders the following:
48-
49-
![This is the rendered Immersive Reader button.](./media/button-text.png)
49+
:::image type="content" source="media/button-text.png" alt-text="Screenshot of the text in the button.":::
5050

5151
### Icon and text button
5252

53+
Use the following code to render both the button and the text.
54+
5355
```html
5456
<div class='immersive-reader-button' data-button-style='iconAndText'></div>
5557
```
5658

57-
This renders the following:
58-
59-
![Icon button](./media/button-icon-and-text.png)
59+
:::image type="content" source="media/button-icon-and-text.png" alt-text="Screenshot of the icon and text together.":::
6060

6161
## Customize the button text
6262

63-
Configure the language and the alt text for the button using the `data-locale` attribute. The default language is English.
63+
To configure the language and the alt text for the button, use the `data-locale` attribute. The default language is English.
6464

6565
```html
6666
<div class='immersive-reader-button' data-locale='fr-FR'></div>
6767
```
6868

6969
## Customize the size of the icon
7070

71-
The size of the Immersive Reader icon can be configured using the `data-icon-px-size` attribute. This sets the size of the icon in pixels. The default size is 20px.
71+
To configure the size of the Immersive Reader icon, use the `data-icon-px-size` attribute. This sets the size of the icon in pixels. The default size is 20 px.
7272

7373
```html
7474
<div class='immersive-reader-button' data-icon-px-size='50'></div>
7575
```
7676

77-
## Next steps
77+
## Next step
7878

79-
* Explore the [Immersive Reader SDK Reference](./reference.md)
79+
> [!div class="nextstepaction"]
80+
> [Explore the Immersive Reader SDK reference](reference.md)

0 commit comments

Comments
 (0)