Tiện ích
Lấy Tên Các Mô Hình Giọng Nói Đã Tải Xuống
Lấy tên của tất cả các mô hình giọng nói đã tải xuống
- Blueprint
- C++

TArray<FName> DownloadedVoiceModelNames = URuntimeTTSLibrary::GetDownloadedVoiceModelNames();
Lấy Mô Hình Giọng Nói Từ Tên
Lấy một đối tượng mô hình giọng nói từ tên của nó
- 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
}
Lấy Siêu Dữ Liệu Giọng Nói Từ Mô Hình
Lấy siêu dữ liệu cho một mô hình giọng nói cụ thể
- 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
}
Lấy Siêu Dữ Liệu Giọng Nói Từ Tên
Lấy siêu dữ liệu cho một mô hình giọng nói bằng cách sử dụng tên của nó
- 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
}
Lấy Tên Mô Hình Giọng Nói Từ Metadata
Chuyển đổi metadata giọng nói thành tên mô hình tương ứng
- 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
}
Lấy Số Lượng Người Nói Từ Mô Hình Giọng Nói
Lấy số lượng người nói có sẵn trong một mô hình giọng nói
- 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
}
Lấy Số Lượng Người Nói Từ Tên Mô Hình
Lấy số lượng người nói có sẵn trong một mô hình giọng nói bằng cách sử dụng tên của nó
- 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
}