コード例 #1
0
        /// <summary>
        /// Sets the recognizer's config. For internal usage only.
        /// </summary>
        /// <param name="config"></param>
        /// <returns>
        /// False: the given config is not compatible.
        /// </returns>
        internal bool SetConfig(SpeechRecognitionConfig config, SpeechRecognitionAppSettings settings)
        {
            this.Settings    = settings;
            this.Config      = config;
            this.AudioConfig = GetAudioConfig();

            return(this.AudioConfig != null);
        }
コード例 #2
0
 public AzureSpeechRecognitionServiceProvider(IServiceProvider serviceProvider, ILogger <AzureSpeechRecognitionServiceProvider> logger, IOptions <SpeechRecognitionAppSettings> appSettings)
 {
     this.ServiceProvider = serviceProvider;
     this.Logger          = logger;
     this.AppSettings     = appSettings.Value;
 }