Skip to content

Commit 4460124

Browse files
authored
Merge pull request #2867 from MicrosoftDocs/main
2/11/2025 AM Publish
2 parents ebeb4f8 + 698b605 commit 4460124

File tree

10 files changed

+20
-16
lines changed

10 files changed

+20
-16
lines changed

articles/ai-services/document-intelligence/quickstarts/includes/csharp-sdk.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,15 +678,15 @@ for (int i = 0; i < result.Documents.Count; i++)
678678
}
679679

680680
if (document.Fields.TryGetValue("Items", out DocumentField itemsField)
681-
&& itemsField.Type == DocumentFieldType.Array)
681+
&& itemsField.Type == DocumentFieldType.List)
682682
{
683-
foreach (DocumentField itemField in itemsField.ValueArray)
683+
foreach (DocumentField itemField in itemsField.ValueList)
684684
{
685685
Console.WriteLine("Item:");
686686

687-
if (itemField.Type == DocumentFieldType.Object)
687+
if (itemField.Type == DocumentFieldType.Dictionary)
688688
{
689-
IReadOnlyDictionary<string, DocumentField> itemFields = itemField.ValueObject;
689+
IReadOnlyDictionary<string, DocumentField> itemFields = itemField.ValueDictionary;
690690

691691
if (itemFields.TryGetValue("Description", out DocumentField itemDescriptionField)
692692
&& itemDescriptionField.Type == DocumentFieldType.String)

articles/ai-services/document-intelligence/versioning/sdk-overview-v4-0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The following tables present the correlation between each SDK version the suppor
8383

8484
| Language| SDK alias | API version (default) &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; | Supported clients|
8585
| :------ | :-----------|:---------- | :-----------------|
86-
| **Python 1.0.0b2**| v4.0 (GA)| 2024-11-30 GA |**DocumentIntelligenceClient**</br>**DocumentIntelligenceAdministrationClient**|
86+
| **Python 1.0.0**| v4.0 (GA)| 2024-11-30 GA |**DocumentIntelligenceClient**</br>**DocumentIntelligenceAdministrationClient**|
8787
| **Python 3.3.0**| v3.1 latest (GA)| 2023-07-31| **DocumentAnalysisClient**</br>**DocumentModelAdministrationClient**|
8888
| **Python 3.2.x**| v3.0 (GA)| 2022-08-31| **DocumentAnalysisClient**</br>**DocumentModelAdministrationClient**|
8989
| **Python 3.1.x**| v2.1 | v2.1 | **FormRecognizerClient**</br>**FormTrainingClient** |

articles/ai-services/speech-service/migrate-to-batch-synthesis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: eric-urban
66
ms.author: eur
77
manager: nitinme
88
ms.service: azure-ai-speech
9-
ms.topic: reference
9+
ms.topic: concept-article
1010
ms.date: 9/20/2024
1111
ms.reviewer: heikora
1212
ms.devlang: csharp

articles/ai-services/speech-service/rest-speech-to-text-short.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use Speech to text REST API for short audio to convert
55
author: eric-urban
66
manager: nitinme
77
ms.service: azure-ai-speech
8-
ms.topic: reference
8+
ms.topic: how-to
99
ms.date: 9/23/2024
1010
ms.author: eur
1111
ms.devlang: csharp

articles/ai-services/speech-service/rest-speech-to-text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure AI services
44
description: Get reference documentation for Speech to text REST API.
55
manager: nitinme
66
ms.service: azure-ai-speech
7-
ms.topic: reference
7+
ms.topic: concept-article
88
ms.date: 11/12/2024
99
ms.reviewer: eur
1010
author: eric-urban

articles/ai-services/speech-service/rest-text-to-speech.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use the REST API to convert text into synthesized spee
55
author: eric-urban
66
manager: nitinme
77
ms.service: azure-ai-speech
8-
ms.topic: reference
8+
ms.topic: how-to
99
ms.date: 9/23/2024
1010
ms.author: eur
1111
ms.custom: references_regions

articles/ai-services/speech-service/spx-batch-operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to do batch speech to text (speech recognition), batch te
55
author: eric-urban
66
manager: nitinme
77
ms.service: azure-ai-speech
8-
ms.topic: reference
8+
ms.topic: how-to
99
ms.date: 9/24/2024
1010
ms.author: eur
1111
ms.custom: mode-api

articles/ai-services/speech-service/spx-data-store-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to configure the Speech CLI datastore.
55
author: eric-urban
66
manager: nitinme
77
ms.service: azure-ai-speech
8-
ms.topic: reference
8+
ms.topic: how-to
99
ms.date: 9/24/2024
1010
ms.author: eur
1111
ms.custom: mode-api

articles/ai-services/speech-service/spx-output-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to configure output options with the Speech CLI.
55
author: eric-urban
66
manager: nitinme
77
ms.service: azure-ai-speech
8-
ms.topic: reference
8+
ms.topic: how-to
99
ms.date: 9/24/2024
1010
ms.author: eur
1111
#Customer intent: As a developer, I want to learn how to configure output options with the Speech CLI.

articles/ai-services/translator/document-translation/quickstarts/includes/sdk/python.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ def sample_single_document_translation():
153153

154154
# absolute path to your document
155155
file_path = "C:/{your-file-path}/document-translation-sample.docx"
156-
file_name = os.path.path.basename(file_path)
156+
file_name = os.path.basename(file_path)
157157
file_type = (
158158
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
159159
)
160160
print(f"File for translation: {file_name}")
161161

162-
with open(file_name, "r") as file:
162+
with open(file_path, "rb") as file:
163163
file_contents = file.read()
164164

165165
document_content = (file_name, file_contents, file_type)
@@ -168,8 +168,12 @@ def sample_single_document_translation():
168168
response_stream = client.document_translate(
169169
body=document_translate_content, target_language=target_language
170170
)
171-
translated_response = response_stream.decode("utf-8-sig") # type: ignore[attr-defined]
172-
print(f"Translated response: {translated_response}")
171+
# Save the response_stream to a file
172+
output_file_path = "./translated-document.docx"
173+
with open(output_file_path, "wb") as output_file:
174+
output_file.write(response_stream)
175+
176+
print(f"Translated document saved to: {output_file_path}")
173177

174178

175179
if __name__ == "__main__":

0 commit comments

Comments
 (0)