commit 06c521a9818f7ccea27f201675ff611e81862ec1 Author: Talon Date: Fri Aug 25 14:39:31 2023 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92275db --- /dev/null +++ b/.gitignore @@ -0,0 +1,405 @@ +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# content below from: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ \ No newline at end of file diff --git a/Ryuclaw.Audio.Desktop/Class1.cs b/Ryuclaw.Audio.Desktop/Class1.cs new file mode 100644 index 0000000..0409fc1 --- /dev/null +++ b/Ryuclaw.Audio.Desktop/Class1.cs @@ -0,0 +1,7 @@ +namespace Ryuclaw.Audio.Desktop; + +public class Class1 +{ + +} + diff --git a/Ryuclaw.Audio.Desktop/Ryuclaw.Audio.Desktop.csproj b/Ryuclaw.Audio.Desktop/Ryuclaw.Audio.Desktop.csproj new file mode 100644 index 0000000..2a2a25d --- /dev/null +++ b/Ryuclaw.Audio.Desktop/Ryuclaw.Audio.Desktop.csproj @@ -0,0 +1,12 @@ + + + + net7.0 + enable + enable + + + + + + diff --git a/Ryuclaw.Client.Mac/AppDelegate.cs b/Ryuclaw.Client.Mac/AppDelegate.cs new file mode 100644 index 0000000..7693315 --- /dev/null +++ b/Ryuclaw.Client.Mac/AppDelegate.cs @@ -0,0 +1,15 @@ +namespace Ryuclaw.Client.Mac; + +[Register ("AppDelegate")] +public class AppDelegate : NSApplicationDelegate { + public override void DidFinishLaunching (NSNotification notification) + { + // Insert code here to initialize your application + } + + public override void WillTerminate (NSNotification notification) + { + // Insert code here to tear down your application + } +} + diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Contents.json b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9d7519f --- /dev/null +++ b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,70 @@ +{ + "images": [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16", + "filename": "Icon16.png" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16", + "filename": "Icon32.png" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32", + "filename": "Icon32.png" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32", + "filename": "Icon64.png" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128", + "filename": "Icon128.png" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128", + "filename": "Icon256.png" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256", + "filename": "Icon256.png" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256", + "filename": "Icon512.png" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512", + "filename": "Icon512.png" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512", + "filename": "Icon1024.png" + } + ], + "info": { + "version": 1, + "author": "xcode" + }, +} + + diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon1024.png b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon1024.png new file mode 100644 index 0000000..d76627d Binary files /dev/null and b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon1024.png differ diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon128.png b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon128.png new file mode 100644 index 0000000..0f75ad9 Binary files /dev/null and b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon128.png differ diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon16.png b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon16.png new file mode 100644 index 0000000..fbbb187 Binary files /dev/null and b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon16.png differ diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon256.png b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon256.png new file mode 100644 index 0000000..5233b44 Binary files /dev/null and b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon256.png differ diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon32.png b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon32.png new file mode 100644 index 0000000..5ac1816 Binary files /dev/null and b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon32.png differ diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon512.png b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon512.png new file mode 100644 index 0000000..b152227 Binary files /dev/null and b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon512.png differ diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon64.png b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon64.png new file mode 100644 index 0000000..5c497ad Binary files /dev/null and b/Ryuclaw.Client.Mac/Assets.xcassets/AppIcon.appiconset/Icon64.png differ diff --git a/Ryuclaw.Client.Mac/Assets.xcassets/Contents.json b/Ryuclaw.Client.Mac/Assets.xcassets/Contents.json new file mode 100644 index 0000000..dd87896 --- /dev/null +++ b/Ryuclaw.Client.Mac/Assets.xcassets/Contents.json @@ -0,0 +1,7 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} + diff --git a/Ryuclaw.Client.Mac/Entitlements.plist b/Ryuclaw.Client.Mac/Entitlements.plist new file mode 100644 index 0000000..9ae5993 --- /dev/null +++ b/Ryuclaw.Client.Mac/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/Ryuclaw.Client.Mac/Info.plist b/Ryuclaw.Client.Mac/Info.plist new file mode 100644 index 0000000..84c36d5 --- /dev/null +++ b/Ryuclaw.Client.Mac/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleName + Ryuclaw.Client.Mac + CFBundleIdentifier + com.companyname.Ryuclaw.Client.Mac + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + CFBundleDevelopmentRegion + en + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + NSHumanReadableCopyright + ${AuthorCopyright:HtmlEncode} + NSPrincipalClass + NSApplication + NSMainStoryboardFile + Main + XSAppIconAssets + Assets.xcassets/AppIcon.appiconset + + diff --git a/Ryuclaw.Client.Mac/Main.cs b/Ryuclaw.Client.Mac/Main.cs new file mode 100644 index 0000000..6f94f6c --- /dev/null +++ b/Ryuclaw.Client.Mac/Main.cs @@ -0,0 +1,6 @@ +using Ryuclaw.Client.Mac; + +// This is the main entry point of the application. +NSApplication.Init (); +NSApplication.Main (args); + diff --git a/Ryuclaw.Client.Mac/Main.storyboard b/Ryuclaw.Client.Mac/Main.storyboard new file mode 100644 index 0000000..4305792 --- /dev/null +++ b/Ryuclaw.Client.Mac/Main.storyboard @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ryuclaw.Client.Mac/Ryuclaw.Client.Mac.csproj b/Ryuclaw.Client.Mac/Ryuclaw.Client.Mac.csproj new file mode 100644 index 0000000..8598972 --- /dev/null +++ b/Ryuclaw.Client.Mac/Ryuclaw.Client.Mac.csproj @@ -0,0 +1,21 @@ + + + net7.0-macos + Exe + enable + true + 10.14 + + + false + false + + + false + false + + + + + + diff --git a/Ryuclaw.Client.Mac/ViewController.cs b/Ryuclaw.Client.Mac/ViewController.cs new file mode 100644 index 0000000..5a4b694 --- /dev/null +++ b/Ryuclaw.Client.Mac/ViewController.cs @@ -0,0 +1,32 @@ +using ObjCRuntime; +using Ryuclaw.Speech.MacOS; + +namespace Ryuclaw.Client.Mac; + +public partial class ViewController : NSViewController { + private TTS synth; + 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. + synth = new TTS(); + synth.Speak("Rawr, world!"); + } + + public override NSObject RepresentedObject { + get => base.RepresentedObject; + set { + base.RepresentedObject = value; + + // Update the view, if already loaded. + } + } +} + diff --git a/Ryuclaw.Client.Mac/ViewController.designer.cs b/Ryuclaw.Client.Mac/ViewController.designer.cs new file mode 100644 index 0000000..10823e3 --- /dev/null +++ b/Ryuclaw.Client.Mac/ViewController.designer.cs @@ -0,0 +1,16 @@ +// WARNING +// +// This file has been generated automatically by Visual Studio to store outlets and +// actions made in the UI designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// + +namespace Ryuclaw.Client.Mac; + +[Register ("ViewController")] +partial class ViewController { + void ReleaseDesignerOutlets () + { + } +} + diff --git a/Ryuclaw.Core/Class1.cs b/Ryuclaw.Core/Class1.cs new file mode 100644 index 0000000..fc641e8 --- /dev/null +++ b/Ryuclaw.Core/Class1.cs @@ -0,0 +1,7 @@ +namespace Ryuclaw.Core; + +public class Class1 +{ + +} + diff --git a/Ryuclaw.Core/Ryuclaw.Core.csproj b/Ryuclaw.Core/Ryuclaw.Core.csproj new file mode 100644 index 0000000..601ac86 --- /dev/null +++ b/Ryuclaw.Core/Ryuclaw.Core.csproj @@ -0,0 +1,15 @@ + + + + net7.0 + enable + enable + + + + + + + + + diff --git a/Ryuclaw.Mac.sln b/Ryuclaw.Mac.sln new file mode 100644 index 0000000..5d16a62 --- /dev/null +++ b/Ryuclaw.Mac.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 25.0.1706.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryuclaw.Core", "Ryuclaw.Core\Ryuclaw.Core.csproj", "{C61EB08C-53CF-4601-AA12-FD67906E04AB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryuclaw.Shared", "Ryuclaw.Shared\Ryuclaw.Shared.csproj", "{D9A56B6D-E6BC-401F-AC63-892355347132}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryuclaw.Speech.MacOS", "Ryuclaw.Speech.MacOS\Ryuclaw.Speech.MacOS.csproj", "{9A2D1A3A-21C5-4628-94A8-700B15898C4F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryuclaw.Audio.Desktop", "Ryuclaw.Audio.Desktop\Ryuclaw.Audio.Desktop.csproj", "{D0638E02-6D08-43FB-A976-FA0E9912EAF3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryuclaw.Client.Mac", "Ryuclaw.Client.Mac\Ryuclaw.Client.Mac.csproj", "{0C6AE29F-C44B-4876-ABE9-D36C79158BBD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C61EB08C-53CF-4601-AA12-FD67906E04AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C61EB08C-53CF-4601-AA12-FD67906E04AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C61EB08C-53CF-4601-AA12-FD67906E04AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C61EB08C-53CF-4601-AA12-FD67906E04AB}.Release|Any CPU.Build.0 = Release|Any CPU + {D9A56B6D-E6BC-401F-AC63-892355347132}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9A56B6D-E6BC-401F-AC63-892355347132}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9A56B6D-E6BC-401F-AC63-892355347132}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9A56B6D-E6BC-401F-AC63-892355347132}.Release|Any CPU.Build.0 = Release|Any CPU + {9A2D1A3A-21C5-4628-94A8-700B15898C4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A2D1A3A-21C5-4628-94A8-700B15898C4F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A2D1A3A-21C5-4628-94A8-700B15898C4F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A2D1A3A-21C5-4628-94A8-700B15898C4F}.Release|Any CPU.Build.0 = Release|Any CPU + {D0638E02-6D08-43FB-A976-FA0E9912EAF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0638E02-6D08-43FB-A976-FA0E9912EAF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0638E02-6D08-43FB-A976-FA0E9912EAF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0638E02-6D08-43FB-A976-FA0E9912EAF3}.Release|Any CPU.Build.0 = Release|Any CPU + {0C6AE29F-C44B-4876-ABE9-D36C79158BBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C6AE29F-C44B-4876-ABE9-D36C79158BBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C6AE29F-C44B-4876-ABE9-D36C79158BBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C6AE29F-C44B-4876-ABE9-D36C79158BBD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EA66C6E2-58BC-43AC-8B74-4E7F8883046E} + EndGlobalSection +EndGlobal diff --git a/Ryuclaw.Shared/Audio/IAudioCache.cs b/Ryuclaw.Shared/Audio/IAudioCache.cs new file mode 100644 index 0000000..69b198c --- /dev/null +++ b/Ryuclaw.Shared/Audio/IAudioCache.cs @@ -0,0 +1,10 @@ +using System; +namespace Ryuclaw.Shared.Audio +{ + public interface IAudioCache + { + public IAudioSource Get(string name); + public void Set(string name, IAudioSource source); + } +} + diff --git a/Ryuclaw.Shared/Audio/IAudioEngine.cs b/Ryuclaw.Shared/Audio/IAudioEngine.cs new file mode 100644 index 0000000..484d472 --- /dev/null +++ b/Ryuclaw.Shared/Audio/IAudioEngine.cs @@ -0,0 +1,16 @@ +using System; +using System.Numerics; + +namespace Ryuclaw.Shared.Audio +{ + public interface IAudioEngine + { + public bool Start(); + public void Stop(); + public void Update(float dt); + public void SetListenerPosition(Vector3 position); + public void SetListenerOrientation(Vector3 forward, Vector3 up); + public IAudioSource CreateSource(string name); + } +} + diff --git a/Ryuclaw.Shared/Audio/IAudioSource.cs b/Ryuclaw.Shared/Audio/IAudioSource.cs new file mode 100644 index 0000000..7054bba --- /dev/null +++ b/Ryuclaw.Shared/Audio/IAudioSource.cs @@ -0,0 +1,14 @@ +using System; +using System.Numerics; + +namespace Ryuclaw.Shared.Audio +{ + public interface IAudioSource + { + public void Play(); + public void Stop(); + public void Update(float dt); + public void SetPosition(Vector3 position); + } +} + diff --git a/Ryuclaw.Shared/Class1.cs b/Ryuclaw.Shared/Class1.cs new file mode 100644 index 0000000..ad7e06e --- /dev/null +++ b/Ryuclaw.Shared/Class1.cs @@ -0,0 +1,7 @@ +namespace Ryuclaw.Shared; + +public class Class1 +{ + +} + diff --git a/Ryuclaw.Shared/Ryuclaw.Shared.csproj b/Ryuclaw.Shared/Ryuclaw.Shared.csproj new file mode 100644 index 0000000..29e05ae --- /dev/null +++ b/Ryuclaw.Shared/Ryuclaw.Shared.csproj @@ -0,0 +1,19 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + diff --git a/Ryuclaw.Shared/Speech/ISpeech.cs b/Ryuclaw.Shared/Speech/ISpeech.cs new file mode 100644 index 0000000..66da605 --- /dev/null +++ b/Ryuclaw.Shared/Speech/ISpeech.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace Ryuclaw.Shared.Speech +{ + public interface ISpeech + { + public void SetRate(float rate); + public void SetPitch(float pitch); + public List GetVoices(); + public void SetVoice(string name); + public void Speak(string text); + public void Stop(); + + } +} + diff --git a/Ryuclaw.Speech.MacOS/Ryuclaw.Speech.MacOS.csproj b/Ryuclaw.Speech.MacOS/Ryuclaw.Speech.MacOS.csproj new file mode 100644 index 0000000..3413bbe --- /dev/null +++ b/Ryuclaw.Speech.MacOS/Ryuclaw.Speech.MacOS.csproj @@ -0,0 +1,18 @@ + + + net7.0-macos + enable + true + + + false + false + + + false + false + + + + + diff --git a/Ryuclaw.Speech.MacOS/TTS.cs b/Ryuclaw.Speech.MacOS/TTS.cs new file mode 100644 index 0000000..0e73a90 --- /dev/null +++ b/Ryuclaw.Speech.MacOS/TTS.cs @@ -0,0 +1,72 @@ +using Ryuclaw.Shared.Speech; +using AVFoundation; + +namespace Ryuclaw.Speech.MacOS { + + public class TTS : ISpeech { + private float Rate { get; set; } + private float Pitch { get; set; } + private AVSpeechSynthesizer Synth; + private AVSpeechSynthesisVoice Voice; + + public TTS() + { + Synth = new AVSpeechSynthesizer(); + Rate = 1; + Pitch = 1; + Voice = AVSpeechSynthesisVoice.FromIdentifier(AVSpeechSynthesisVoice.IdentifierAlex); + + } + + public void SetRate(float rate) + { + Rate = rate; + } + + public void SetPitch(float pitch) + { + Pitch = pitch; + } + + public List GetVoices() + { + var availableVoices = AVSpeechSynthesisVoice.GetSpeechVoices(); + List voices = new(); + foreach (var voice in availableVoices) + { + voices.Add(voice.Name); + } + return null; + } + + public void SetVoice(string name) + { + foreach (var voice in AVSpeechSynthesisVoice.GetSpeechVoices()) + { + if (voice.Name.Equals(name)) + { + Voice = voice; + return; + } + } + Voice = AVSpeechSynthesisVoice.FromIdentifier(AVSpeechSynthesisVoice.IdentifierAlex); + } + + public void Speak(string text) + { + var utterance = new AVSpeechUtterance(text); + utterance.Rate = Rate; + utterance.PitchMultiplier = Pitch; + utterance.Voice = Voice; + utterance.PrefersAssistiveTechnologySettings = true; + + Synth.SpeakUtterance(utterance); + } + + public void Stop() + { + Synth.StopSpeaking(AVSpeechBoundary.Immediate); + } + + } +}