/* * /// (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; }
/* * /// (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); } }
/* * /// (non-Javadoc) * * /// @see edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util.props.PropertySheet) */ public virtual void NewProperties(PropertySheet ps) { _optimizeGrammar = ps.GetBoolean(PropOptimizeGrammar); _addSilenceWords = ps.GetBoolean(PropAddSilWords); _addFillerWords = ps.GetBoolean(PropAddFillerWords); Dictionary = (IDictionary)ps.GetComponent(PropDictionary); }
/* * (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); InitRecognizer((Recognizer)ps.GetComponent(PropRecognizer)); InitFrontEnd((FrontEnd)ps.GetComponent(PropFrontend)); _showSummary = ps.GetBoolean(PropShowSummary); _showDetails = ps.GetBoolean(PropShowDetails); _showResponseTime = ps.GetBoolean(PropShowResponseTime); _showTimers = ps.GetBoolean(PropShowTimers); }
/* * (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); Recognizer newRecognizer = (Recognizer)ps.GetComponent( PropRecognizer); InitRecognizer(newRecognizer); _showSummary = ps.GetBoolean(PropShowSummary); _showDetails = ps.GetBoolean(PropShowDetails); }
/// <summary> /// @see Sphincs.util.props.Configurable#newProperties(Sphincs.util.props.PropertySheet) /// </summary> /// <param name="ps"></param> public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); init( ps.GetInt(PropSampleRate), ps.GetInt(PropBytesPerRead), ps.GetInt(PropBitsPerSample), ps.GetBoolean(PropBigEndianData), ps.GetBoolean(PropSignedData)); }
public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); //logger = ps.getLogger(); _enable = ps.GetBoolean(PropEnable); var format = ps.GetString(PropOutputFormat); _formatter = new NumberFormatInfo(); _outputSignals = ps.GetBoolean(PropOutputSignals); }
public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); _cepstrumLength = ps.GetInt(PropCepstrumLength); _binary = ps.GetBoolean(PropBinary); _bigEndian = ps.GetBoolean(PropBigEndianData); var frameShiftMs = ps.GetFloat(PropFrameShiftMs); var frameSizeMs = ps.GetFloat(PropFrameSizeMs); _sampleRate = ps.GetInt(PropSampleRate); _frameShift = DataUtil.GetSamplesPerWindow(_sampleRate, frameShiftMs); _frameSize = DataUtil.GetSamplesPerShift(_sampleRate, frameSizeMs); }
/* * (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); }
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); }
/* * (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); InitRecognizer((Recognizer)ps.GetComponent(PropRecognizer)); _showSummary = ps.GetBoolean(PropShowSummary); _showDetails = ps.GetBoolean(PropShowDetails); _showResults = ps.GetBoolean(PropShowResults); _showAlignedResults = ps.GetBoolean(PropShowAlignedResults); _showRaw = ps.GetBoolean(PropShowRawResults); Aligner.SetShowResults(_showResults); Aligner.SetShowAlignedResults(_showAlignedResults); }
public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); _numberFftPoints = ps.GetInt(PropNumberFFTPoints); _isNumberFftPointsSet = (_numberFftPoints != -1); _invert = ps.GetBoolean(PropInvert); }
public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); Init(ps.GetInt(PropMinScoreablesPerThread), ps.GetBoolean(PropIsCpuRelative), ps.GetInt(PropNumThreads), ps.GetInt(PropThreadPriority)); }
/* * /// (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); _path = ps.GetString(PropPath); _isLooping = ps.GetBoolean(PropLoop); _logMath = LogMath.GetLogMath(); }
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); }
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 void NewProperties(PropertySheet ps) { Init(ConfigurationManagerUtils.GetResource(PropLocation, ps), ps.GetString(PropModel), ps.GetString(PropDataLocation), (UnitManager)ps.GetComponent(PropUnitManager), ps.GetFloat(PropMcFloor), ps.GetFloat(PropMwFloor), ps.GetFloat(PropVarianceFloor), ps.GetInt(PropTopn), ps.GetBoolean(PropUseCdUnits)); }
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)); }
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); }
public void NewProperties(PropertySheet ps) { //logger = ps.getLogger(); _cm = ConfigurationManagerUtils.GetPropertyManager(ps); _showConfig = ps.GetBoolean(PropShowConfig); _showHtml = ps.GetBoolean(PropShowConfigAsHtml); _showGdl = ps.GetBoolean(PropShowConfigAsGdl); _saveXML = ps.GetBoolean(PropSaveConfigAsXML); if (ps.GetString(PropOutfile) != null) { var outFile = new FileInfo(ps.GetString(PropOutfile)); if (outFile.Directory != null && outFile.Directory.Exists) { //TODO: Check Behaviour _htmlPath = outFile.FullName; _gdlPath = outFile.FullName; _xmlPath = outFile.FullName; } } }
/* * (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); _bytesPerSecond = SampleRate * (BitsPerSample / 8); AddRandomSilence = ps.GetBoolean(PropAddRandomSilence); MaxSilence = ps.GetInt(PropMaxSilence); Skip = ps.GetInt(PropSkip); SilenceFileName = ps.GetString(PropSilenceFile); _startFile = ps.GetInt(PropStartFile); _totalFiles = ps.GetInt(PropTotalFiles); TranscriptFile = ps.GetString(PropTranscriptFile); _batchFile = ps.GetString(PropBatchFile); }
public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); _maxBufferSize = ps.GetInt(PropBufferSize); _waitIfEmpty = ps.GetBoolean(PropWaitIfEmpty); if (_waitIfEmpty) // if false we don't need the value { _waitTime = ps.GetInt(PropWaitTimeMs); } _dataListeners = ps.GetComponentList <IDataListener>(DataListeners); }
public override void NewProperties(PropertySheet ps) { AcousticModel = (AcousticModel)ps.GetComponent(PropAcousticModel); PhoneInsertionProb = LogMath.GetLogMath().LinearToLog(ps.GetFloat(PropPip)); UseContextDependentPhones = ps.GetBoolean(PropCD); if (UseContextDependentPhones) { CreateContextDependentSuccessors(); } else { CreateContextIndependentSuccessors(); } }
/* * /// (non-Javadoc) * * /// @see edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util.props.PropertySheet) */ public void NewProperties(PropertySheet ps) { cm = ConfigurationManagerUtils.GetPropertyManager(ps); skip = ps.GetInt(PROP_SKIP); utteranceId = ps.GetInt(PROP_COUNT); if (utteranceId <= 0) { utteranceId = Integer.MAX_VALUE; } whichBatch = ps.GetInt(PROP_WHICH_BATCH); totalBatches = ps.GetInt(PROP_TOTAL_BATCHES); usePooledBatchManager = ps.GetBoolean(PROP_USE_POOLED_BATCH_MANAGER); recognizer = (Recognizer)ps.GetComponent(PROP_RECOGNIZER); inputDataProcessors = ps.GetComponentList <IDataProcessor>(PROP_INPUT_DATA_PROCESSORS); }
/* * /// (non-Javadoc) * * /// @see edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util.props.PropertySheet) */ public override void NewProperties(PropertySheet ps) { _activeListFactories = ps.GetComponentList <ActiveListFactory>(PropActiveListFactories); CheckPriorLists = ps.GetBoolean(PropCheckPriorListsEmpty); }
public void NewProperties(PropertySheet ps) { _useMfccs = ps.GetBoolean(PropUseMffcs); _dataProcs = ps.GetComponentList <IConfigurable>(DataProcs); }
public virtual void NewProperties(PropertySheet ps) { Init(ps.GetInstanceName(), (ISearchManager)ps.GetComponent(PropSearchManager), ps.GetBoolean(FireNonFinalResults), ps.GetBoolean(AutoAllocate), ps.GetComponentList <IResultListener>(PropResultListeners)); }
public override void NewProperties(PropertySheet ps) { Loader = (ILoader)ps.GetComponent(PropLoader); UnitManager = (UnitManager)ps.GetComponent(PropUnitManager); _useComposites = ps.GetBoolean(PropUseComposites); }
/* * (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); _showFullPath = ps.GetBoolean(PropShowFullPath); }
public void NewProperties(PropertySheet ps) { InitRecognizer((Recognizer)ps.GetComponent(PropRecognizer)); _showSummary = ps.GetBoolean(PropShowSummary); _showDetails = ps.GetBoolean(PropShowDetails); }