> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PartyVoiceChatTranscriptionReceivedStateChange

> Information specific to the *VoiceChatTranscriptionReceived* type of state change.

Information specific to the *VoiceChatTranscriptionReceived* type of state change.

## Syntax

```cpp theme={null}
struct PartyVoiceChatTranscriptionReceivedStateChange : PartyStateChange {  
    PartyStateChangeResult result;  
    PartyError errorDetail;  
    PartyChatControl* senderChatControl;  
    uint32_t receiverChatControlCount;  
    PartyLocalChatControlArray receiverChatControls;  
    PartyAudioSourceType sourceType;  
    PartyString languageCode;  
    PartyString transcription;  
    PartyVoiceChatTranscriptionPhraseType type;  
    uint32_t translationCount;  
    PartyTranslation* translations;  
}  
```

### Members

**`result`**   [PartyStateChangeResult](/services/playfab/multiplayer/networking/reference/enums/partystatechangeresult)

Indicates that the transcription operation Succeeded or provides the reason that it failed.

On success, the `transcription` field is a string of non-zero length. On failure, the string is empty. Failure indicates that a transcription operation was attempted for the speaker but could not be completed. If transcription is enabled at the request of the user associated with the chat control, and the transcription messages are shown via UI, it is recommended that failures also be indicated to the user in order to provide feedback as to whether transcriptions are pending or have failed.

**`errorDetail`**   PartyError

A diagnostic value providing additional troubleshooting information regarding any potential error condition.

The human-readable form of this error detail can be retrieved via [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

**`senderChatControl`**   [PartyChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyChatControl/partychatcontrol)\*

The chat control object that originated the transcription message.

**`receiverChatControlCount`**   uint32\_t

The number of local receiver chat controls to which the transcription is addressed.

**`receiverChatControls`**   [PartyLocalChatControlArray](/services/playfab/multiplayer/networking/reference/typedefs)\
*array of size `receiverChatControlCount`*

The local receiver chat controls to which the transcription is addressed.

**`sourceType`**   [PartyAudioSourceType](/services/playfab/multiplayer/networking/reference/enums/partyaudiosourcetype)

The type of audio source this transcription represents.

The audio source type can optionally be used for game scenarios in which transcriptions from different source types should be treated differently. For instance, different iconography may be shown depending on whether the transcription is associated with microphone or text-to-speech audio.

**`languageCode`**   [PartyString](/services/playfab/multiplayer/networking/reference/typedefs)

The language code of the transcription.

The language code is always provided when the `result` field indicates success. Otherwise, the language code is an empty string. <br /><br /> The language code is in BCP 47 format, such as en-US for English (United States). Supported language codes are enumerated in [Language support](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support).

**`transcription`**   [PartyString](/services/playfab/multiplayer/networking/reference/typedefs)

The transcribed voice chat text.

The string may be up to `c_maxChatTextMessageLength` characters long, not including the null terminator. The string is always empty when the `result` field indicates failures.

**`type`**   [PartyVoiceChatTranscriptionPhraseType](/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionphrasetype)

Indicates the phrase type of the text provided in the `transcription` field.

The type is always [PartyVoiceChatTranscriptionPhraseType::Final](/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionphrasetype) when the `result` field indicates failure.

**`translationCount`**   uint32\_t

The number of translations associated with the transcribed voice chat text.

Translations are provided if [PartyVoiceChatTranscriptionOptions::TranslateToLocalLanguage](/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionoptions) has previously been specified via [PartyLocalChatControl::SetTranscriptionOptions()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settranscriptionoptions) on a chat control local to this device. There may be more than one translation if multiple local chat controls have enabled translation and the local chat controls have specified different languages via [PartyLocalDevice::CreateChatControl()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol). In that case, the app can compare the `languageCode` field of each PartyTranslation in `translations` against the language code, obtained via [PartyLocalChatControl::GetLanguage()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getlanguage), for each local chat control in `receiverChatControls` to determine the target local chat control for each translation.

**`translations`**   [PartyTranslation](/services/playfab/multiplayer/networking/reference/structs/partytranslation)\*\
*array of size `translationCount`*

An array containing the translations of the voice chat transcription string.

Translations are provided if [PartyVoiceChatTranscriptionOptions::TranslateToLocalLanguage](/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionoptions) has previously been specified via [PartyLocalChatControl::SetTranscriptionOptions()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settranscriptionoptions) on a chat control local to this device. There may be more than one translation if multiple local chat controls have enabled translation and the local chat controls have specified different languages via [PartyLocalDevice::CreateChatControl()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol). In that case, the app can compare the `languageCode` field of each PartyTranslation in `translations` against the language code, obtained via [PartyLocalChatControl::GetLanguage()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getlanguage), for each local chat control in `receiverChatControls` to determine the target local chat control for each translation. <br /><br /> A translation corresponding to the language for each chat control in `receiverChatControls` that has enabled translation is provided, even if the speaking chat control's language is the same as the local chat control's language. In such a case, the transcription and translation strings are identical.

## Requirements

**Header:** Party.h

## See also

[Party members](/services/playfab/multiplayer/networking/reference/party_members)\
[PartyLocalDevice::CreateChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol)\
[PartyLocalChatControl::SetTranscriptionOptions](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settranscriptionoptions)


## Related topics

- [PartyVoiceChatTranscriptionOptions](/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionoptions.md)
- [PartyVoiceChatTranscriptionPhraseType](/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionphrasetype.md)
- [PartyLocalChatControl::GetTranscriptionOptions](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_gettranscriptionoptions.md)
- [PlayFab Party Release Notes](/services/playfab/multiplayer/networking/release-notes.md)
- [PartyLocalChatControl::SetTranscriptionOptions](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settranscriptionoptions.md)
