Commit eb66bfe6 authored by Ondřej Pavlica's avatar Ondřej Pavlica
Browse files

Removed NWaves dependency between projects, upgraded to .NET Standard 2.1

parent 80b2569c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -354,3 +354,4 @@ MigrationBackup/

!libs/FFMpegCore/FFMPEG/bin/presets/**
!src/Api/FFMPEG/**
!fiddles/Test.Forms/FFMPEG/**
 No newline at end of file
+7 −7
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFmpegDecoder", "src\Decode
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFMpegCore", "libs\FFMpegCore\FFMpegCore.csproj", "{3419E361-A357-4DFD-A8FF-7A10FF32E2D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Forms", "fiddles\Test.Forms\Test.Forms.csproj", "{087E26D5-E73F-4370-9620-7181C765A23C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{EAEEFE81-0DDD-46AD-B295-EF00BF987A49}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VoiceActivityDetector", "src\Utilities\VoiceActivityDetector\VoiceActivityDetector.csproj", "{40AB92F4-3535-4C91-BA6E-555597FF9623}"
@@ -55,7 +53,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AverageVolumeJump", "src\Gr
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Preprocessors", "Preprocessors", "{93698D5B-8316-45AD-8B9F-2A65721C4706}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DialToneCutter", "src\Preprocessors\DialToneCutter\DialToneCutter.csproj", "{C2BD219D-9BDA-4D13-8A3B-EFEF8C520680}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DialToneCutter", "src\Preprocessors\DialToneCutter\DialToneCutter.csproj", "{C2BD219D-9BDA-4D13-8A3B-EFEF8C520680}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Forms", "fiddles\Test.Forms\Test.Forms.csproj", "{1FA18C7F-C5FE-4B0A-81A4-597FDCB64177}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -91,10 +91,6 @@ Global
		{3419E361-A357-4DFD-A8FF-7A10FF32E2D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{3419E361-A357-4DFD-A8FF-7A10FF32E2D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{3419E361-A357-4DFD-A8FF-7A10FF32E2D7}.Release|Any CPU.Build.0 = Release|Any CPU
		{087E26D5-E73F-4370-9620-7181C765A23C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{087E26D5-E73F-4370-9620-7181C765A23C}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{087E26D5-E73F-4370-9620-7181C765A23C}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{087E26D5-E73F-4370-9620-7181C765A23C}.Release|Any CPU.Build.0 = Release|Any CPU
		{40AB92F4-3535-4C91-BA6E-555597FF9623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{40AB92F4-3535-4C91-BA6E-555597FF9623}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{40AB92F4-3535-4C91-BA6E-555597FF9623}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -135,6 +131,10 @@ Global
		{C2BD219D-9BDA-4D13-8A3B-EFEF8C520680}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{C2BD219D-9BDA-4D13-8A3B-EFEF8C520680}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{C2BD219D-9BDA-4D13-8A3B-EFEF8C520680}.Release|Any CPU.Build.0 = Release|Any CPU
		{1FA18C7F-C5FE-4B0A-81A4-597FDCB64177}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{1FA18C7F-C5FE-4B0A-81A4-597FDCB64177}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{1FA18C7F-C5FE-4B0A-81A4-597FDCB64177}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{1FA18C7F-C5FE-4B0A-81A4-597FDCB64177}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE

fiddles/Test.Forms/App.config

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
    </startup>
</configuration>
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -112,4 +112,3 @@
        private System.Windows.Forms.Button btnProcess;
    }
}
+7 −6
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AudioGrader.Common.Interfaces;
using AudioGrader.Common.Models;
using AudioGrader.Decoders.FFmpegDecoder;
using AudioGrader.Decoders.WavDecoder;
using AudioGrader.Preprocessors.DialToneCutter;
@@ -47,7 +48,7 @@ namespace Test.Forms
                }

                file.Position = 0;
                signals = await decoder.ToChannelSignals(file);
                signals = (await decoder.ToChannelSignals(file)).Select(x => x.ToNWavesDiscreteSignal());
            }

            plotOriginal.plt.Clear();
@@ -62,17 +63,17 @@ namespace Test.Forms
            /*var magnitudeSpectrum = fft.MagnitudeSpectrum(signals.DownmixToMono());
            plotFilter.plt.PlotSignal(magnitudeSpectrum.Samples.Select(x => (double)x).ToArray());*/

            DialToneCutter cutter = new DialToneCutter(null);
            /*DialToneCutter cutter = new DialToneCutter(null);
            var cutSignal = cutter.Apply(signals.DownmixToMono()).Result;
            plotFilter.plt.PlotSignal(cutSignal.Samples.Select(x => (double)x).ToArray());
            plotFilter.plt.PlotSignal(cutSignal.Samples.Select(x => (double)x).ToArray());*/

            /*BaseThresholds baseThresholds = BaseThresholds.Default;
            BaseThresholds baseThresholds = BaseThresholds.Default;
            baseThresholds.energy = 90;
            baseThresholds.dominantFrequencyComponent = 180;
            baseThresholds.spectralFlatness = 2.7f;
            var voice = VoiceActivityDetector.Detect(signals.DownmixToMono(), baseThresholds);

            plotFilter.plt.PlotSignal(voice.Select(x => x ? 1d : 0d).ToArray(), 44100);*/
            plotFilter.plt.PlotSignal(voice.Select(x => x ? 1d : 0d).ToArray(), 44100);
            //plotFilter.plt.PlotSignal(voice.Select(x => (double)x).ToArray());*/

            /*var histogram = signals.DownmixToMono().Samples.Histogram(30, BinningMode.MaxValueInclusive);
Loading