Ejemplo n.º 1
0
 public override void NewProperties(PropertySheet ps)
 {
     base.NewProperties(ps);
     _minFreq       = ps.GetDouble(PropMinFreq);
     _maxFreq       = ps.GetDouble(PropMaxFreq);
     _numberFilters = ps.GetInt(PropNumberFilters);
 }
Ejemplo n.º 2
0
        /*
         * /// (non-Javadoc)
         *
         * /// @see edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util.props.PropertySheet)
         */
        public override void NewProperties(PropertySheet ps)
        {
            _logMath = LogMath.GetLogMath();

            _acousticModel = (AcousticModel)ps.GetComponent(PropAcousticModel);
            _unitManager   = (UnitManager)ps.GetComponent(PropUnitManager);
            LanguageModel  = (LanguageModel)ps.GetComponent(PropLanguageModel);
            Dictionary     = (IDictionary)ps.GetComponent(PropDictionary);

            //fullWordHistories = ps.getBoolean(PROP_FULL_WORD_HISTORIES);
            _wantUnigramSmear               = ps.GetBoolean(PropWantUnigramSmear);
            _logWordInsertionProbability    = _logMath.LinearToLog(ps.GetDouble(PropWordInsertionProbability));
            _logSilenceInsertionProbability = _logMath.LinearToLog(ps.GetDouble(PropSilenceInsertionProbability));
            _logFillerInsertionProbability  = _logMath.LinearToLog(ps.GetDouble(PropFillerInsertionProbability));
            _logUnitInsertionProbability    = _logMath.LinearToLog(ps.GetDouble(PropUnitInsertionProbability));
            LanguageWeight      = ps.GetFloat(PropLanguageWeight);
            AddFillerWords      = (ps.GetBoolean(PropAddFillerWords));
            GenerateUnitStates  = (ps.GetBoolean(PropGenerateUnitStates));
            _unigramSmearWeight = ps.GetFloat(PropUnigramSmearWeight);
            _maxArcCacheSize    = ps.GetInt(PropCacheSize);

            CacheEnabled = _maxArcCacheSize > 0;
            if (CacheEnabled)
            {
                ArcCache = new LRUCache <LexTreeState, ISearchStateArc[]>(_maxArcCacheSize);
            }
        }
Ejemplo n.º 3
0
        public override void NewProperties(PropertySheet ps)
        {
            base.NewProperties(ps);

            _ditherMax   = ps.GetDouble(PropMaxDither);
            _useRandSeed = ps.GetBoolean(PropUseRandseed);

            _maxValue = ps.GetDouble(PropMaxVal);
            _minValue = ps.GetDouble(PropMinVal);
        }
Ejemplo n.º 4
0
        public override void NewProperties(PropertySheet ps)
        {
            base.NewProperties(ps);
            int frameLengthMs = ps.GetInt(PropFrameLengthMs);

            FrameLengthSec = frameLengthMs / 1000.0f;

            Adjustment = ps.GetDouble(PropAdjustment);
            Threshold  = ps.GetDouble(PropThreshold);
            MinSignal  = ps.GetDouble(PropMinSignal);

            Initialize();
        }
Ejemplo n.º 5
0
        public virtual void NewProperties(PropertySheet ps)
        {
            LogMath           = LogMath.GetLogMath();
            AbsoluteBeamWidth = ps.GetInt(PropAbsoluteBeamWidth);
            double relativeBeamWidth = ps.GetDouble(PropRelativeBeamWidth);

            LogRelativeBeamWidth = LogMath.LinearToLog(relativeBeamWidth);
        }
Ejemplo n.º 6
0
        public override void NewProperties(PropertySheet ps)
        {
            base.NewProperties(ps);

            _alpha           = ps.GetDouble(PropAlpha);
            _windowSizeInMs  = ps.GetFloat(PropWindowSizeMs);
            _windowShiftInMs = ps.GetFloat(PropWindowShiftMs);
        }
Ejemplo n.º 7
0
 public void NewProperties(PropertySheet ps)
 {
     _frontEnd  = (DummyFrontEnd)ps.GetComponent(PropFrontend);
     _beamWidth = ps.GetInt(PropBeamWidth);
     _bestAsr   = ps.GetString(PropBestAsr);
     _alpha     = ps.GetDouble(PropAlpha);
     _useFooBaz = ps.GetBoolean(PropUseFoobaz);
 }
Ejemplo n.º 8
0
        /*
         * /// (non-Javadoc)
         *
         * /// @see edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util.props.PropertySheet)
         */
        public override void NewProperties(PropertySheet ps)
        {
            LogMath = LogMath.GetLogMath();

            _acousticModel = (AcousticModel)ps.GetComponent(PropAcousticModel);
            Grammar        = (Grammar)ps.GetComponent(PropGrammar);
            UnitManager    = (UnitManager)ps.GetComponent(PropUnitManager);

            // get the rest of the configuration data
            _logWordInsertionProbability   = LogMath.LinearToLog(ps.GetDouble(PropWordInsertionProbability));
            LogSilenceInsertionProbability = LogMath.LinearToLog(ps.GetDouble(PropSilenceInsertionProbability));
            _logFillerInsertionProbability = LogMath.LinearToLog(ps.GetDouble(PropFillerInsertionProbability));
            _logUnitInsertionProbability   = LogMath.LinearToLog(ps.GetDouble(PropUnitInsertionProbability));
            _languageWeight          = ps.GetFloat(PropLanguageWeight);
            _dumpGStates             = ps.GetBoolean(PropDumpGstates);
            _showCompilationProgress = ps.GetBoolean(PropShowCompilationProgress);
            _spreadWordProbabilitiesAcrossPronunciations = ps.GetBoolean(PropSpreadWordProbabilitiesAcrossPronunciations);

            AddOutOfGrammarBranch = ps.GetBoolean(PropAddOutOfGrammarBranch);

            if (AddOutOfGrammarBranch)
            {
                LogOutOfGrammarBranchProbability = LogMath.LinearToLog(ps.GetDouble(PropOutOfGrammarProbability));
                LogPhoneInsertionProbability     = LogMath.LinearToLog(ps.GetDouble(PropPhoneInsertionProbability));
                PhoneLoopAcousticModel           = (AcousticModel)ps.GetComponent(PropPhoneLoopAcousticModel);
            }

            Name = ps.InstanceName;
        }
Ejemplo n.º 9
0
 public override void NewProperties(PropertySheet ps)
 {
     logMath                   = LogMath.GetLogMath();
     location                  = ConfigurationManagerUtils.GetResource(PropLocation, ps);
     ngramLogFile              = ps.GetString(PROP_QUERY_LOG_FILE);
     MaxDepth                  = ps.GetInt(LanguageModel.PropMaxDepth);
     ngramCacheSize            = ps.GetInt(PROP_NGRAM_CACHE_SIZE);
     clearCacheAfterUtterance  = ps.GetBoolean(PROP_CLEAR_CACHES_AFTER_UTTERANCE);
     dictionary                = (IDictionary)ps.GetComponent(PropDictionary);
     applyLanguageWeightAndWip = ps.GetBoolean(PROP_APPLY_LANGUAGE_WEIGHT_AND_WIP);
     languageWeight            = ps.GetFloat(PROP_LANGUAGE_WEIGHT);
     logWip        = logMath.LinearToLog(ps.GetDouble(PROP_WORD_INSERTION_PROBABILITY));
     unigramWeight = ps.GetFloat(PropUnigramWeight);
 }
Ejemplo n.º 10
0
 /*
  * (non-Javadoc)
  * @see
  * edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.
  * util.props.PropertySheet)
  */
 public override void NewProperties(PropertySheet ps)
 {
     Location                  = ConfigurationManagerUtils.GetResource(PropLocation, ps);
     NgramLogFile              = ps.GetString(PropQueryLogFile);
     NgramCacheSize            = ps.GetInt(PropNgramCacheSize);
     ClearCacheAfterUtterance  = ps.GetBoolean(PropClearCachesAfterUtterance);
     MaxDepth                  = ps.GetInt(PropMaxDepth);
     Dictionary                = (IDictionary)ps.GetComponent(PropDictionary);
     ApplyLanguageWeightAndWip = ps.GetBoolean(PropApplyLanguageWeightAndWip);
     LanguageWeight            = ps.GetFloat(PropLanguageWeight);
     Wip           = ps.GetDouble(PropWordInsertionProbability);
     UnigramWeight = ps.GetFloat(PropUnigramWeight);
     FullSmear     = ps.GetBoolean(PropFullSmear);
 }
Ejemplo n.º 11
0
 public override void NewProperties(PropertySheet ps)
 {
     base.NewProperties(ps);
     _lambdaPower  = ps.GetDouble(LambdaPower);
     _lambdaA      = ps.GetDouble(LambdaA);
     _lambdaB      = ps.GetDouble(LambdaB);
     lambdaT       = ps.GetDouble(LambdaT);
     _muT          = ps.GetDouble(MuT);
     _maxGain      = ps.GetDouble(MaxGain);
     _smoothWindow = ps.GetInt(SmoothWindow);
 }
Ejemplo n.º 12
0
        public override void NewProperties(PropertySheet ps)
        {
            LogMath = LogMath.GetLogMath();
            _name   = ps.InstanceName;

            Linguist          = (Linguist.Linguist)ps.GetComponent(PropLinguist);
            _pruner           = (IPruner)ps.GetComponent(PropPruner);
            _scorer           = (IAcousticScorer)ps.GetComponent(PropScorer);
            ActiveListFactory = (ActiveListFactory)ps.GetComponent(PropActiveListFactory);
            _showTokenCount   = ps.GetBoolean(PropShowTokenCount);

            double relativeWordBeamWidth = ps.GetDouble(PropRelativeWordBeamWidth);

            _growSkipInterval         = ps.GetInt(PropGrowSkipInterval);
            _wantEntryPruning         = ps.GetBoolean(PropWantEntryPruning);
            _logRelativeWordBeamWidth = LogMath.LinearToLog(relativeWordBeamWidth);

            KeepAllTokens = true;
        }
        public override void NewProperties(PropertySheet ps)
        {
            base.NewProperties(ps);

            _logMath = LogMath.GetLogMath();

            Linguist           = (Linguist.Linguist)ps.GetComponent(PropLinguist);
            Pruner             = (IPruner)ps.GetComponent(PropPruner);
            Scorer             = (IAcousticScorer)ps.GetComponent(PropScorer);
            _activeListManager = (ActiveListManager)ps.GetComponent(PropActiveListManager);
            _showTokenCount    = ps.GetBoolean(PropShowTokenCount);
            _growSkipInterval  = ps.GetInt(PropGrowSkipInterval);

            _checkStateOrder         = ps.GetBoolean(PropCheckStateOrder);
            _maxLatticeEdges         = ps.GetInt(PropMaxLatticeEdges);
            _acousticLookaheadFrames = ps.GetFloat(PropAcousticLookaheadFrames);

            _relativeBeamWidth = _logMath.LinearToLog(ps.GetDouble(PropRelativeBeamWidth));
        }
Ejemplo n.º 14
0
 public override void NewProperties(PropertySheet ps)
 {
     base.NewProperties(ps);
     _maxEnergy = ps.GetDouble(PropMaxEnergy);
 }
Ejemplo n.º 15
0
 public override void NewProperties(PropertySheet propertySheet)
 {
     base.NewProperties(propertySheet);
     BlockSizeMs = propertySheet.GetDouble(PropBlockSizeMs);
 }
Ejemplo n.º 16
0
 public void NewProperties(PropertySheet ps)
 {
     dataProc = (DummyProcessor)ps.GetComponent(PROP_DATA_PROC);
     myString = ps.GetString(PROP_ASTRING);
     gamma    = ps.GetDouble(PROP_GAMMA);
 }
Ejemplo n.º 17
0
 public override void NewProperties(PropertySheet ps)
 {
     base.NewProperties(ps);
     _preemphasisFactor = ps.GetDouble(PropPreemphasisFactor);
 }
Ejemplo n.º 18
0
        /*
         * (non-Javadoc)
         *
         * @see edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util.props.PropertySheet)
         */

        public override void NewProperties(PropertySheet ps)
        {
            base.NewProperties(ps);
            GainFactor = ps.GetDouble(GAIN_FACTOR);
        }