public string[] GetSpeakerNamesForEditor(bool includeDefault, bool forSystem)
{
if (voiceNames == null || voiceNames.Count == 0)
{
return includeDefault ? new string[] { forSystem ? "System default" : "Default", "Custom" } : new string[] { "Custom" };
}
else
{
string[] temp = new string[includeDefault ? voiceNames.Count + 2 : voiceNames.Count + 1];
if (includeDefault) temp[0] = forSystem ? "System default" : "Default";
for (int i = 0; i < voiceNames.Count; i++)
{
temp[includeDefault ? i + 1 : i] = voiceNames[i];
}
temp[includeDefault ? voiceNames.Count + 1 : voiceNames.Count] = "Custom";
return temp;
}
}