Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ com.azure:azure-ai-projects;2.0.0;2.0.1
com.azure:azure-ai-speech-transcription;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-ai-textanalytics;5.5.12;5.6.0-beta.1
com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-translation-text;1.1.8;2.0.0-beta.2
com.azure:azure-ai-translation-text;1.1.8;2.0.0
com.azure:azure-ai-translation-document;1.0.7;1.1.0-beta.1
com.azure:azure-ai-vision-face;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-ai-voicelive;1.0.0-beta.5;1.0.0-beta.6
Expand Down
8 changes: 7 additions & 1 deletion sdk/translation/azure-ai-translation-text/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Release History

Comment thread
jrjrguo marked this conversation as resolved.
## 2.0.0-beta.2 (Unreleased)
## 2.0.0 (Unreleased)

### Features Added

- GA release of the Azure AI Translator API 2026-06-06, including translations using LLM models, adaptive custom translation, tone variant translations, and gender-specific translations.
- Added `TranslationTone` and `TranslationGender` enum types for strongly-typed tone and gender options on `TranslationTarget`.
Comment thread
jrjrguo marked this conversation as resolved.

### Breaking Changes

- `TranslationTarget.setTone` and `TranslationTarget.setGender` now accept `TranslationTone` and `TranslationGender` enums instead of `String`.
- Removed `grade` property from `TranslationTarget`.

### Bugs Fixed

### Other Changes
Expand Down
2 changes: 1 addition & 1 deletion sdk/translation/azure-ai-translation-text/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>com.azure</groupId>
<artifactId>azure-ai-translation-text</artifactId>
<version>2.0.0-beta.2</version> <!-- {x-version-update;com.azure:azure-ai-translation-text;current} -->
<version>2.0.0</version> <!-- {x-version-update;com.azure:azure-ai-translation-text;current} -->

<name>Microsoft Azure client library for Text Translation</name>
<description>This package contains Microsoft Azure Text Translation client library.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,8 @@ public Mono<TransliteratedText> transliterate(String language, String fromScript
* profanityMarker: String(Asterisk/Tag) (Optional)
* deploymentName: String (Optional)
* allowFallback: Boolean (Optional)
* grade: String (Optional)
* tone: String (Optional)
* gender: String (Optional)
* tone: String(neutral/formal/informal) (Optional)
* gender: String(neutral/male/female) (Optional)
* adaptiveDatasetId: String (Optional)
* referenceTextPairs (Optional): [
* (Optional){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,8 @@ public TransliteratedText transliterate(String language, String fromScript, Stri
* profanityMarker: String(Asterisk/Tag) (Optional)
* deploymentName: String (Optional)
* allowFallback: Boolean (Optional)
* grade: String (Optional)
* tone: String (Optional)
* gender: String (Optional)
* tone: String(neutral/formal/informal) (Optional)
* gender: String(neutral/male/female) (Optional)
* adaptiveDatasetId: String (Optional)
* referenceTextPairs (Optional): [
* (Optional){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
*/
@ServiceClientBuilder(serviceClients = { TextTranslationClient.class, TextTranslationAsyncClient.class })
public final class TextTranslationClientBuilder implements HttpTrait<TextTranslationClientBuilder>,
ConfigurationTrait<TextTranslationClientBuilder>, EndpointTrait<TextTranslationClientBuilder>,
KeyCredentialTrait<TextTranslationClientBuilder>, TokenCredentialTrait<TextTranslationClientBuilder> {
ConfigurationTrait<TextTranslationClientBuilder>, TokenCredentialTrait<TextTranslationClientBuilder>,
KeyCredentialTrait<TextTranslationClientBuilder>, EndpointTrait<TextTranslationClientBuilder> {

@Generated
private static final String SDK_NAME = "name";
Expand Down Expand Up @@ -449,4 +449,13 @@ private void validateClient() {
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}

@Generated
private static final String[] DEFAULT_SCOPES = new String[] { "https://cognitiveservices.azure.com/.default" };

/*
* The KeyCredential used for authentication.
*/
@Generated
private KeyCredential keyCredential;
Comment thread
jrjrguo marked this conversation as resolved.
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
public enum TextTranslationServiceVersion implements ServiceVersion {

/**
* Enum value 2025-10-01-preview.
* Enum value 2026-06-06.
*/
V2025_10_01_PREVIEW("2025-10-01-preview");
V2026_06_06("2026-06-06");

private final String version;

Expand All @@ -35,6 +35,6 @@ public String getVersion() {
* @return The latest {@link TextTranslationServiceVersion}.
*/
public static TextTranslationServiceVersion getLatest() {
return V2025_10_01_PREVIEW;
return V2026_06_06;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,8 @@ public Response<BinaryData> getSupportedLanguagesWithResponse(RequestOptions req
* profanityMarker: String(Asterisk/Tag) (Optional)
* deploymentName: String (Optional)
* allowFallback: Boolean (Optional)
* grade: String (Optional)
* tone: String (Optional)
* gender: String (Optional)
* tone: String(neutral/formal/informal) (Optional)
* gender: String(neutral/male/female) (Optional)
* adaptiveDatasetId: String (Optional)
* referenceTextPairs (Optional): [
* (Optional){
Expand Down Expand Up @@ -527,9 +526,8 @@ public Mono<Response<BinaryData>> translateWithResponseAsync(BinaryData translat
* profanityMarker: String(Asterisk/Tag) (Optional)
* deploymentName: String (Optional)
* allowFallback: Boolean (Optional)
* grade: String (Optional)
* tone: String (Optional)
* gender: String (Optional)
* tone: String(neutral/formal/informal) (Optional)
* gender: String(neutral/male/female) (Optional)
* adaptiveDatasetId: String (Optional)
* referenceTextPairs (Optional): [
* (Optional){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,8 @@
/**
* <!-- start generated doc -->
* Package containing the data models for TextTranslation.
* Text translation is a cloud-based REST API feature of the Translator service that uses neural
* machine translation technology to enable quick and accurate source-to-target text translation
* in real time across all supported languages.
*
* The following methods are supported by the Text Translation feature:
*
* Languages. Returns a list of languages supported by Translate, Transliterate, and Dictionary Lookup operations.
*
* Translate. Renders single source-language text to multiple target-language texts with a single request.
*
* Transliterate. Converts characters or letters of a source language to the corresponding characters or letters of a
* target language.
*
* Detect. Returns the source code language code and a boolean variable denoting whether the detected language is
* supported for text translation and transliteration.
* Azure Translator is a cloud-based, multilingual, neural machine translation service. The Text Translation API enables
* robust and scalable translation capabilities suitable for diverse applications.
* <!-- end generated doc -->
*/
package com.azure.ai.translation.text.implementation.models;
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.ai.translation.text.models;

import com.azure.core.annotation.Generated;
import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;

/**
* Desired gender for the translated text.
*/
public final class TranslationGender extends ExpandableStringEnum<TranslationGender> {

/**
* Neutral gender.
*/
@Generated
public static final TranslationGender NEUTRAL = fromString("neutral");

/**
* Male gender.
*/
@Generated
public static final TranslationGender MALE = fromString("male");

/**
* Female gender.
*/
@Generated
public static final TranslationGender FEMALE = fromString("female");

/**
* Creates a new instance of TranslationGender value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
@Generated
@Deprecated
public TranslationGender() {
}

/**
* Creates or finds a TranslationGender from its string representation.
*
* @param name a name to look for.
* @return the corresponding TranslationGender.
*/
@Generated
public static TranslationGender fromString(String name) {
return fromString(name, TranslationGender.class);
}

/**
* Gets known TranslationGender values.
*
* @return known TranslationGender values.
*/
@Generated
public static Collection<TranslationGender> values() {
return values(TranslationGender.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,16 @@ public final class TranslationTarget implements JsonSerializable<TranslationTarg
private Boolean allowFallback;

/*
* Defines complexity of LLM prompts to provide high accuracy translation.
* Desired tone of target translation. Accepted values are formal, informal, or neutral.
*/
@Generated
private String grade;
private TranslationTone tone;

/*
* Desired tone of target translation.
* Desired gender of target translation. Accepted values are female, male, or neutral.
*/
@Generated
private String tone;

/*
* Desired gender of target translation.
*/
@Generated
private String gender;
private TranslationGender gender;

/*
* Reference dataset ID having sentence pair to generate adaptive customized translation.
Expand Down Expand Up @@ -276,71 +270,25 @@ public TranslationTarget setAllowFallback(Boolean allowFallback) {
}

/**
* Get the grade property: Defines complexity of LLM prompts to provide high accuracy translation.
*
* @return the grade value.
*/
@Generated
public String getGrade() {
return this.grade;
}

/**
* Set the grade property: Defines complexity of LLM prompts to provide high accuracy translation.
*
* @param grade the grade value to set.
* @return the TranslationTarget object itself.
*/
@Generated
public TranslationTarget setGrade(String grade) {
this.grade = grade;
return this;
}

/**
* Get the tone property: Desired tone of target translation.
* Get the tone property: Desired tone of target translation. Accepted values are formal, informal, or neutral.
*
* @return the tone value.
*/
@Generated
public String getTone() {
public TranslationTone getTone() {
return this.tone;
}

/**
* Set the tone property: Desired tone of target translation.
*
* @param tone the tone value to set.
* @return the TranslationTarget object itself.
*/
@Generated
public TranslationTarget setTone(String tone) {
this.tone = tone;
return this;
}

/**
* Get the gender property: Desired gender of target translation.
* Get the gender property: Desired gender of target translation. Accepted values are female, male, or neutral.
*
* @return the gender value.
*/
@Generated
public String getGender() {
public TranslationGender getGender() {
return this.gender;
}

/**
* Set the gender property: Desired gender of target translation.
*
* @param gender the gender value to set.
* @return the TranslationTarget object itself.
*/
@Generated
public TranslationTarget setGender(String gender) {
this.gender = gender;
return this;
}

/**
* Get the adaptiveDatasetId property: Reference dataset ID having sentence pair to generate adaptive customized
* translation.
Expand Down Expand Up @@ -402,9 +350,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
this.profanityMarker == null ? null : this.profanityMarker.toString());
jsonWriter.writeStringField("deploymentName", this.deploymentName);
jsonWriter.writeBooleanField("allowFallback", this.allowFallback);
jsonWriter.writeStringField("grade", this.grade);
jsonWriter.writeStringField("tone", this.tone);
jsonWriter.writeStringField("gender", this.gender);
jsonWriter.writeStringField("tone", this.tone == null ? null : this.tone.toString());
jsonWriter.writeStringField("gender", this.gender == null ? null : this.gender.toString());
jsonWriter.writeStringField("adaptiveDatasetId", this.adaptiveDatasetId);
jsonWriter.writeArrayField("referenceTextPairs", this.referenceTextPairs,
(writer, element) -> writer.writeJson(element));
Expand All @@ -429,9 +376,8 @@ public static TranslationTarget fromJson(JsonReader jsonReader) throws IOExcepti
ProfanityMarker profanityMarker = null;
String deploymentName = null;
Boolean allowFallback = null;
String grade = null;
String tone = null;
String gender = null;
TranslationTone tone = null;
TranslationGender gender = null;
String adaptiveDatasetId = null;
List<ReferenceTextPair> referenceTextPairs = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
Expand All @@ -449,12 +395,10 @@ public static TranslationTarget fromJson(JsonReader jsonReader) throws IOExcepti
deploymentName = reader.getString();
} else if ("allowFallback".equals(fieldName)) {
allowFallback = reader.getNullable(JsonReader::getBoolean);
} else if ("grade".equals(fieldName)) {
grade = reader.getString();
} else if ("tone".equals(fieldName)) {
tone = reader.getString();
tone = TranslationTone.fromString(reader.getString());
} else if ("gender".equals(fieldName)) {
gender = reader.getString();
gender = TranslationGender.fromString(reader.getString());
} else if ("adaptiveDatasetId".equals(fieldName)) {
adaptiveDatasetId = reader.getString();
} else if ("referenceTextPairs".equals(fieldName)) {
Expand All @@ -469,12 +413,35 @@ public static TranslationTarget fromJson(JsonReader jsonReader) throws IOExcepti
deserializedTranslationTarget.profanityMarker = profanityMarker;
deserializedTranslationTarget.deploymentName = deploymentName;
deserializedTranslationTarget.allowFallback = allowFallback;
deserializedTranslationTarget.grade = grade;
deserializedTranslationTarget.tone = tone;
deserializedTranslationTarget.gender = gender;
deserializedTranslationTarget.adaptiveDatasetId = adaptiveDatasetId;
deserializedTranslationTarget.referenceTextPairs = referenceTextPairs;
return deserializedTranslationTarget;
});
}

/**
* Set the tone property: Desired tone of target translation. Accepted values are formal, informal, or neutral.
*
* @param tone the tone value to set.
* @return the TranslationTarget object itself.
*/
@Generated
public TranslationTarget setTone(TranslationTone tone) {
this.tone = tone;
return this;
}

/**
* Set the gender property: Desired gender of target translation. Accepted values are female, male, or neutral.
*
* @param gender the gender value to set.
* @return the TranslationTarget object itself.
*/
@Generated
public TranslationTarget setGender(TranslationGender gender) {
this.gender = gender;
return this;
}
}
Loading
Loading