public AIConfiguration(string subscriptionKey, string clientAccessToken, SupportedLanguage language)
		{
			this.SubscriptionKey = subscriptionKey;
			this.ClientAccessToken = clientAccessToken;
			this.Language = language;

			DevMode = false;
			DebugLog = false;
            VoiceActivityDetectionEnabled = true;

            ProtocolVersion = CURRENT_PROTOCOL_VERSION;
		}
        private static Language ConvertAILangToSystem(SupportedLanguage language)
        {
            switch (language.code)
            {
                case "en":
                    return new Language("en-US");
                case "ru":
                    return new Language("ru-RU");
                case "de":
                    return new Language("de-DE");
                case "pt":
                    return new Language("pt-PT");
                case "pt-BR":
                    return new Language("pt-BR");
                case "es":
                    return new Language("es-ES");
                case "fr":
                    return new Language("fr-FR");
                case "it":
                    return new Language("it-IT");
                case "ja":
                    return new Language("ja-JP");
                case "zh-CN":
                    return new Language("zh-CN");
                case "zh-HK":
                    return new Language("zh-HK");
                case "zh-TW":
                    return new Language("zh-TW");
            }

            return new Language("en-US");
        }
Esempio n. 3
0
        private Language ConvertAILangToSystem(SupportedLanguage language)
        {
            switch (language.code)
            {
            case "en":
                return(new Language("en-US"));

                break;

            case "ru":
                return(new Language("ru-RU"));

                break;

            case "de":
                return(new Language("de-DE"));

                break;

            case "pt":
                return(new Language("pt-PT"));

                break;

            case "pt-BR":
                return(new Language("pt-BR"));

                break;

            case "es":
                return(new Language("es-ES"));

                break;

            case "fr":
                return(new Language("fr-FR"));

                break;

            case "it":
                return(new Language("it-IT"));

                break;

            case "ja":
                return(new Language("ja-JP"));

                break;

            case "zh-CN":
                return(new Language("zh-CN"));

                break;

            case "zh-HK":
                return(new Language("zh-HK"));

                break;

            case "zh-TW":
                return(new Language("zh-TW"));

                break;
            }

            return(new Language("en-US"));
        }