public RecognizeEngineDiscreteHmmLearning(int numberOfHiddenStates, EngineParameters parameters,
     Codebook codebook)
 {
     _numberOfHiddenStates = numberOfHiddenStates;
     _engineParameters = parameters;
     _codeBook = codebook;
 }
        public FeatureUtility(EngineParameters parameters)
        {
            FrameSizeMiliseconds = parameters.FrameSizeMiliseconds;
            StepSizeMiliseconds = parameters.StepSizeMiliseconds;
            ProviderParameters = parameters.ProviderParameters;

            SilenceThreshHold = Convert.ToInt32(Math.Ceiling((FrameSizeMiliseconds*10)/StepSizeMiliseconds));
            MinWordLength = Convert.ToInt32(Math.Ceiling((FrameSizeMiliseconds * 8) / StepSizeMiliseconds));
        }
 public DetectionEngine(int numberOfHiddenStates, EngineParameters parameters, Codebook codebook, IEnumerable<HiddenMarkovModel> models = null)
 {
     _numberOfHiddenStates = numberOfHiddenStates;
     _engineParameters = parameters;
     _codeBook = codebook;
     if (models != null)
     {
         foreach (var model in models)
         {
             var idProp = (IdentificationProperties) model.Tag;
             _models[idProp.Label] = model;
         }
     }
 }
        public static Codebook FromWaves(IList<ISoundSignalReader> sounds, EngineParameters parameters, int codeBookSize = 256)
        {
            var featureUtility = new FeatureUtility(parameters);
            var features = new List<double[][]>();
            foreach (var signal in sounds)
            {
                signal.Reset();
                var items = featureUtility.ExtractFeatures(signal).Select(item => item.ToArray());
                features.AddRange(items);
            }

            var codeBook = new Codebook(features.SelectMany(item => item).Select(item => new Point(item)).ToArray(), codeBookSize);

            return codeBook;
        }