From b9d37ebb4fae254000d3d82c685fe6b38c8e4167 Mon Sep 17 00:00:00 2001 From: Ian Lavery Date: Tue, 17 Oct 2023 13:39:38 -0700 Subject: [PATCH] reset --- .github/workflows/dotnet-demos.yml | 56 +++++++++++++++++++++++++++ sdk/dotnet/Picovoice/Picovoice.cs | 2 +- sdk/dotnet/Picovoice/Picovoice.csproj | 6 +-- sdk/dotnet/PicovoiceTest/MainTest.cs | 8 ++-- 4 files changed, 63 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dotnet-demos.yml b/.github/workflows/dotnet-demos.yml index 47662081f..05be347c7 100644 --- a/.github/workflows/dotnet-demos.yml +++ b/.github/workflows/dotnet-demos.yml @@ -44,6 +44,34 @@ jobs: with: dotnet-version: 6.0.x + # *********** REMOVE AFTER RELEASE ********************** + - name: mkdir NuGet directory + run: mkdir -p ~/.nuget/NuGet/local-nuget + + - name: Add local NuGet source + run: dotnet nuget add source local-nuget + + - name: Pack Porcupine for local ref + run: dotnet pack -c Release + working-directory: resources/porcupine/binding/dotnet + + - name: Copy Porcupine Nuget + run: cp ../../../resources/porcupine/binding/dotnet/Porcupine/bin/Release/*.nupkg ~/.nuget/NuGet/local-nuget + + - name: Pack Rhino for local ref + run: dotnet pack -c Release + working-directory: resources/rhino/binding/dotnet + + - name: Copy Rhino Nuget + run: cp ../../../resources/rhino/binding/dotnet/Rhino/bin/Release/*.nupkg ~/.nuget/NuGet/local-nuget + + - name: Pack Picovoice for local ref + run: dotnet pack ../../../sdk/dotnet/Picovoice/Picovoice.csproj -c Release + + - name: Copy Picovoice Nuget + run: cp ../../../sdk/dotnet/Picovoice/bin/Release/*.nupkg ~/.nuget/NuGet/local-nuget + # ****************************************************** + - name: Dotnet build micdemo run: dotnet build -c MicDemo.Release -v n @@ -84,6 +112,34 @@ jobs: with: submodules: recursive + # *********** REMOVE AFTER RELEASE ********************** + - name: mkdir NuGet directory + run: mkdir -p ~/.nuget/NuGet/local-nuget + + - name: Add local NuGet source + run: dotnet nuget add source local-nuget + + - name: Pack Porcupine for local ref + run: dotnet pack -c Release + working-directory: resources/porcupine/binding/dotnet + + - name: Copy Porcupine Nuget + run: cp ../../../resources/porcupine/binding/dotnet/Porcupine/bin/Release/*.nupkg ~/.nuget/NuGet/local-nuget + + - name: Pack Rhino for local ref + run: dotnet pack -c Release + working-directory: resources/rhino/binding/dotnet + + - name: Copy Rhino Nuget + run: cp ../../../resources/rhino/binding/dotnet/Rhino/bin/Release/*.nupkg ~/.nuget/NuGet/local-nuget + + - name: Pack Picovoice for local ref + run: dotnet pack ../../../sdk/dotnet/Picovoice/Picovoice.csproj -c Release + + - name: Copy Picovoice Nuget + run: cp ../../../sdk/dotnet/Picovoice/bin/Release/*.nupkg ~/.nuget/NuGet/local-nuget + # ****************************************************** + - name: Dotnet build micdemo run: dotnet build -c MicDemo.Release -v n diff --git a/sdk/dotnet/Picovoice/Picovoice.cs b/sdk/dotnet/Picovoice/Picovoice.cs index c7e05cfe0..c2d4cd4d8 100644 --- a/sdk/dotnet/Picovoice/Picovoice.cs +++ b/sdk/dotnet/Picovoice/Picovoice.cs @@ -230,7 +230,7 @@ public void Process(short[] pcm) /// /// Resets the internal state of Picovoice. It should be called before processing a new stream of audio - /// or when process was stopped while processing a stream of audio. + /// or when Picovoice was stopped while processing a stream of audio. /// public void Reset() { diff --git a/sdk/dotnet/Picovoice/Picovoice.csproj b/sdk/dotnet/Picovoice/Picovoice.csproj index f811d2aa0..3db73cdb8 100644 --- a/sdk/dotnet/Picovoice/Picovoice.csproj +++ b/sdk/dotnet/Picovoice/Picovoice.csproj @@ -1,7 +1,7 @@  net6.0;netcoreapp3.0;netstandard2.0 - 2.2.2 + 3.0.0 Picovoice Picovoice End-to-End Platform @@ -35,10 +35,10 @@ - + analyzers - + analyzers diff --git a/sdk/dotnet/PicovoiceTest/MainTest.cs b/sdk/dotnet/PicovoiceTest/MainTest.cs index 6ca70d7f6..567eeeadb 100644 --- a/sdk/dotnet/PicovoiceTest/MainTest.cs +++ b/sdk/dotnet/PicovoiceTest/MainTest.cs @@ -182,20 +182,18 @@ public void RunTestCase(string audioFileName, string expectedIntent, Dictionary< [TestMethod] public void TestReset() - { - void callback() => _picovoice.Reset(); - + { _picovoice = Picovoice.Create( _accessKey, GetKeywordPath("en", "picovoice"), - callback, + () => _picovoice.Reset(), GetContextPath("en", "coffee_maker"), _inferenceCallback); _inference = null; ProcessFileHelper("picovoice-coffee.wav"); - Assert.Null(_inference); + Assert.IsNull(_inference); } [TestMethod]