public SayingController( ISayingService sayingService, IUserHelper userHelper, ILog logger) { _sayingService = sayingService; _userHelper = userHelper; _logger = logger; }
public SayingController( ISayingService sayingService, IUserHelper userHelper, ILog logger) { _sayingService = sayingService; _userHelper = userHelper; _logger = logger; }
public SayingResponse(IConfiguration config, ISayingService sayingsService, ILogger <Worker> logger) { this.config = config; this.sayingsService = sayingsService; this.logger = logger; var speechSubscription = config["TwitchBotConfiguration:SpeechSubscription"]; var speechServiceRegion = config["TwitchBotConfiguration:SpeechServiceRegion"]; // create a new speech synth var speechConfig = SpeechConfig .FromSubscription(config["TwitchBotConfiguration:SpeechSubscription"], config["TwitchBotConfiguration:SpeechServiceRegion"]); speechConfig.SpeechSynthesisLanguage = "en-GB"; speechConfig.SpeechSynthesisVoiceName = "en-GB-RyanNeural"; logger.LogInformation($"Here is the SpeechSynthesisLanguage: {speechConfig.SpeechSynthesisLanguage}"); logger.LogInformation($"Here is the SpeechSynthesisVoiceName: {speechConfig.SpeechSynthesisVoiceName}"); speechSynthesizer = new SpeechSynthesizer(speechConfig); SetupSayingsAsync().Wait(); }