Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
da1eecc
Add voice recognition and TTS support for Linux
MattEqualsCoder Mar 2, 2025
6d0e3a9
Merge branch 'main' into linux-speech-recognition
MattEqualsCoder Mar 2, 2025
7155d2d
Update version
MattEqualsCoder Mar 2, 2025
89e4f4e
Fix freeze when closing and PySpeechService is not setup
MattEqualsCoder Mar 5, 2025
9c1af21
Add volume setting
MattEqualsCoder Mar 14, 2025
1dbd417
Merge remote-tracking branch 'origin/main' into linux-speech-recognition
MattEqualsCoder Mar 14, 2025
077d733
Fix issues from merge
MattEqualsCoder Mar 14, 2025
a3a1859
Merge branch 'main' into linux-speech-recognition
MattEqualsCoder Mar 17, 2025
8f038d6
Fix tracker sprite not updating
MattEqualsCoder Mar 18, 2025
33af914
Merge branch 'main' into linux-speech-recognition
MattEqualsCoder Mar 20, 2025
87d9686
Merge branch 'main' into linux-speech-recognition
MattEqualsCoder Mar 24, 2025
bb59586
Update PyTextToSpeechCommunicator to match recent changes
MattEqualsCoder Mar 28, 2025
fd7ba71
Merge branch 'main' into linux-speech-recognition
MattEqualsCoder Mar 28, 2025
f94ace5
Updates for split nuget packages
MattEqualsCoder Mar 29, 2025
0832a48
Cleanup abstractions project
MattEqualsCoder Mar 29, 2025
24d3030
Update documentation and nuget package
MattEqualsCoder Mar 31, 2025
1ac281b
Update readme and remove test branch from GitHub action
MattEqualsCoder Mar 31, 2025
b317a4b
Fix PySpeechService communicator not combining item tracking
MattEqualsCoder Apr 2, 2025
4e95989
Add documentation around custom voice models
MattEqualsCoder Apr 2, 2025
355c7b5
Merge branch 'main' into linux-speech-recognition
MattEqualsCoder Apr 2, 2025
a6d7ec4
Cleanup log statements
MattEqualsCoder Apr 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
281 changes: 140 additions & 141 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,157 +2,156 @@ name: .NET Build + Test + Publish

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Download config repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasConfigs
path: configs
ref: main
- name: Download sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasSprites
path: sprites
ref: main
- name: Download tracker sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/TrackerSprites
path: trackersprites
ref: main
- name: Download git trees
if: ${{ github.event_name != 'pull_request' }}
shell: pwsh
env:
- uses: actions/checkout@v4
- name: Download config repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasConfigs
path: configs
ref: main
- name: Download sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasSprites
path: sprites
ref: main
- name: Download tracker sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/TrackerSprites
path: trackersprites
ref: main
- name: Download git trees
if: ${{ github.event_name != 'pull_request' }}
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$headers = @{
Authorization="Bearer $Env:GH_TOKEN"
}
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/SMZ3CasSprites/git/trees/main?recursive=1 -OutFile sprites/Sprites/sprites.json -Headers $headers
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/TrackerSprites/git/trees/main?recursive=1 -OutFile trackersprites/tracker-sprites.json -Headers $headers
Remove-Item -LiteralPath "trackersprites/.git" -Force -Recurse
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -p:PostBuildEvent=
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish Windows 64bit
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish --os win --arch x64 -c Release --self-contained false src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Publish Windows 32bit
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish --os win --arch x86 -c Release --self-contained false src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Get version number
if: ${{ github.event_name != 'pull_request' }}
id: version
run: |
$version = (Get-Item "src\TrackerCouncil.Smz3.UI\bin\Release\net8.0\win-x86\publish\SMZ3CasRandomizer.exe").VersionInfo.ProductVersion
$version = $version -replace "\+.*", ""
Write-Output "number=$version" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Publish Linux 64bit
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish --os linux --arch x64 -c Release --self-contained false src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Publish Multiplayer Server
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish -c Release --self-contained false src//TrackerCouncil.Smz3.Multiplayer.Server//TrackerCouncil.Smz3.Multiplayer.Server.csproj
- name: Building the Windows installer
if: ${{ github.event_name != 'pull_request' }}
run: "\"%programfiles(x86)%/Inno Setup 6/iscc.exe\" \"setup/randomizer.app.iss\""
shell: cmd
- name: Building the Linux 64bit package
if: ${{ github.event_name != 'pull_request' }}
working-directory: setup
run: "./LinuxBuildZipper.ps1"
shell: pwsh
- name: Building the Multiplayer Server package
if: ${{ github.event_name != 'pull_request' }}
working-directory: setup
run: "./MultiplayerServerZipper.ps1"
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'pull_request' }}
with:
path: "setup/Output/*"
name: SMZ3CasRandomizer_${{ steps.version.outputs.number }}
run: |
$headers = @{
Authorization="Bearer $Env:GH_TOKEN"
}
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/SMZ3CasSprites/git/trees/main?recursive=1 -OutFile sprites/Sprites/sprites.json -Headers $headers
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/TrackerSprites/git/trees/main?recursive=1 -OutFile trackersprites/tracker-sprites.json -Headers $headers
Remove-Item -LiteralPath "trackersprites/.git" -Force -Recurse
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -p:PostBuildEvent=
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish Windows 64bit
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish --os win --arch x64 -c Release --self-contained false src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Publish Windows 32bit
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish --os win --arch x86 -c Release --self-contained false src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Get version number
if: ${{ github.event_name != 'pull_request' }}
id: version
run: |
$version = (Get-Item "src\TrackerCouncil.Smz3.UI\bin\Release\net8.0\win-x86\publish\SMZ3CasRandomizer.exe").VersionInfo.ProductVersion
$version = $version -replace "\+.*", ""
Write-Output "number=$version" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Publish Linux 64bit
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish --os linux --arch x64 -c Release --self-contained false src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Publish Multiplayer Server
if: ${{ github.event_name != 'pull_request' }}
run: dotnet publish -c Release --self-contained false src//TrackerCouncil.Smz3.Multiplayer.Server//TrackerCouncil.Smz3.Multiplayer.Server.csproj
- name: Building the Windows installer
if: ${{ github.event_name != 'pull_request' }}
run: '"%programfiles(x86)%/Inno Setup 6/iscc.exe" "setup/randomizer.app.iss"'
shell: cmd
- name: Building the Linux 64bit package
if: ${{ github.event_name != 'pull_request' }}
working-directory: setup
run: "./LinuxBuildZipper.ps1"
shell: pwsh
- name: Building the Multiplayer Server package
if: ${{ github.event_name != 'pull_request' }}
working-directory: setup
run: "./MultiplayerServerZipper.ps1"
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'pull_request' }}
with:
path: "setup/Output/*"
name: SMZ3CasRandomizer_${{ steps.version.outputs.number }}
build-mac:
runs-on: macos-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Download config repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasConfigs
path: configs
ref: main
- name: Download sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasSprites
path: sprites
ref: main
- name: Download tracker sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/TrackerSprites
path: trackersprites
ref: main
- name: Download git trees
if: ${{ github.event_name != 'pull_request' }}
shell: pwsh
env:
- uses: actions/checkout@v4
- name: Download config repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasConfigs
path: configs
ref: main
- name: Download sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/SMZ3CasSprites
path: sprites
ref: main
- name: Download tracker sprite repo
uses: actions/checkout@v4
with:
repository: TheTrackerCouncil/TrackerSprites
path: trackersprites
ref: main
- name: Download git trees
if: ${{ github.event_name != 'pull_request' }}
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$headers = @{
Authorization="Bearer $Env:GH_TOKEN"
}
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/SMZ3CasSprites/git/trees/main?recursive=1 -OutFile sprites/Sprites/sprites.json -Headers $headers
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/TrackerSprites/git/trees/main?recursive=1 -OutFile trackersprites/tracker-sprites.json -Headers $headers
Remove-Item -LiteralPath "trackersprites/.git" -Force -Recurse
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Build
run: dotnet build --no-restore -p:PostBuildEvent= src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Publish
run: dotnet publish -r osx-arm64 --configuration Release -p:UseAppHost=true src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Get version number
id: version
run: |
$version = (Get-Item "src\TrackerCouncil.Smz3.UI\bin\Release\net8.0\osx-arm64\publish\SMZ3CasRandomizer.dll").VersionInfo.ProductVersion
$version = $version -replace "\+.*", ""
$versionShort = $version -replace "\-.*", ""
(Get-Content setup/Info.plist).Replace('%FULL_VERSION%', $version).Replace('%SHORT_VERSION%', $versionShort) | Set-Content setup/Info.plist
Write-Output "number=$version" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Prepare packaging script
run: |
chmod +x ./setup/package-macos-app.sh
./setup/package-macos-app.sh "${{ steps.version.outputs.number }}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: "setup/output/*"
name: SMZ3CasRandomizerMacOS_${{ steps.version.outputs.number }}
run: |
$headers = @{
Authorization="Bearer $Env:GH_TOKEN"
}
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/SMZ3CasSprites/git/trees/main?recursive=1 -OutFile sprites/Sprites/sprites.json -Headers $headers
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/TrackerSprites/git/trees/main?recursive=1 -OutFile trackersprites/tracker-sprites.json -Headers $headers
Remove-Item -LiteralPath "trackersprites/.git" -Force -Recurse
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Build
run: dotnet build --no-restore -p:PostBuildEvent= src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Publish
run: dotnet publish -r osx-arm64 --configuration Release -p:UseAppHost=true src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
- name: Get version number
id: version
run: |
$version = (Get-Item "src\TrackerCouncil.Smz3.UI\bin\Release\net8.0\osx-arm64\publish\SMZ3CasRandomizer.dll").VersionInfo.ProductVersion
$version = $version -replace "\+.*", ""
$versionShort = $version -replace "\-.*", ""
(Get-Content setup/Info.plist).Replace('%FULL_VERSION%', $version).Replace('%SHORT_VERSION%', $versionShort) | Set-Content setup/Info.plist
Write-Output "number=$version" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Prepare packaging script
run: |
chmod +x ./setup/package-macos-app.sh
./setup/package-macos-app.sh "${{ steps.version.outputs.number }}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: "setup/output/*"
name: SMZ3CasRandomizerMacOS_${{ steps.version.outputs.number }}
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,24 @@ In addition to making IBJ completely optional, there is also:
- Sprites made by members of [Diabetus’](https://twitch.tv/the_betus) community and others;

> [!NOTE]
> Voice recognition and text-to-speech functionality is currently only available on Windows.
> Voice recognition and text-to-speech functionality currently only has native support available on Windows. Linux users can use the [PySpeechService application](https://github.com/MattEqualsCoder/PySpeechService) for voice recognition and text-to-speech.

## Installation

### Windows
- Download the latest version from the [GitHub releases] and run the installer

### Linux
- Install [.NET 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- Download the latest version from the [GitHub releases] and extract into the desired folder
- Make the SMZ3CasRandomizer file executable and run it
- (Optional) Download or install the [PySpeechService application](https://github.com/MattEqualsCoder/PySpeechService) for voice recognition and text-to-speech
- Note that if you want custom Piper voices, you will need to add the following [Piper speech files](https://huggingface.co/rhasspy/piper-voices/tree/main/en) to `~/.local/share/SMZ3CasRandomizer/PiperModels/`:
- Tracker_Female.json
- Tracker_Female.onnx
- Tracker_Male.json
- Tracker_Male.onnx

### Mac
- Install [.NET 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- Download the latest version from the [GitHub releases] and move to the desired folder
Expand Down
7 changes: 7 additions & 0 deletions src/TrackerCouncil.Smz3.Data.SchemaGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static class Program
(typeof(RewardConfig), "rewards.json"),
(typeof(RoomConfig), "rooms.json"),
(typeof(UIConfig), "ui.json"),
(typeof(MetadataConfig), "metadata.json"),
};

private static IServiceProvider? _services;
Expand Down Expand Up @@ -219,6 +220,12 @@ private static void CreateTemplates(string outputPath)
var templateUIConfig = new UIConfig() { new("Layout Name", new List<UIGridLocation> { new() { Identifiers = new List<string> { "" }, Column = 1, Row = 1 } }) };
var exampleUIConfig = UIConfig.Example();
WriteTemplate(templatePath, "ui", templateUIConfig, exampleUIConfig);

// Metadata Template
var templateMetadataConfig = new MetadataConfig() { };
PopulateExample(templateResponseConfig, true);
var exampleMetadataConfig = MetadataConfig.Example();
WriteTemplate(templatePath, "metadata", templateMetadataConfig, exampleMetadataConfig);
}

private static void WriteTemplate(string templatePath, string type, object data, object? example)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ public static BossConfig Default()
new BossInfo("Ridley") { Type = BossType.Ridley, MemoryAddress = 2, MemoryFlag = 0x1, },
new BossInfo("Mother Brain") { Type = BossType.MotherBrain },
new BossInfo("Bomb Torizo") { MemoryAddress = 0, MemoryFlag = 0x4, },
new BossInfo("Golden Torizo") { MemoryAddress = 2, MemoryFlag = 0x4, }

new BossInfo("Golden Torizo") { MemoryAddress = 2, MemoryFlag = 0x4, },
new BossInfo("Castle Guard") { Type = BossType.CastleGuard },
new BossInfo("Armos Knights") { Type = BossType.ArmosKnights },
new BossInfo("Moldorm") { Type = BossType.Moldorm },
new BossInfo("Lanmolas") { Type = BossType.Lanmolas },
new BossInfo("Agahnim") { Type = BossType.Agahnim },
new BossInfo("Helmasaur King") { Type = BossType.HelmasaurKing },
new BossInfo("Arrghus") { Type = BossType.Arrghus },
new BossInfo("Blind") { Type = BossType.Blind },
new BossInfo("Mothula") { Type = BossType.Mothula },
new BossInfo("Kholdstare") { Type = BossType.Kholdstare },
new BossInfo("Vitreous") { Type = BossType.Vitreous },
new BossInfo("Trinexx") { Type = BossType.Trinexx },
new BossInfo("Ganon") { Type = BossType.Ganon },
];
}

Expand Down
Loading