The aim of this article is to show an efficient algorithm of signal processing which will allow one to have a competent system of sound fingerprinting and signal recognition. I'll try to come with some explanations of the article's algorithm, and also speak about how it can be implemented using the C# programming language. Additionally, I'll try to cover topics of digital signal processing that are used in the algorithm, thus you'll be able to get a clearer image of the entire system. And as a proof of concept, I'll show you how to develop a simple WPF MVVM application.
|
// Sound Fingerprinting framework
// git://github.com/AddictedCS/soundfingerprinting.git
// Code license: CPOL v.1.02
// ciumac.sergiu@gmail.com
using System;
namespace Soundfingerprinting.NeuralHashing.ActivationFunctions
{
[Serializable]
public class SigmoidFunction : IActivationFunction
{
private float alfa = 2f;
// Alfa property
// Constructors
public SigmoidFunction()
{
}
public SigmoidFunction(float alfa)
{
this.alfa = alfa;
}
public float Alfa
{
get { return alfa; }
set { alfa = value; }
}
// Calculate function value
#region IActivationFunction Members
public float Output(float x)
{
return (float) (1/(1 + Math.Exp(-alfa*x)));
}
// Calculate differential of the function value
public float Derivative(float x)
{
float y = Output(x);
return (alfa*y*(1 - y));
}
// Calculate differential of the function value
// using function value as input
public float Derivative2(float y)
{
return (alfa*y*(1 - y));
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Interested in computer science, math, research, and everything that relates to innovation. Fan of agnostic programming, don't mind developing under any platform/framework if it explores interesting topics. In search of a better programming paradigm.