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

# PartyLocalChatControl::SetTextToSpeechProfile

> 指定された種類のテキスト読み上げ操作に使用するプロファイルを構成します。

指定された種類のテキスト読み上げ操作に使用するプロファイルを構成します。

## 構文

```cpp theme={null}
PartyError SetTextToSpeechProfile(  
    PartySynthesizeTextToSpeechType type,  
    PartyString profileIdentifier,  
    void* asyncIdentifier  
)  
```

### パラメーター

**`type`**   [PartySynthesizeTextToSpeechType](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/enums/partysynthesizetexttospeechtype.md)

指定されたプロファイルを使用するテキスト読み上げ操作の種類。

**`profileIdentifier`**   [PartyString](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/typedefs.md)

指定された種類のテキスト読み上げ操作が使用するプロファイルの識別子。

**`asyncIdentifier`**   void\*\
*オプション*

完了状態の変化をこの呼び出しに関連付けるために使用できる、オプションでアプリ定義のポインター サイズのコンテキスト値。

### 戻り値

PartyError

テキスト読み上げプロファイルを設定する非同期操作が開始された場合は `c_partyErrorSuccess`、それ以外の場合はエラー コード。このメソッドが失敗した場合、関連する状態変化は生成されません。エラー コードの人間が読める形式は、[PartyManager::GetErrorMessage()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md) で取得できます。

## 解説

提供されたプロファイルは、`type` に同じ値を指定する後続のすべての [SynthesizeTextToSpeech()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_synthesizetexttospeech.md) の呼び出しに使用されます。SetTextToSpeechProfile() が少なくとも 1 回呼び出されるまでプロファイルは構成されません。したがって、このメソッドは、SynthesizeTextToSpeech() の呼び出しが成功する前に少なくとも 1 回呼び出す必要があります。\
\
&#x20;このメソッドはプロファイル選択を示すためにプロファイル識別子を受け取るため、タイトルは [PartyTextToSpeechProfile::GetIdentifier()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/methods/partytexttospeechprofile_getidentifier.md) の結果を渡すか、前の Party ライブラリ セッションからキャッシュされたプロファイル識別子を提供することができます。\
\
&#x20;複数の SetTextToSpeechProfile() 操作を開始でき、それらは非同期にキューに追加されます。各操作は順番に処理および完了されます。\
\
&#x20;これは非同期操作です。完了時に [PartySetTextToSpeechProfileCompletedStateChange](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/structs/partysettexttospeechprofilecompletedstatechange.md) が [PartyManager::StartProcessingStateChanges()](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges.md) を介して提供されます。\
\
&#x20;テキスト読み上げ合成機能は内部で、利用可能なリージョンと待機時間測定の推定値を使用してサービスの使用を最適化します。[PartyOption::RegionUpdateConfiguration](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/enums/partyoption.md) オプションを使用して [PartyRegionUpdateMode::Deferred](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/enums/partyregionupdatemode.md) の更新モードを構成した場合、利用可能なリージョンの集合の取得およびそれらへの接続品質の測定がまだ開始されていない可能性があり、または最後の更新が構成された更新間隔の有効期間を超えている可能性があります。ローカル デバイスが現在ネットワークに接続中でも接続もされていない場合、SetTextToSpeechProfile() は、この呼び出しの [PartySetTextToSpeechProfileCompletedStateChange](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/structs/partysettexttospeechprofilecompletedstatechange.md) 完了の前に、遅延されたリージョン更新が確実に開始され、関連する [PartyRegionsChangedStateChange](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/structs/partyregionschangedstatechange.md) が提供されるようにします。

## 要件

**ヘッダー:** Party.h

## 関連項目

[PartyLocalChatControl](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/partylocalchatcontrol.md)\
[PartyLocalChatControl::GetTextToSpeechProfile](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_gettexttospeechprofile.md)


## Related topics

- [PartyLocalChatControl::PopulateAvailableTextToSpeechProfiles](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_populateavailabletexttospeechprofiles.md)
- [PartyLocalChatControl::GetTextToSpeechProfile](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_gettexttospeechprofile.md)
- [PartyTextToSpeechProfile](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyTextToSpeechProfile/partytexttospeechprofile.md)
- [PartyLocalChatControl::SynthesizeTextToSpeech](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_synthesizetexttospeech.md)
- [PartySynthesizeTextToSpeechType](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/reference/enums/partysynthesizetexttospeechtype.md)
