mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-01 16:33:43 -04:00
voice notifications and settings UI rework
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
using Observatory.Framework.Files;
|
||||
using Observatory.Framework.Interfaces;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Observatory.PluginManagement
|
||||
{
|
||||
@ -26,6 +27,17 @@ namespace Observatory.PluginManagement
|
||||
{
|
||||
InvokeNativeNotification(title, text);
|
||||
}
|
||||
|
||||
if (Properties.Core.Default.VoiceNotify && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
var speech = new System.Speech.Synthesis.SpeechSynthesizer()
|
||||
{
|
||||
Volume = Properties.Core.Default.VoiceVolume,
|
||||
Rate = Properties.Core.Default.VoiceRate
|
||||
};
|
||||
speech.SelectVoice(Properties.Core.Default.VoiceSelected);
|
||||
speech.SpeakAsync(title + ": " + text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user