public RecognizerCommands(IRecognizerService osu, ILogger <RecognizerCommands> logger) { this.osu = osu; this.logger = logger; logger.LogInformation("RecognizerCommands loaded"); }
public SpeechController( ISpeechService speechService, ISpeakerService speakerService, IRecognizerService recognizerService, IResultTextService resultTextService) { _speechService = speechService; _speakerService = speakerService; _recognizerService = recognizerService; _resultTextService = resultTextService; }
static void ConfigureServices() { ConfigurationBuilder configBuilder = new ConfigurationBuilder(); configBuilder .SetBasePath(Environment.GetEnvironmentVariable("LOCALAPPDATA")) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false); configurationService = configBuilder.Build(); serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton(serviceProvider => { return(configurationService); }); serviceCollection.AddSingleton <IRecognizerService, AWSTExtractService>(serviceProvider => { return(new AWSTExtractService(configurationService.GetSection("OCRService"))); }); serviceCollection.AddSingleton <IShortenerService, TinyUrlService>(serviceProvider => { return(new TinyUrlService(configurationService.GetSection("ShortenerService"))); }); serviceCollection.AddSingleton <IStorageService, AzureBlobStorageService>(serviceProvider => { return(new AzureBlobStorageService(configurationService.GetSection("StorageService"), _hunterId)); }); serviceProvider = serviceCollection.BuildServiceProvider(); configurationService = serviceProvider.GetService <IConfiguration>(); shortenerService = serviceProvider.GetService <IShortenerService>(); recognizerService = serviceProvider.GetService <IRecognizerService>(); storageService = serviceProvider.GetService <IStorageService>(); }