# SpeechTranslatorResponse.Text


```
public final class SpeechTranslatorResponse.Text implements SpeechTranslatorResponse
```

<br />

*** ** * ** ***

Represents a successful text translation result.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/speechtranslation/SpeechTranslatorResponse.Text#Text(java.util.Locale,kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Locale.html locale, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html translatedText)` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Locale.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/speechtranslation/SpeechTranslatorResponse.Text#getLocale()()` the `https://developer.android.com/reference/java/util/Locale.html` of the translated text. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/speechtranslation/SpeechTranslatorResponse.Text#getTranslatedText()()` the string of the translated text. |

## Public constructors

### Text

```
public Text(@NonNull Locale locale, @NonNull String translatedText)
```

## Public methods

### getLocale

```
public final @NonNull Locale getLocale()
```

the `https://developer.android.com/reference/java/util/Locale.html` of the translated text.

### getTranslatedText

```
public final @NonNull String getTranslatedText()
```

the string of the translated text.