From f93835ede596afa934d66353b63aca9c12c71bc6 Mon Sep 17 00:00:00 2001 From: Sandro Hanea Date: Thu, 21 Nov 2024 09:48:08 +0100 Subject: [PATCH 1/7] Bumped dotnet --- .github/workflows/dotnet-maui.yml | 6 +++--- .github/workflows/dotnet.yml | 6 +++--- Directory.Packages.props | 15 +++++++-------- Whisper.net.Demo/Whisper.net.Demo.csproj | 4 ++-- Whisper.net/Whisper.net.csproj | 4 ++-- .../BlazorApp.Client/BlazorApp.Client.csproj | 6 ++---- examples/BlazorApp/BlazorApp/BlazorApp.csproj | 4 ++-- .../ContinuousRecognition.csproj | 3 ++- examples/CoreML/CoreML.csproj | 2 +- examples/Diarization/Diarization.csproj | 2 +- examples/Diarization/Program.cs | 6 +++--- examples/MultiRuntime/MultiRuntime.csproj | 2 +- examples/NAudioMp3/NAudioMp3.csproj | 3 ++- .../NAudioResampleWav/NAudioResampleWav.csproj | 3 ++- examples/NvidiaCuda/NvidiaCuda.csproj | 2 +- examples/OpenVinoExample/OpenVinoExample.csproj | 2 +- .../ParallelExecution/ParallelExecution.csproj | 2 +- examples/Simple/Simple.csproj | 2 +- examples/SimpleSync/SimpleSync.csproj | 2 +- examples/Vulkan/Vulkan.csproj | 2 +- .../Whisper.net.Maui.Tests.csproj | 2 +- tests/Whisper.net.Tests/Whisper.net.Tests.csproj | 6 +++--- 22 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/dotnet-maui.yml b/.github/workflows/dotnet-maui.yml index cd091fbe..24c25b3e 100644 --- a/.github/workflows/dotnet-maui.yml +++ b/.github/workflows/dotnet-maui.yml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: | - 8.0.x + 9.0.x - name: Download Artifacts id: download-artifact @@ -38,14 +38,14 @@ jobs: run: dotnet restore ./Whisper.net.Maui.Tests.sln - name: Publish android build - run: dotnet publish ./tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj -c Debug -f net8.0-android -p:EmbedAssembliesIntoApk=true + run: dotnet publish ./tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj -c Debug -f net9.0-android -p:EmbedAssembliesIntoApk=true - name: Upload apk and ios app uses: actions/upload-artifact@v4 with: name: maui-build-artifacts path: | - ./tests/Whisper.net.Maui.Tests/bin/Debug/net8.0-android/com.companyname.whisper.net.maui.tests-Signed.apk + ./tests/Whisper.net.Maui.Tests/bin/Debug/net9.0-android/com.companyname.whisper.net.maui.tests-Signed.apk dotnet-maui-test-android: runs-on: ubuntu-latest diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 617f2d6c..47c59672 100755 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -18,7 +18,7 @@ jobs: with: dotnet-version: | 8.0.x - 6.0.x + 9.0.x - name: Download Artifacts id: download-artifact @@ -48,7 +48,7 @@ jobs: with: dotnet-version: | 8.0.x - 6.0.x + 9.0.x - name: Download Artifacts id: download-artifact @@ -78,7 +78,7 @@ jobs: with: dotnet-version: | 8.0.x - 6.0.x + 9.0.x - name: Download Artifacts id: download-artifact diff --git a/Directory.Packages.props b/Directory.Packages.props index 604fb881..85a8dbbb 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,24 +2,23 @@ - - + + - - - + - - + + + - + \ No newline at end of file diff --git a/Whisper.net.Demo/Whisper.net.Demo.csproj b/Whisper.net.Demo/Whisper.net.Demo.csproj index d0bf0416..3d9a640a 100644 --- a/Whisper.net.Demo/Whisper.net.Demo.csproj +++ b/Whisper.net.Demo/Whisper.net.Demo.csproj @@ -3,8 +3,8 @@ Exe - net8.0 - 10 + net9.0 + 13 diff --git a/Whisper.net/Whisper.net.csproj b/Whisper.net/Whisper.net.csproj index 2d3491ed..9a31d8de 100755 --- a/Whisper.net/Whisper.net.csproj +++ b/Whisper.net/Whisper.net.csproj @@ -3,7 +3,7 @@ enable enable - 12 + 13 1.7.3 Sandro Hanea Cross-platform dotnet bindings for Whisper. @@ -30,7 +30,7 @@ - net8.0;net6.0;netstandard2.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst;net8.0-android + net8.0;net9.0;netstandard2.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst;net8.0-android diff --git a/examples/BlazorApp/BlazorApp.Client/BlazorApp.Client.csproj b/examples/BlazorApp/BlazorApp.Client/BlazorApp.Client.csproj index 4acc56c6..aecd3888 100644 --- a/examples/BlazorApp/BlazorApp.Client/BlazorApp.Client.csproj +++ b/examples/BlazorApp/BlazorApp.Client/BlazorApp.Client.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable true @@ -10,11 +10,9 @@ - + - - diff --git a/examples/BlazorApp/BlazorApp/BlazorApp.csproj b/examples/BlazorApp/BlazorApp/BlazorApp.csproj index 1c7329ad..d1b54c4b 100644 --- a/examples/BlazorApp/BlazorApp/BlazorApp.csproj +++ b/examples/BlazorApp/BlazorApp/BlazorApp.csproj @@ -1,14 +1,14 @@ - net8.0 + net9.0 enable enable - + diff --git a/examples/ContinuousRecognition/ContinuousRecognition.csproj b/examples/ContinuousRecognition/ContinuousRecognition.csproj index 4284fcf1..38ae74c2 100644 --- a/examples/ContinuousRecognition/ContinuousRecognition.csproj +++ b/examples/ContinuousRecognition/ContinuousRecognition.csproj @@ -2,9 +2,10 @@ Exe - net8.0 + net9.0; net472 enable enable + 13 diff --git a/examples/CoreML/CoreML.csproj b/examples/CoreML/CoreML.csproj index 83f1d250..8fefa2e1 100644 --- a/examples/CoreML/CoreML.csproj +++ b/examples/CoreML/CoreML.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0; net472 12 diff --git a/examples/Diarization/Diarization.csproj b/examples/Diarization/Diarization.csproj index 7dc78140..19d7ec31 100644 --- a/examples/Diarization/Diarization.csproj +++ b/examples/Diarization/Diarization.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable enable diff --git a/examples/Diarization/Program.cs b/examples/Diarization/Program.cs index f3d3690d..a4fd681a 100644 --- a/examples/Diarization/Program.cs +++ b/examples/Diarization/Program.cs @@ -54,11 +54,11 @@ fileStream.Position = headerSize + startSample * frameSize; // Read the wave data for the specified time interval, into the readBuffer. - await fileStream.ReadAsync(readBuffer.AsMemory()); + var read = await fileStream.ReadAsync(readBuffer.AsMemory()); // Process the readBuffer and convert to shorts. - var buffer = new short[bufferSize / 2]; - for (var i = 0; i < buffer.Length; i++) + var buffer = new short[read / 2]; + for (var i = 0; i < read; i++) { // Handle endianess manually and convert bytes to Int16. buffer[i] = BitConverter.IsLittleEndian diff --git a/examples/MultiRuntime/MultiRuntime.csproj b/examples/MultiRuntime/MultiRuntime.csproj index bf16506f..7f72a263 100644 --- a/examples/MultiRuntime/MultiRuntime.csproj +++ b/examples/MultiRuntime/MultiRuntime.csproj @@ -2,7 +2,7 @@ Exe - net8.0; net472 + net9.0; net472 12 diff --git a/examples/NAudioMp3/NAudioMp3.csproj b/examples/NAudioMp3/NAudioMp3.csproj index 3a8042be..7dd632dd 100644 --- a/examples/NAudioMp3/NAudioMp3.csproj +++ b/examples/NAudioMp3/NAudioMp3.csproj @@ -2,8 +2,9 @@ Exe - net8.0 + net9.0; net472 enable + 13 diff --git a/examples/NAudioResampleWav/NAudioResampleWav.csproj b/examples/NAudioResampleWav/NAudioResampleWav.csproj index 7f3bb885..e57745fe 100644 --- a/examples/NAudioResampleWav/NAudioResampleWav.csproj +++ b/examples/NAudioResampleWav/NAudioResampleWav.csproj @@ -2,8 +2,9 @@ Exe - net8.0 + net9.0; net472 enable + 13 diff --git a/examples/NvidiaCuda/NvidiaCuda.csproj b/examples/NvidiaCuda/NvidiaCuda.csproj index e83750f6..15cea434 100644 --- a/examples/NvidiaCuda/NvidiaCuda.csproj +++ b/examples/NvidiaCuda/NvidiaCuda.csproj @@ -2,7 +2,7 @@ Exe - net8.0; net472 + net9.0; net472 12 diff --git a/examples/OpenVinoExample/OpenVinoExample.csproj b/examples/OpenVinoExample/OpenVinoExample.csproj index 6c7313eb..cdb7885c 100644 --- a/examples/OpenVinoExample/OpenVinoExample.csproj +++ b/examples/OpenVinoExample/OpenVinoExample.csproj @@ -2,7 +2,7 @@ Exe - net8.0; net472 + net9.0; net472 12 diff --git a/examples/ParallelExecution/ParallelExecution.csproj b/examples/ParallelExecution/ParallelExecution.csproj index 06d685ef..35c132fc 100644 --- a/examples/ParallelExecution/ParallelExecution.csproj +++ b/examples/ParallelExecution/ParallelExecution.csproj @@ -2,7 +2,7 @@ Exe - net8.0; net472 + net9.0; net472 12 diff --git a/examples/Simple/Simple.csproj b/examples/Simple/Simple.csproj index 06d685ef..35c132fc 100644 --- a/examples/Simple/Simple.csproj +++ b/examples/Simple/Simple.csproj @@ -2,7 +2,7 @@ Exe - net8.0; net472 + net9.0; net472 12 diff --git a/examples/SimpleSync/SimpleSync.csproj b/examples/SimpleSync/SimpleSync.csproj index ddee4a90..066f661b 100644 --- a/examples/SimpleSync/SimpleSync.csproj +++ b/examples/SimpleSync/SimpleSync.csproj @@ -2,7 +2,7 @@ Exe - net8.0; net472 + net9.0; net472 12 diff --git a/examples/Vulkan/Vulkan.csproj b/examples/Vulkan/Vulkan.csproj index 82f7e10d..1a4cb1cb 100644 --- a/examples/Vulkan/Vulkan.csproj +++ b/examples/Vulkan/Vulkan.csproj @@ -2,7 +2,7 @@ Exe - net8.0; net472 + net9.0; net472 12 diff --git a/tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj b/tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj index 1d582f1d..e83e66a6 100644 --- a/tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj +++ b/tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj @@ -2,7 +2,7 @@ - net8.0-android;net8.0-ios;net8.0-maccatalyst + net9.0-android;net9.0-ios;net9.0-maccatalyst