ユーティリティ
ダウンロード済みのボイスモデル名を取得
ダウンロード済みのボイスモデルのすべての名前を取得します。
- ブループリント
- C++
TArray<FName> DownloadedVoiceModelNames = URuntimeTTSLibrary::GetDownloadedVoiceModelNames();
名前からボイスモデルを取得
名前からボイスモデルオブジェクトを取得する
- Blueprint
- C++
FName VoiceModelName = TEXT("English (United States) - Ryan (High)"); // Assuming this is a valid voice model name
TSoftObjectPtr<URuntimeTTSModel> VoiceModel;
if (URuntimeTTSLibrary::GetVoiceModelFromName(VoiceModelName, VoiceModel))
{
// VoiceModel is now a valid voice model object
}
モデルから音声メタデータを取得
特定の音声モデルのメタデータを取得する
- Blueprint
- C++
URuntimeTTSModel* VoiceModel; // Assuming this is a valid voice model object
FTTSVoiceMetadata VoiceMetadata;
if (URuntimeTTSLibrary::GetVoiceMetadataFromModel(VoiceModel, VoiceMetadata))
{
// VoiceMetadata is now populated with the metadata of the voice model
}
名前からボイスメタデータを取得
名前を使ってボイスモデルのメタデータを取得する
- Blueprint
- C++
FName VoiceModelName = TEXT("English (United States) - Ryan (High)");
FTTSVoiceMetadata VoiceMetadata;
if (URuntimeTTSLibrary::GetVoiceMetadataFromName(VoiceModelName, VoiceMetadata))
{
// VoiceMetadata is now populated with the metadata of the voice model
}
メタデータから音声モデル名を取得
音声のメタデータを対応するモデル名に変換
- Blueprint
- C++
FTTSVoiceMetadata VoiceMetadata; // Assuming this is a populated voice metadata struct
FName VoiceModelName;
if (URuntimeTTSLibrary::GetVoiceModelNameFromMetadata(VoiceMetadata, VoiceModelName))
{
// VoiceModelName is now populated with the name of the voice model
}
音声モデルから話者数を取得
音声モデルに利用可能な話者の数を取得
- Blueprint
- C++
URuntimeTTSModel* VoiceModel; // Assuming this is a valid voice model object
int32 NumOfSpeakers;
if (URuntimeTTSLibrary::GetSpeakerCountFromVoiceModel(VoiceModel, NumOfSpeakers))
{
// NumOfSpeakers is now populated with the number of speakers in the voice model
}
モデル名からスピーカー数を取得する
声のモデル名を使用して利用可能なスピーカーの数を取得する
- Blueprint
- C++
FName VoiceModelName = TEXT("English (United States) - Ryan (High)");
int32 NumOfSpeakers;
if (URuntimeTTSLibrary::GetSpeakerCountFromModelName(VoiceModelName, NumOfSpeakers))
{
// NumOfSpeakers is now populated with the number of speakers in the voice model
}