Skip to content

Commit

Permalink
Just got the first Sarah Mac app build working with all the data file…
Browse files Browse the repository at this point in the history
…s in a fairly good location (~/.scala), one that I can install to. In the long term I'd like to move the data to the "~/Library/Application Support" folder, but the space in that directory name was created problems in my "osascript" call, and I don't have time to deal with that today. Also, as you can see from the check-in, I have started working on an install script, though it is currently out of sync with this check-in, and I'll correct that next.
  • Loading branch information
alvinj committed Jan 22, 2012
1 parent edb5b0e commit a5490be
Show file tree
Hide file tree
Showing 22 changed files with 640 additions and 45 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
.classpath
.project
.settings
/deploy/jar
/deploy/release
/custom/release
/custom/jar
13 changes: 13 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
Sarah Project README File



*** WARNING ***

As of this wekend, January 22, 2012, SARAH is in a pretty dramatic state of
flux, and you probably don't want to download the project right now. I hope
to be finished with all these drastic changes in a day or two. I'm putting
a user interface on SARAH, and as a result, many files are being moved
to new locations, with many configuration and build changes as well.




INTRODUCTION

This is the README file for the devdaily.com project named Sarah,
Expand Down
21 changes: 21 additions & 0 deletions custom/Install/install-data/custom.c2p
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 'sleep' means the computer will listen to only "sleepmode" commands
# ------------- ------------
# COMMAND LABEL : WHAT YOU SAY
# ------------- ------------

FIREPLACE_ON : fireplace on
FIREPLACE_OFF : fireplace off
KITCHEN_ON : kitchen on
KITCHEN_ON : kitchen lights on
KITCHEN_OFF : kitchen off
KITCHEN_OFF : kitchen lights off

EXCUSE_ME : excuse me

MERRY_XMAS : merry christmas
HAPPY_HO : happy holidays





12 changes: 12 additions & 0 deletions custom/Install/install-data/custom.commands
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# TODO
KITCHEN_ON : say "Turning kitchen lights on"
KITCHEN_OFF : say "Turning kitchen lights off"

FIREPLACE_ON : say "Turning fireplace on"
FIREPLACE_OFF : say "Turning fireplace off"

EXCUSE_ME : say "No worries"

MERRY_XMAS : say "ho ho ho" using "Fred"
HAPPY_HO : say "ho ho ho" using "Fred"
2 changes: 2 additions & 0 deletions custom/Install/install-data/sarah.Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Main-Class: com.devdaily.sarah.Sarah
Class-Path: ../lib/sphinx4.jar ../lib/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar
295 changes: 295 additions & 0 deletions custom/Install/install-data/sarah.config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Sphinx-4 Configuration file
-->

<!-- ******************************************************** -->
<!-- an4 configuration file -->
<!-- ******************************************************** -->

<config>

<!-- ******************************************************** -->
<!-- frequently tuned properties -->
<!-- ******************************************************** -->

<property name="logLevel" value="WARNING"/>

<property name="absoluteBeamWidth" value="-1"/>
<property name="relativeBeamWidth" value="1E-80"/>
<property name="wordInsertionProbability" value="1E-36"/>
<property name="languageWeight" value="8"/>

<property name="frontend" value="epFrontEnd"/>
<property name="recognizer" value="recognizer"/>
<property name="showCreations" value="false"/>


<!-- ******************************************************** -->
<!-- word recognizer configuration -->
<!-- ******************************************************** -->

<component name="recognizer" type="edu.cmu.sphinx.recognizer.Recognizer">
<property name="decoder" value="decoder"/>
<propertylist name="monitors">
<item>accuracyTracker</item>
<item>speedTracker</item>
<item>memoryTracker</item>
</propertylist>
</component>

<!-- ******************************************************** -->
<!-- The Decoder configuration -->
<!-- ******************************************************** -->

<component name="decoder" type="edu.cmu.sphinx.decoder.Decoder">
<property name="searchManager" value="searchManager"/>
</component>

<component name="searchManager"
type="edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager">
<property name="logMath" value="logMath"/>
<property name="linguist" value="flatLinguist"/>
<property name="pruner" value="trivialPruner"/>
<property name="scorer" value="threadedScorer"/>
<property name="activeListFactory" value="activeList"/>
</component>

<component name="activeList"
type="edu.cmu.sphinx.decoder.search.PartitionActiveListFactory">
<property name="logMath" value="logMath"/>
<property name="absoluteBeamWidth" value="${absoluteBeamWidth}"/>
<property name="relativeBeamWidth" value="${relativeBeamWidth}"/>
</component>

<component name="trivialPruner"
type="edu.cmu.sphinx.decoder.pruner.SimplePruner"/>

<component name="threadedScorer"
type="edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer">
<property name="frontend" value="${frontend}"/>
</component>

<!-- ******************************************************** -->
<!-- The linguist configuration -->
<!-- ******************************************************** -->

<component name="flatLinguist" type="edu.cmu.sphinx.linguist.flat.FlatLinguist">
<property name="logMath" value="logMath"/>
<property name="grammar" value="jsgfGrammar"/>
<property name="acousticModel" value="wsj"/>
<property name="wordInsertionProbability" value="${wordInsertionProbability}"/>
<property name="languageWeight" value="${languageWeight}"/>
<property name="unitManager" value="unitManager"/>
</component>


<!-- ******************************************************** -->
<!-- The Grammar configuration -->
<!-- ******************************************************** -->

<!-- "sarah" here refers to "sarah.gram" -->
<component name="jsgfGrammar" type="edu.cmu.sphinx.jsgf.JSGFGrammar">
<property name="dictionary" value="dictionary"/>
<property name="grammarLocation" value="file:/Users/Al/.sarah/data"/>
<property name="grammarName" value="sarah"/>
<property name="logMath" value="logMath"/>
</component>


<!-- ******************************************************** -->
<!-- The Dictionary configuration -->
<!-- ******************************************************** -->

<component name="dictionary"
type="edu.cmu.sphinx.linguist.dictionary.FastDictionary">
<property name="dictionaryPath"
value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d"/>
<property name="fillerPath"
value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/fillerdict"/>
<property name="addSilEndingPronunciation" value="false"/>
<property name="allowMissingWords" value="false"/>
<property name="unitManager" value="unitManager"/>
</component>

<!-- ******************************************************** -->
<!-- The acoustic model configuration -->
<!-- ******************************************************** -->
<component name="wsj"
type="edu.cmu.sphinx.linguist.acoustic.tiedstate.TiedStateAcousticModel">
<property name="loader" value="wsjLoader"/>
<property name="unitManager" value="unitManager"/>
</component>

<component name="wsjLoader" type="edu.cmu.sphinx.linguist.acoustic.tiedstate.Sphinx3Loader">
<property name="logMath" value="logMath"/>
<property name="unitManager" value="unitManager"/>
<property name="location" value="resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz"/>
<property name="modelDefinition" value="etc/WSJ_clean_13dCep_16k_40mel_130Hz_6800Hz.4000.mdef"/>
<property name="dataLocation" value="cd_continuous_8gau/"/>
</component>


<!-- ******************************************************** -->
<!-- The unit manager configuration -->
<!-- ******************************************************** -->

<component name="unitManager"
type="edu.cmu.sphinx.linguist.acoustic.UnitManager"/>

<!-- ******************************************************** -->
<!-- The frontend configuration -->
<!-- ******************************************************** -->

<component name="frontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
<propertylist name="pipeline">
<item>microphone </item>
<item>preemphasizer </item>
<item>windower </item>
<item>fft </item>
<item>melFilterBank </item>
<item>dct </item>
<item>liveCMN </item>
<item>featureExtraction </item>
</propertylist>
</component>

<!-- ******************************************************** -->
<!-- The live frontend configuration -->
<!-- ******************************************************** -->
<component name="epFrontEnd" type="edu.cmu.sphinx.frontend.FrontEnd">
<propertylist name="pipeline">
<item>microphone </item>
<item>dataBlocker </item>
<item>speechClassifier </item>
<item>speechMarker </item>
<item>nonSpeechDataFilter </item>
<item>preemphasizer </item>
<item>windower </item>
<item>fft </item>
<item>melFilterBank </item>
<item>dct </item>
<item>liveCMN </item>
<item>featureExtraction </item>
</propertylist>
</component>

<!-- ******************************************************** -->
<!-- The frontend pipelines -->
<!-- ******************************************************** -->

<!-- DONE -->
<component name="dataBlocker" type="edu.cmu.sphinx.frontend.DataBlocker">
<!--<property name="blockSizeMs" value="10"/>-->
</component>

<!-- DONE -->
<component name="speechClassifier"
type="edu.cmu.sphinx.frontend.endpoint.SpeechClassifier">
<property name="threshold" value="13"/>
</component>

<!-- DONE -->
<component name="nonSpeechDataFilter"
type="edu.cmu.sphinx.frontend.endpoint.NonSpeechDataFilter"/>

<!-- DONE -->
<component name="speechMarker"
type="edu.cmu.sphinx.frontend.endpoint.SpeechMarker" >
<property name="speechTrailer" value="50"/>
</component>

<!-- DONE -->
<component name="preemphasizer"
type="edu.cmu.sphinx.frontend.filter.Preemphasizer"/>

<!-- DONE -->
<component name="windower"
type="edu.cmu.sphinx.frontend.window.RaisedCosineWindower">
</component>

<!-- DONE -->
<component name="fft"
type="edu.cmu.sphinx.frontend.transform.DiscreteFourierTransform">
</component>

<!-- DONE -->
<component name="melFilterBank"
type="edu.cmu.sphinx.frontend.frequencywarp.MelFrequencyFilterBank">
</component>

<!-- DONE -->
<component name="dct"
type="edu.cmu.sphinx.frontend.transform.DiscreteCosineTransform"/>

<!-- DONE -->
<component name="liveCMN"
type="edu.cmu.sphinx.frontend.feature.LiveCMN"/>

<!-- DONE -->
<component name="featureExtraction"
type="edu.cmu.sphinx.frontend.feature.DeltasFeatureExtractor"/>

<component name="microphone"
type="edu.cmu.sphinx.frontend.util.Microphone">
<property name="closeBetweenUtterances" value="false"/>
</component>


<!-- ******************************************************* -->
<!-- monitors -->
<!-- ******************************************************* -->

<!-- DONE -->
<component name="accuracyTracker"
type="edu.cmu.sphinx.instrumentation.BestPathAccuracyTracker">
<property name="recognizer" value="${recognizer}"/>
<property name="showAlignedResults" value="false"/>
<property name="showRawResults" value="false"/>
</component>

<!-- DONE -->
<component name="memoryTracker"
type="edu.cmu.sphinx.instrumentation.MemoryTracker">
<property name="recognizer" value="${recognizer}"/>
<property name="showSummary" value="false"/>
<property name="showDetails" value="false"/>
</component>

<!-- DONE -->
<component name="speedTracker"
type="edu.cmu.sphinx.instrumentation.SpeedTracker">
<property name="recognizer" value="${recognizer}"/>
<property name="frontend" value="${frontend}"/>
<property name="showSummary" value="true"/>
<property name="showDetails" value="false"/>
</component>


<!-- ******************************************************* -->
<!-- Miscellaneous components -->
<!-- ******************************************************* -->

<!-- DONE -->
<component name="logMath" type="edu.cmu.sphinx.util.LogMath">
<property name="logBase" value="1.0001"/>
<property name="useAddTable" value="true"/>
</component>

</config>















Loading

0 comments on commit a5490be

Please sign in to comment.