Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match voice with character #91

Open
plaidpants opened this issue Feb 10, 2024 · 0 comments
Open

Match voice with character #91

plaidpants opened this issue Feb 10, 2024 · 0 comments

Comments

@plaidpants
Copy link

How can I get a list of male or female voices to match randomly with a set of male or female characters in my game. I'm using this code to get a list of voices. But I seem to be unable to extract the Gender (male/female) and Local (en_US) from the voiceSettings. Ideally I would like to be able to assign a voice based on male/female/other, child/adult/old person, and maybe accents? (southern, British, etc.)

            // Get all voice name presets
            string[] voiceNames = speaker.TTSService.GetAllPresetVoiceSettings()
                .Select((voiceSetting) => voiceSetting.SettingsId).ToArray();
            speaker.VoiceID = voiceNames[(int)currentTalkIndex % voiceNames.Length];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant