public TextToSpeechComponent(Pipeline pipeline, AzureTextToSpeechSettings settings, IGraphLogger logger) : base(pipeline) { var speechConfig = SpeechConfig.FromSubscription(settings.SpeechSubscriptionKey, settings.SpeechRegion); speechConfig.SpeechSynthesisVoiceName = settings.SpeechSynthesisVoiceName; this.synthesizer = new SpeechSynthesizer(speechConfig, null); this.logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="BotService" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="eventPublisher">The event publisher.</param> /// <param name="settings">The settings.</param> public BotService( IGraphLogger logger, IOptions <AzureSettings> settings, IOptions <AzureTextToSpeechSettings> ttsSettings, IOptions <BotSettings> botSettings ) { this._logger = logger; this._botSettings = botSettings.Value; this._settings = settings.Value; this._ttsSettings = ttsSettings.Value; }
public ISLPipeline( IGraphLogger logger, AzureTextToSpeechSettings ttsSettings, BotSettings botSettings, Action <List <AudioMediaBuffer> > sendAudioToBot, Action <byte[]> sendScreenShareToBot) { this.logger = logger; this.ttsSettings = ttsSettings; this.botSettings = botSettings; this.sendAudioToBot = sendAudioToBot; this.sendScreenShareToBot = sendScreenShareToBot; }
/// <summary> /// Initializes a new instance of the <see cref="CallHandler" /> class. /// </summary> /// <param name="statefulCall">The stateful call.</param> /// <param name="settings">The settings.</param> public CallHandler( ICall statefulCall, AzureSettings settings, AzureTextToSpeechSettings ttsSettings, BotSettings botSettings) : base(TimeSpan.FromMinutes(10), statefulCall?.GraphLogger) { _settings = settings; this.Call = statefulCall; this.Call.OnUpdated += this.CallOnUpdated; this.Call.Participants.OnUpdated += this.ParticipantsOnUpdated; foreach (var videoSocket in this.Call.GetLocalMediaSession().VideoSockets) { this.availableSocketIds.Add((uint)videoSocket.SocketId); } this.BotMediaStream = new BotMediaStream(this.Call.GetLocalMediaSession(), this.Call, this.GraphLogger, this._settings, ttsSettings, botSettings); }