Compatibility issue with CMU JSGF example

Home Forums OpenEars Compatibility issue with CMU JSGF example

Viewing 15 posts - 1 through 15 (of 15 total)

  • Author
    Posts
  • #11680
    Jandr50
    Participant

    Using the newest version of OpenEars.

    I’ve tried this with my own app, could not figure out why it was crashing, then attempted on the OpenEarsSampleApp that came with the framework, and it did the same thing.

    Here’s what I attempted:
    Take the sample app.
    Copy the ‘OpenEars1.gram” and “OpenEars2.gram” files into the project folder.
    Right before the

    [self.pocketsphinxController startListeningWithLanguageModelAtPath:self.pathToGrammarToStartAppWith dictionaryAtPath:self.pathToDictionaryToStartAppWith languageModelIsJSGF:FALSE];

    call, I changed the path with a new variable that grabs the grammar file from the bundle.

    NSString *jsgfPath = [[NSBundle mainBundle]pathForResource:@"OpenEars2" ofType:@"gram"];
    [self.pocketsphinxController startListeningWithLanguageModelAtPath:jsgfPath dictionaryAtPath:self.pathToDictionaryToStartAppWith languageModelIsJSGF:TRUE];

    Soon as calibration finishes, this triggers a crash. Is there more to enabling JSGF that I seem to be missing?

    Thanks

    #11682
    Halle Winkler
    Politepix

    OK, I will check it out on Friday, but can you post the output of OpenEarsLogging and verbosePocketSphinx here so I can get a head start?

    #11683
    Jandr50
    Participant

    Sure can.


    2012-10-24 10:41:03.629 OpenEarsSampleApp[31311:907] Starting OpenEars logging for OpenEars version {{{{1.2.2}}}} on device: iPhone running iOS version: 6.000000
    2012-10-24 10:41:03.636 OpenEarsSampleApp[31311:907] Normalized array contains the following entries:
    (
    SUNDAY,
    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    QUIDNUNC,
    "CHANGE MODEL"
    )
    2012-10-24 10:41:03.641 OpenEarsSampleApp[31311:907] Starting dynamic language model generation
    2012-10-24 10:41:03.647 OpenEarsSampleApp[31311:907] Able to open /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/Documents/OpenEarsDynamicGrammar.corpus for reading
    2012-10-24 10:41:03.650 OpenEarsSampleApp[31311:907] Able to open /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/Documents/OpenEarsDynamicGrammar_pipe.txt for writing
    2012-10-24 10:41:03.652 OpenEarsSampleApp[31311:907] Starting text2wfreq_impl
    2012-10-24 10:41:03.675 OpenEarsSampleApp[31311:907] Done with text2wfreq_impl
    2012-10-24 10:41:03.679 OpenEarsSampleApp[31311:907] Able to open /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/Documents/OpenEarsDynamicGrammar_pipe.txt for reading.
    2012-10-24 10:41:03.682 OpenEarsSampleApp[31311:907] Able to open /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/Documents/OpenEarsDynamicGrammar.vocab for reading.
    2012-10-24 10:41:03.683 OpenEarsSampleApp[31311:907] Starting wfreq2vocab
    2012-10-24 10:41:03.690 OpenEarsSampleApp[31311:907] Done with wfreq2vocab
    2012-10-24 10:41:03.693 OpenEarsSampleApp[31311:907] Starting text2idngram
    2012-10-24 10:41:03.716 OpenEarsSampleApp[31311:907] Done with text2idngram
    2012-10-24 10:41:03.721 OpenEarsSampleApp[31311:907] Starting idngram2lm

    2012-10-24 10:41:03.736 OpenEarsSampleApp[31311:907] Done with idngram2lm
    2012-10-24 10:41:03.738 OpenEarsSampleApp[31311:907] Starting sphinx_lm_convert
    2012-10-24 10:41:03.757 OpenEarsSampleApp[31311:907] Finishing sphinx_lm_convert
    2012-10-24 10:41:03.765 OpenEarsSampleApp[31311:907] Done creating language model with CMUCLMTK in 0.122089 seconds.
    2012-10-24 10:41:04.066 OpenEarsSampleApp[31311:907] The word QUIDNUNC was not found in the dictionary /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/cmu07a.dic.
    2012-10-24 10:41:04.068 OpenEarsSampleApp[31311:907] Now using the fallback method to look up the word QUIDNUNC
    2012-10-24 10:41:04.077 OpenEarsSampleApp[31311:907] Using convertGraphemes for the word or phrase QUIDNUNC which doesn't appear in the dictionary
    2012-10-24 10:41:04.146 OpenEarsSampleApp[31311:907] If this is happening more frequently than you would expect, the most likely cause for it is since you are using the default phonetic lookup dictionary is that your words are not in English or aren't dictionary words, or that you are submitting the words in lowercase when they need to be entirely written in uppercase.
    2012-10-24 10:41:04.217 OpenEarsSampleApp[31311:907] I'm done running performDictionaryLookup and it took 0.340675 seconds
    2012-10-24 10:41:04.224 OpenEarsSampleApp[31311:907] I'm done running dynamic language model generation and it took 372782464.224639 seconds
    2012-10-24 10:41:04.226 OpenEarsSampleApp[31311:907] Dynamic language generator completed successfully, you can find your new files OpenEarsDynamicGrammar.DMP
    and
    OpenEarsDynamicGrammar.dic
    at the paths
    /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/Documents/OpenEarsDynamicGrammar.DMP
    and
    /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/Documents/OpenEarsDynamicGrammar.dic
    2012-10-24 10:41:04.229 OpenEarsSampleApp[31311:907]

    Welcome to the OpenEars sample project. This project understands the words:
    BACKWARD,
    CHANGE,
    FORWARD,
    GO,
    LEFT,
    MODEL,
    RIGHT,
    TURN,
    and if you say "CHANGE MODEL" it will switch to its dynamically-generated model which understands the words:
    CHANGE,
    MODEL,
    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    SUNDAY,
    QUIDNUNC
    2012-10-24 10:41:04.232 OpenEarsSampleApp[31311:907] A sample rate was requested that isn't one of the two supported values of 16000 or 8000 so we will use the default of 16000.
    2012-10-24 10:41:04.237 OpenEarsSampleApp[31311:907] The audio session has never been initialized so we will do that now.
    2012-10-24 10:41:04.239 OpenEarsSampleApp[31311:907] Checking and resetting all audio session settings.
    2012-10-24 10:41:04.241 OpenEarsSampleApp[31311:907] audioCategory is incorrect, we will change it.
    2012-10-24 10:41:04.244 OpenEarsSampleApp[31311:907] audioCategory is now on the correct setting of kAudioSessionCategory_PlayAndRecord.
    2012-10-24 10:41:04.246 OpenEarsSampleApp[31311:907] bluetoothInput is incorrect, we will change it.
    2012-10-24 10:41:04.248 OpenEarsSampleApp[31311:907] bluetooth input is now on the correct setting of 1.
    2012-10-24 10:41:04.250 OpenEarsSampleApp[31311:907] categoryDefaultToSpeaker is incorrect, we will change it.
    2012-10-24 10:41:04.252 OpenEarsSampleApp[31311:907] CategoryDefaultToSpeaker is now on the correct setting of 1.
    2012-10-24 10:41:04.254 OpenEarsSampleApp[31311:907] preferredBufferSize is incorrect, we will change it.
    2012-10-24 10:41:04.257 OpenEarsSampleApp[31311:907] PreferredBufferSize is now on the correct setting of 0.128000.
    2012-10-24 10:41:04.259 OpenEarsSampleApp[31311:907] preferredSampleRateCheck is incorrect, we will change it.
    2012-10-24 10:41:04.261 OpenEarsSampleApp[31311:907] preferred hardware sample rate is now on the correct setting of 16000.000000.
    2012-10-24 10:41:04.338 OpenEarsSampleApp[31311:907] AudioSessionManager startAudioSession has reached the end of the initialization.
    2012-10-24 10:41:04.346 OpenEarsSampleApp[31311:907] Exiting startAudioSession.
    2012-10-24 10:41:04.350 OpenEarsSampleApp[31311:3b03] Recognition loop has started
    INFO: cmd_ln.c(706): Parsing command line:
    \
    -jsgf /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/OpenEars2.gram \
    -dict /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/OpenEars1.dic \
    -hmm /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app \
    -lw 3.000000 \
    -maxhmmpf 3000 \
    -samprate 16000

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -agc none none
    -agcthresh 2.0 2.000000e+00
    -alpha 0.97 9.700000e-01
    -argfile
    -ascale 20.0 2.000000e+01
    -aw 1 1
    -backtrace no no
    -beam 1e-48 1.000000e-48
    -bestpath yes yes
    -bestpathlw 9.5 9.500000e+00
    -bghist no no
    -ceplen 13 13
    -cmn current current
    -cmninit 8.0 8.0
    -compallsen no no
    -debug 0
    -dict /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/OpenEars1.dic
    -dictcase no no
    -dither no no
    -doublebw no no
    -ds 1 1
    -fdict
    -feat 1s_c_d_dd 1s_c_d_dd
    -featparams
    -fillprob 1e-8 1.000000e-08
    -frate 100 100
    -fsg
    -fsgusealtpron yes yes
    -fsgusefiller yes yes
    -fwdflat yes yes
    -fwdflatbeam 1e-64 1.000000e-64
    -fwdflatefwid 4 4
    -fwdflatlw 8.5 8.500000e+00
    -fwdflatsfwin 25 25
    -fwdflatwbeam 7e-29 7.000000e-29
    -fwdtree yes yes
    -hmm /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app
    -input_endian little little
    -jsgf /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/OpenEars2.gram
    -kdmaxbbi -1 -1
    -kdmaxdepth 0 0
    -kdtree
    -latsize 5000 5000
    -lda
    -ldadim 0 0
    -lextreedump 0 0
    -lifter 0 0
    -lm
    -lmctl
    -lmname default default
    -logbase 1.0001 1.000100e+00
    -logfn
    -logspec no no
    -lowerf 133.33334 1.333333e+02
    -lpbeam 1e-40 1.000000e-40
    -lponlybeam 7e-29 7.000000e-29
    -lw 6.5 3.000000e+00
    -maxhmmpf -1 3000
    -maxnewoov 20 20
    -maxwpf -1 -1
    -mdef
    -mean
    -mfclogdir
    -min_endfr 0 0
    -mixw
    -mixwfloor 0.0000001 1.000000e-07
    -mllr
    -mmap yes yes
    -ncep 13 13
    -nfft 512 512
    -nfilt 40 40
    -nwpen 1.0 1.000000e+00
    -pbeam 1e-48 1.000000e-48
    -pip 1.0 1.000000e+00
    -pl_beam 1e-10 1.000000e-10
    -pl_pbeam 1e-5 1.000000e-05
    -pl_window 0 0
    -rawlogdir
    -remove_dc no no
    -round_filters yes yes
    -samprate 16000 1.600000e+04
    -seed -1 -1
    -sendump
    -senlogdir
    -senmgau
    -silprob 0.005 5.000000e-03
    -smoothspec no no
    -svspec
    -tmat
    -tmatfloor 0.0001 1.000000e-04
    -topn 4 4
    -topn_beam 0 0
    -toprule
    -transform legacy legacy
    -unit_area yes yes
    -upperf 6855.4976 6.855498e+03
    -usewdphones no no
    -uw 1.0 1.000000e+00
    -var
    -varfloor 0.0001 1.000000e-04
    -varnorm no no
    -verbose no no
    -warp_params
    -warp_type inverse_linear inverse_linear
    -wbeam 7e-29 7.000000e-29
    -wip 0.65 6.500000e-01
    -wlen 0.025625 2.562500e-02

    2012-10-24 10:41:04.399 OpenEarsSampleApp[31311:907] Pocketsphinx is starting up.
    INFO: cmd_ln.c(706): Parsing command line:
    \
    -nfilt 20 \
    -lowerf 1 \
    -upperf 4000 \
    -wlen 0.025 \
    -transform dct \
    -round_filters no \
    -remove_dc yes \
    -svspec 0-12/13-25/26-38 \
    -feat 1s_c_d_dd \
    -agc none \
    -cmn current \
    -cmninit 47 \
    -varnorm no

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -agc none none
    -agcthresh 2.0 2.000000e+00
    -alpha 0.97 9.700000e-01
    -ceplen 13 13
    -cmn current current
    -cmninit 8.0 47
    -dither no no
    -doublebw no no
    -feat 1s_c_d_dd 1s_c_d_dd
    -frate 100 100
    -input_endian little little
    -lda
    -ldadim 0 0
    -lifter 0 0
    -logspec no no
    -lowerf 133.33334 1.000000e+00
    -ncep 13 13
    -nfft 512 512
    -nfilt 40 20
    -remove_dc no yes
    -round_filters yes no
    -samprate 16000 1.600000e+04
    -seed -1 -1
    -smoothspec no no
    -svspec 0-12/13-25/26-38
    -transform legacy dct
    -unit_area yes yes
    -upperf 6855.4976 4.000000e+03
    -varnorm no no
    -verbose no no
    -warp_params
    -warp_type inverse_linear inverse_linear
    -wlen 0.025625 2.500000e-02

    INFO: acmod.c(250): Parsed model-specific feature parameters from /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/feat.params
    2012-10-24 10:41:04.414 OpenEarsSampleApp[31311:907] The audio session has already been initialized but we will override its properties.
    INFO: feat.c(713): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none'
    INFO: cmn.c(142): mean[0]= 12.00, mean[1..12]= 0.0
    INFO: acmod.c(171): Using subvector specification 0-12/13-25/26-38
    INFO: mdef.c(517): Reading model definition: /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/mdef
    INFO: mdef.c(528): Found byte-order mark BMDF, assuming this is a binary mdef file
    INFO: bin_mdef.c(336): Reading binary model definition: /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/mdef
    2012-10-24 10:41:04.421 OpenEarsSampleApp[31311:907] Checking and resetting all audio session settings.
    2012-10-24 10:41:04.428 OpenEarsSampleApp[31311:907] audioCategory is correct, we will leave it as it is.
    2012-10-24 10:41:04.431 OpenEarsSampleApp[31311:907] bluetoothInput is correct, we will leave it as it is.
    2012-10-24 10:41:04.433 OpenEarsSampleApp[31311:907] categoryDefaultToSpeaker is correct, we will leave it as it is.
    2012-10-24 10:41:04.436 OpenEarsSampleApp[31311:907] preferredBufferSize is correct, we will leave it as it is.
    2012-10-24 10:41:04.439 OpenEarsSampleApp[31311:907] preferredSampleRateCheck is correct, we will leave it as it is.
    2012-10-24 10:41:04.442 OpenEarsSampleApp[31311:907] AudioSessionManager startAudioSession has reached the end of the initialization.
    2012-10-24 10:41:04.446 OpenEarsSampleApp[31311:907] Exiting startAudioSession.
    2012-10-24 10:41:04.459 OpenEarsSampleApp[31311:907] Audio route has changed for the following reason:
    2012-10-24 10:41:04.461 OpenEarsSampleApp[31311:907] There has been a change of category
    2012-10-24 10:41:04.465 OpenEarsSampleApp[31311:907] The previous audio route was Speaker
    2012-10-24 10:41:04.469 OpenEarsSampleApp[31311:907] This is not a case in which OpenEars performs a route change voluntarily. At the close of this function, the audio route is SpeakerAndMicrophone
    INFO: bin_mdef.c(513): 50 CI-phone, 143047 CD-phone, 3 emitstate/phone, 150 CI-sen, 5150 Sen, 27135 Sen-Seq
    INFO: tmat.c(205): Reading HMM transition probability matrices: /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/transition_matrices
    INFO: acmod.c(125): Attempting to use SCHMM computation module
    INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/means
    INFO: ms_gauden.c(292): 1 codebook, 3 feature, size:
    INFO: ms_gauden.c(294): 256x13
    INFO: ms_gauden.c(294): 256x13
    INFO: ms_gauden.c(294): 256x13
    INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/variances
    INFO: ms_gauden.c(292): 1 codebook, 3 feature, size:
    INFO: ms_gauden.c(294): 256x13
    INFO: ms_gauden.c(294): 256x13
    INFO: ms_gauden.c(294): 256x13
    INFO: ms_gauden.c(354): 0 variance values floored
    INFO: s2_semi_mgau.c(995): Loading senones from dump file /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/sendump
    INFO: s2_semi_mgau.c(1019): BEGIN FILE FORMAT DESCRIPTION
    INFO: s2_semi_mgau.c(1114): Using memory-mapped I/O for senones
    INFO: s2_semi_mgau.c(1391): Maximum top-N: 4 Top-N beams: 0 0 0
    INFO: dict.c(317): Allocating 4115 * 20 bytes (80 KiB) for word entries
    INFO: dict.c(332): Reading main dictionary: /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/OpenEars1.dic
    INFO: dict.c(211): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: dict.c(335): 8 words read
    INFO: dict.c(341): Reading filler dictionary: /var/mobile/Applications/E76B971A-81E3-4CFF-B2CA-EFA537E40D5A/OpenEarsSampleApp.app/noisedict
    INFO: dict.c(211): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: dict.c(344): 11 words read
    INFO: dict2pid.c(400): Building PID tables for dictionary
    INFO: dict2pid.c(408): Allocating 50^3 * 2 bytes (244 KiB) for word-initial triphones
    INFO: dict2pid.c(135): Allocated 30200 bytes (29 KiB) for word-final triphones
    INFO: dict2pid.c(199): Allocated 30200 bytes (29 KiB) for single-phone word triphones
    INFO: fsg_search.c(145): FSG(beam: -1080, pbeam: -1080, wbeam: -634; wip: -13, pip: 0)
    INFO: jsgf.c(546): Defined rule: PUBLIC
    INFO: fsg_model.c(215): Computing transitive closure for null transitions
    INFO: fsg_model.c(270): 0 null transitions added
    ERROR: "fsg_search.c", line 334: The word 'QUIDNUNC' is missing in the dictionary
    2012-10-24 10:41:04.645 OpenEarsSampleApp[31311:3b03] Starting openAudioDevice on the device.
    2012-10-24 10:41:04.647 OpenEarsSampleApp[31311:3b03] Audio unit wrapper successfully created.
    2012-10-24 10:41:04.653 OpenEarsSampleApp[31311:3b03] Set audio route to SpeakerAndMicrophone
    2012-10-24 10:41:04.654 OpenEarsSampleApp[31311:3b03] Checking and resetting all audio session settings.
    2012-10-24 10:41:04.656 OpenEarsSampleApp[31311:3b03] audioCategory is correct, we will leave it as it is.
    2012-10-24 10:41:04.658 OpenEarsSampleApp[31311:3b03] bluetoothInput is correct, we will leave it as it is.
    2012-10-24 10:41:04.660 OpenEarsSampleApp[31311:3b03] categoryDefaultToSpeaker is correct, we will leave it as it is.
    2012-10-24 10:41:04.662 OpenEarsSampleApp[31311:3b03] preferredBufferSize is correct, we will leave it as it is.
    2012-10-24 10:41:04.664 OpenEarsSampleApp[31311:3b03] preferredSampleRateCheck is correct, we will leave it as it is.
    2012-10-24 10:41:04.666 OpenEarsSampleApp[31311:3b03] Setting the variables for the device and starting it.
    2012-10-24 10:41:04.668 OpenEarsSampleApp[31311:3b03] Looping through ringbuffer sections and pre-allocating them.
    2012-10-24 10:41:05.244 OpenEarsSampleApp[31311:3b03] Started audio output unit.
    2012-10-24 10:41:05.248 OpenEarsSampleApp[31311:3b03] Calibration has started
    2012-10-24 10:41:05.248 OpenEarsSampleApp[31311:907] Pocketsphinx calibration has started.
    2012-10-24 10:41:07.491 OpenEarsSampleApp[31311:3b03] Calibration has completed
    2012-10-24 10:41:07.491 OpenEarsSampleApp[31311:907] Pocketsphinx calibration is complete.
    2012-10-24 10:41:07.494 OpenEarsSampleApp[31311:3b03] Project has these words in its dictionary:
    BACKWARD
    CHANGE
    FORWARD
    GO
    LEFT
    MODEL
    RIGHT
    TURN
    2012-10-24 10:41:07.495 OpenEarsSampleApp[31311:907] I'm running flite
    2012-10-24 10:41:07.496 OpenEarsSampleApp[31311:3b03] Listening.
    2012-10-24 10:41:07.497 OpenEarsSampleApp[31311:907] Checking and resetting all audio session settings.
    2012-10-24 10:41:07.501 OpenEarsSampleApp[31311:907] audioCategory is correct, we will leave it as it is.
    2012-10-24 10:41:07.503 OpenEarsSampleApp[31311:907] bluetoothInput is correct, we will leave it as it is.
    2012-10-24 10:41:07.505 OpenEarsSampleApp[31311:907] categoryDefaultToSpeaker is correct, we will leave it as it is.
    2012-10-24 10:41:07.509 OpenEarsSampleApp[31311:907] preferredBufferSize is correct, we will leave it as it is.
    2012-10-24 10:41:07.512 OpenEarsSampleApp[31311:907] preferredSampleRateCheck is correct, we will leave it as it is.
    2012-10-24 10:41:07.961 OpenEarsSampleApp[31311:907] I'm done running flite and it took 0.463920 seconds
    2012-10-24 10:41:07.963 OpenEarsSampleApp[31311:907] Flite audio player was nil when referenced so attempting to allocate a new audio player.
    2012-10-24 10:41:07.965 OpenEarsSampleApp[31311:907] Loading speech data for Flite concluded successfully.
    2012-10-24 10:41:08.061 OpenEarsSampleApp[31311:907] Pocketsphinx is now listening.
    2012-10-24 10:41:08.065 OpenEarsSampleApp[31311:907] Flite sending suspend recognition notification.
    2012-10-24 10:41:08.067 OpenEarsSampleApp[31311:907] Flite has started speaking
    2012-10-24 10:41:09.984 OpenEarsSampleApp[31311:907] AVAudioPlayer did finish playing with success flag of 1
    2012-10-24 10:41:10.146 OpenEarsSampleApp[31311:907] Flite sending resume recognition notification.
    2012-10-24 10:41:10.649 OpenEarsSampleApp[31311:907] Flite has finished speaking
    (lldb)

    Followed by termination with Thread 6: EXC_BAD_ACCESS (code=1, address=0x1c);

    #11684
    Halle Winkler
    Politepix

    Does it work if you use a grammar and dictionary combination that doesn’t result in this error from the logs:

    ERROR: “fsg_search.c”, line 334: The word ‘QUIDNUNC’ is missing in the dictionary

    #11685
    Jandr50
    Participant

    I think I’ve solved it. In my hurry to test this out trying to find my crash, I was loading OpenEars2.gram thinking that was the starting file. Turns out if the dictionary doesn’t match the grammar file it crashes hard.

    Switching to OpenEars1.gram seems to work, now just trying to see if that’s the same problem my project had.

    #11687
    Halle Winkler
    Politepix

    OK, let me know if the issue persists with your own app.

    #11688
    Jandr50
    Participant

    After reconfirming how it was supposed to be working, I’ve come to the conclusion it’s unable to parse the grammar file.

    I was trying to use the example JSGF example from CMUSphinx’s page, which is

    #JSGF V1.0;
    grammar samplegrammar;
    public = ;
    = ;
    = /10/ open |/2/ close |/1/ delete |/1/ move;
    = [the | a] (window | file | menu);
    = (please | kindly | could you | oh mighty computer) *;
    = [ please | thanks | thank you ];

    and it was throwing an index out of bounds exception. If I change it to a more direct set of phrases

    #JSGF V1.0;
    grammar samplegrammar;
    public =
    OPEN THE WINDOW |
    CLOSE THE WINDOW |
    DELETE THE WINDOW |
    DELETE THE FILE |
    CLOSE THE FILE;

    It seems to work fine. Honestly though, I can probably get away with simple phrase detection like this for this project.

    EDIT: the tags were parsing out of the CMU code here, but the example on the page still lists it.

    #11690
    Halle Winkler
    Politepix

    OK, I will put this down as a bug since it should also be able to parse CMU’s version, but I’m glad it’s working for you.

    #1015795
    dashesy
    Participant

    I am trying 1.3, and it seems the parsing problem is still there, Is that right or maybe I am doing something wrong.
    I also get a crash, and when I look at the verbose output I see this:

    ERROR: “jsgf_parser.y”, line 155: syntax error, unexpected RULENAME, expecting TOKEN or ‘;’ at line 3 current token ”

    Any advice is appreciated

    #1015796
    dashesy
    Participant

    On further attempt I added a semicolon to the first line, and now it is parsed correctly!
    just wanted to let you know it requires “#JSGF V1.0;”

    Thanks

    #1015798
    Halle Winkler
    Politepix

    Thanks for following up, that will be useful for later readers.

    #1015804
    dashesy
    Participant

    I finally got it all working even with a fairly complex grammar. The main hurdle in all of this is that the grammar parsing may throw errors, but startListeningWithLanguageModelAtPath silently ignores all of that instead of issuing an error.
    The only way to figure that out is to turn on the verbose output and read through the text (I did not expect that so it took more time than it should really because the software works great by itself).
    If it returned an error or if there was a pocketsphinxErrorFound in OpenEarsEventsObserverDelegate one could at least use that when debugging the problems. Just any text with the word “error” is probably an error.

    Thanks for the great software!

    #1015805
    Halle Winkler
    Politepix

    I’m glad you got it worked out! Correct, it is necessary to set OpenEarsLogging and verbosePocketsphinx on as soon as you have any unexpected behavior, and any errors or warnings will be shown.

    #1020922
    Halle Winkler
    Politepix

    Please check out the new dynamic generation language for OpenEars added with version 1.7: https://www.politepix.com/2014/04/10/openears-1-7-introducing-dynamic-grammar-generation/

    #1021031
    Halle Winkler
    Politepix

    In addition to the dynamic grammar generation that has been added to stock OpenEars in version 1.7, there is also a new plugin called RuleORama which can use the same API in order to generate grammars which are a bit faster and compatible with RapidEars: https://www.politepix.com/ruleorama

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.