RoboZhando/Synthesizer.cs
/// <summary>Gets the prefered language for that given user</summary>
/// <seealso cref="https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#neural-voices"/>
Gets the prefered language for that given user
Gets the prefered language for that given user
protected async Task<string> GetPreferedVoice(DiscordUser user) {
            if (Redis != null) {
                var settings = await user.GetSettingsAsync(Redis);
                if (!string.IsNullOrWhiteSpace(settings.Voice)) {
                    return settings.Voice;
                }
            }
            return DEFAULT_VOICE;
        }
protected async Task < string > GetPreferedVoice ( DiscordUser user ) { if ( Redis != null ) { var settings = await user . GetSettingsAsync ( Redis ) ; if ( ! string . IsNullOrWhiteSpace ( settings . Voice ) ) { return settings . Voice ; } } return DEFAULT_VOICE ; }
Gets the prefered language for that given user
Gets the prefered language for that given user
user
DiscordUser
seealso
None