2023-08-25 12:39:31 +00:00
|
|
|
|
using ObjCRuntime;
|
|
|
|
|
using Ryuclaw.Speech.MacOS;
|
2023-08-28 16:38:06 +00:00
|
|
|
|
using Ryuclaw.Audio.Desktop;
|
2023-08-25 12:39:31 +00:00
|
|
|
|
|
|
|
|
|
namespace Ryuclaw.Client.Mac;
|
|
|
|
|
|
|
|
|
|
public partial class ViewController : NSViewController {
|
2023-08-28 16:38:06 +00:00
|
|
|
|
private TTS synth = new TTS();
|
|
|
|
|
private AudioEngine engine = new AudioEngine();
|
|
|
|
|
|
2023-08-25 12:39:31 +00:00
|
|
|
|
protected ViewController (NativeHandle handle) : base (handle)
|
|
|
|
|
{
|
|
|
|
|
// This constructor is required if the view controller is loaded from a xib or a storyboard.
|
|
|
|
|
// Do not put any initialization here, use ViewDidLoad instead.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void ViewDidLoad ()
|
|
|
|
|
{
|
|
|
|
|
base.ViewDidLoad ();
|
|
|
|
|
|
|
|
|
|
// Do any additional setup after loading the view.
|
2023-08-28 16:38:06 +00:00
|
|
|
|
synth.SetVoice("Alex");
|
|
|
|
|
synth.Speak("Rawr, rawr!");
|
|
|
|
|
|
|
|
|
|
engine.Start();
|
2023-08-25 12:39:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override NSObject RepresentedObject {
|
|
|
|
|
get => base.RepresentedObject;
|
|
|
|
|
set {
|
|
|
|
|
base.RepresentedObject = value;
|
|
|
|
|
|
|
|
|
|
// Update the view, if already loaded.
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|