Changing Lang. Model Dynamically with Rejecto Couldn't Get Attributes of LM

Home Forums OpenEars plugins Changing Lang. Model Dynamically with Rejecto Couldn't Get Attributes of LM

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

  • Author
    Posts
  • #1021951
    piggins
    Participant

    Hi! I’m using the Rejecto plugin along with Open Ears in my app. When I change the language model dynamically in my app, pocketsphinx stops receiving and logging hypotheses. Before I change the language model, it works fine. However, after I do, it stops receiving hypotheses. I turned on OpenEars logging, and the error message is “Error: couldn’t get attributes of language model file.” This is all of the logging:

    Starting dynamic language model generation
    2014-07-14 09:36:41.923 Flashcards[22688:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary4.corpus for reading
    2014-07-14 09:36:41.924 Flashcards[22688:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary4_pipe.txt for writing
    2014-07-14 09:36:41.924 Flashcards[22688:613] Starting text2wfreq_impl
    2014-07-14 09:36:41.929 Flashcards[22688:613] Done with text2wfreq_impl
    2014-07-14 09:36:41.929 Flashcards[22688:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary4_pipe.txt for reading.
    2014-07-14 09:36:41.930 Flashcards[22688:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary4.vocab for reading.
    2014-07-14 09:36:41.931 Flashcards[22688:613] Starting wfreq2vocab
    2014-07-14 09:36:41.931 Flashcards[22688:613] Done with wfreq2vocab
    2014-07-14 09:36:41.932 Flashcards[22688:613] Starting text2idngram
    2014-07-14 09:36:41.937 Flashcards[22688:613] Done with text2idngram
    2014-07-14 09:36:41.940 Flashcards[22688:613] Starting idngram2lm

    2014-07-14 09:36:41.943 Flashcards[22688:613] Done with idngram2lm
    2014-07-14 09:36:41.944 Flashcards[22688:613] Starting sphinx_lm_convert
    2014-07-14 09:36:41.948 Flashcards[22688:613] Finishing sphinx_lm_convert
    2014-07-14 09:36:41.949 Flashcards[22688:613] Done creating language model with CMUCLMTK in 0.026836 seconds.
    2014-07-14 09:36:41.949 Flashcards[22688:613] Starting sphinx_lm_convert
    2014-07-14 09:36:41.952 Flashcards[22688:613] Finishing sphinx_lm_convert
    2014-07-14 09:36:41.953 Flashcards[22688:613] I’m done running dynamic language model generation and it took 427048601.953926 seconds
    2014-07-14 09:36:41.954 Flashcards[22688:613] setSecondsOfSilence value of 0.000000 was too large or too small or was NULL, using default of 0.700000.
    2014-07-14 09:36:41.956 Flashcards[22688:3b03] there is a request to change to the language model file /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary4.DMP
    2014-07-14 09:36:41.977 Flashcards[22688:3b03] A request has been made to change an ARPA grammar on the fly. The language model to change to is /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary4.DMP
    2014-07-14 09:36:41.977 Flashcards[22688:3b03] Error: couldn’t get attributes of language model file.
    2014-07-14 09:36:41.985 Flashcards[22688:3b03] languageModelID is 999
    2014-07-14 09:36:42.064 Flashcards[22688:3b03] Success loading the dictionary file /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary4.dic.
    2014-07-14 09:36:42.064 Flashcards[22688:3b03] There were too many errors to switch the language model or grammar, please search the console for the word ‘error’ to investigate the issues.

    #1021952
    Halle Winkler
    Politepix

    Welcome,

    Sure, I can see if I can help with this. Go ahead and show the full unedited logging output with OpenEarsLogging and verbosePocketsphinx set on since it should show the issue. Also be sure to let me know the iOS version and Xcode version you’re seeing the issue with, and test against a real device rather than the Simulator.

    #1021953
    piggins
    Participant

    This is the full logging output with OpenEarsLogging and verbosePocketsphinx set on. Does anything jump out to you?

    2014-07-14 11:53:57.198 Flashcards[23135:613] Starting OpenEars logging for OpenEars version 1.7 on 64-bit device: iPhone Simulator running iOS version: 7.100000
    2014-07-14 11:53:57.345 Flashcards[23135:613] SHAMEFUL
    2014-07-14 11:53:57.347 Flashcards[23135:613] Vocabulary1
    2014-07-14 11:53:57.473 Flashcards[23135:613] I’m done running performDictionaryLookup and it took 0.051119 seconds
    2014-07-14 11:53:57.521 Flashcards[23135:613] Starting dynamic language model generation
    2014-07-14 11:53:57.539 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.corpus for reading
    2014-07-14 11:53:57.539 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1_pipe.txt for writing
    2014-07-14 11:53:57.540 Flashcards[23135:613] Starting text2wfreq_impl
    2014-07-14 11:53:57.606 Flashcards[23135:613] Done with text2wfreq_impl
    2014-07-14 11:53:57.606 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1_pipe.txt for reading.
    2014-07-14 11:53:57.677 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.vocab for reading.
    2014-07-14 11:53:57.678 Flashcards[23135:613] Starting wfreq2vocab
    2014-07-14 11:53:57.679 Flashcards[23135:613] Done with wfreq2vocab
    2014-07-14 11:53:57.680 Flashcards[23135:613] Starting text2idngram
    2014-07-14 11:53:57.687 Flashcards[23135:613] Done with text2idngram
    2014-07-14 11:53:57.689 Flashcards[23135:613] Starting idngram2lm

    2014-07-14 11:53:57.787 Flashcards[23135:613] Done with idngram2lm
    2014-07-14 11:53:57.788 Flashcards[23135:613] Starting sphinx_lm_convert
    2014-07-14 11:53:57.821 Flashcards[23135:613] Finishing sphinx_lm_convert
    2014-07-14 11:53:57.823 Flashcards[23135:613] Done creating language model with CMUCLMTK in 0.300977 seconds.
    2014-07-14 11:53:57.823 Flashcards[23135:613] Starting sphinx_lm_convert
    2014-07-14 11:53:57.828 Flashcards[23135:613] Finishing sphinx_lm_convert
    2014-07-14 11:53:57.829 Flashcards[23135:613] I’m done running dynamic language model generation and it took 427056837.829542 seconds
    2014-07-14 11:53:57.832 Flashcards[23135:613] User gave mic permission for this app.
    2014-07-14 11:53:57.833 Flashcards[23135:613] Leaving sample rate at the default of 16000.
    2014-07-14 11:53:57.834 Flashcards[23135:613] The audio session has already been initialized but we will override its properties.
    2014-07-14 11:53:57.834 Flashcards[23135:613] Checking and resetting all audio session settings.
    2014-07-14 11:53:57.835 Flashcards[23135:613] audioCategory is incorrect, we will change it.
    2014-07-14 11:53:57.835 Flashcards[23135:613] audioCategory is now on the correct setting of kAudioSessionCategory_PlayAndRecord.
    2014-07-14 11:53:57.836 Flashcards[23135:613] bluetoothInput is incorrect, we will change it.
    2014-07-14 11:53:57.836 Flashcards[23135:613] bluetooth input is now on the correct setting of 1.
    2014-07-14 11:53:57.837 Flashcards[23135:613] Output Device: Speaker.
    2014-07-14 11:53:57.837 Flashcards[23135:613] categoryDefaultToSpeaker is incorrect, we will change it.
    2014-07-14 11:53:57.874 Flashcards[23135:613] CategoryDefaultToSpeaker is now on the correct setting of 1.
    2014-07-14 11:53:57.893 Flashcards[23135:613] preferredBufferSize is incorrect, we will change it.
    2014-07-14 11:53:57.893 Flashcards[23135:613] PreferredBufferSize is now on the correct setting of 0.128000.
    2014-07-14 11:53:57.894 Flashcards[23135:613] preferredSampleRateCheck is incorrect, we will change it.
    2014-07-14 11:53:57.894 Flashcards[23135:613] preferred hardware sample rate is now on the correct setting of 16000.000000.
    2014-07-14 11:53:57.895 Flashcards[23135:613] AudioSessionManager startAudioSession has reached the end of the initialization.
    2014-07-14 11:53:57.895 Flashcards[23135:613] Exiting startAudioSession.
    2014-07-14 11:53:57.896 Flashcards[23135:3c03] setSecondsOfSilence value of 0.000000 was too large or too small or was NULL, using default of 0.700000.
    2014-07-14 11:53:57.897 Flashcards[23135:3c03] Project has these words or phrases in its dictionary:
    ___REJ_AA
    ___REJ_AE
    ___REJ_AH
    ___REJ_AO
    ___REJ_AW
    ___REJ_AY
    ___REJ_B
    ___REJ_CH
    ___REJ_D
    ___REJ_DH
    ___REJ_EH
    ___REJ_ER
    ___REJ_EY
    ___REJ_F
    ___REJ_G
    ___REJ_HH
    ___REJ_IH
    ___REJ_IY
    ___REJ_JH
    ___REJ_K
    ___REJ_L
    ___REJ_M
    ___REJ_N
    ___REJ_NG
    ___REJ_OW
    ___REJ_OY
    ___REJ_P
    ___REJ_R
    ___REJ_S
    ___REJ_SH
    ___REJ_T
    …and 10 more.
    2014-07-14 11:53:57.898 Flashcards[23135:3c03] Recognition loop has started
    INFO: file_omitted(0): Parsing command line:
    \
    -lm /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.DMP \
    -beam 1e-96 \
    -bestpath no \
    -dict /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.dic \
    -fwdflatbeam 1e-128 \
    -hmm /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle \
    -lw 6.500000 \
    -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-96
    -bestpath yes no
    -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 /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.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-128
    -fwdflatefwid 4 4
    -fwdflatlw 8.5 8.500000e+00
    -fwdflatsfwin 25 25
    -fwdflatwbeam 7e-29 7.000000e-29
    -fwdtree yes yes
    -hmm /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle
    -input_endian little little
    -jsgf
    -kdmaxbbi -1 -1
    -kdmaxdepth 0 0
    -kdtree
    -latsize 5000 5000
    -lda
    -ldadim 0 0
    -lextreedump 0 0
    -lifter 0 0
    -lm /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.DMP
    -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 6.500000e+00
    -maxhmmpf -1 -1
    -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

    INFO: file_omitted(0): 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: file_omitted(0): Parsed model-specific feature parameters from /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/feat.params
    INFO: file_omitted(0): Initializing feature stream to type: ‘1s_c_d_dd’, ceplen=13, CMN=’current’, VARNORM=’no’, AGC=’none’
    INFO: file_omitted(0): mean[0]= 12.00, mean[1..12]= 0.0
    INFO: file_omitted(0): Using subvector specification 0-12/13-25/26-38
    INFO: file_omitted(0): Reading model definition: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/mdef
    INFO: file_omitted(0): Found byte-order mark BMDF, assuming this is a binary mdef file
    INFO: file_omitted(0): Reading binary model definition: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/mdef
    INFO: file_omitted(0): 50 CI-phone, 143047 CD-phone, 3 emitstate/phone, 150 CI-sen, 5150 Sen, 27135 Sen-Seq
    INFO: file_omitted(0): Reading HMM transition probability matrices: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/transition_matrices
    INFO: file_omitted(0): Attempting to use SCHMM computation module
    INFO: file_omitted(0): Reading mixture gaussian parameter: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/means
    INFO: file_omitted(0): 1 codebook, 3 feature, size:
    INFO: file_omitted(0): 256×13
    INFO: file_omitted(0): 256×13
    INFO: file_omitted(0): 256×13
    INFO: file_omitted(0): Reading mixture gaussian parameter: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/variances
    INFO: file_omitted(0): 1 codebook, 3 feature, size:
    INFO: file_omitted(0): 256×13
    INFO: file_omitted(0): 256×13
    INFO: file_omitted(0): 256×13
    INFO: file_omitted(0): 0 variance values floored
    INFO: file_omitted(0): Loading senones from dump file /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/sendump
    INFO: file_omitted(0): BEGIN FILE FORMAT DESCRIPTION
    INFO: file_omitted(0): Using memory-mapped I/O for senones
    INFO: file_omitted(0): Maximum top-N: 4 Top-N beams: 0 0 0
    INFO: file_omitted(0): Allocating 4147 * 32 bytes (129 KiB) for word entries
    INFO: file_omitted(0): Reading main dictionary: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.dic
    INFO: file_omitted(0): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: file_omitted(0): 40 words read
    INFO: file_omitted(0): Reading filler dictionary: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/noisedict
    INFO: file_omitted(0): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: file_omitted(0): 11 words read
    INFO: file_omitted(0): Building PID tables for dictionary
    INFO: file_omitted(0): Allocating 50^3 * 2 bytes (244 KiB) for word-initial triphones
    INFO: file_omitted(0): Allocated 60400 bytes (58 KiB) for word-final triphones
    INFO: file_omitted(0): Allocated 60400 bytes (58 KiB) for single-phone word triphones
    ERROR: “file_omitted”, line 0: File /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary1.DMP not found
    INFO: file_omitted(0): Will use memory-mapped I/O for LM file
    INFO: file_omitted(0): ngrams 1=42, 2=80, 3=40
    INFO: file_omitted(0): 42 = LM.unigrams(+trailer) read
    INFO: file_omitted(0): 80 = LM.bigrams(+trailer) read
    INFO: file_omitted(0): 40 = LM.trigrams read
    INFO: file_omitted(0): 3 = LM.prob2 entries read
    INFO: file_omitted(0): 3 = LM.bo_wt2 entries read
    INFO: file_omitted(0): 2 = LM.prob3 entries read
    INFO: file_omitted(0): 1 = LM.tseg_base entries read
    INFO: file_omitted(0): 42 = ascii word strings read
    INFO: file_omitted(0): 1 unique initial diphones
    INFO: file_omitted(0): 0 root, 0 non-root channels, 51 single-phone words
    INFO: file_omitted(0): Creating search tree
    INFO: file_omitted(0): before: 0 root, 0 non-root channels, 51 single-phone words
    INFO: file_omitted(0): after: max nonroot chan increased to 132
    INFO: file_omitted(0): after: 1 root, 4 non-root channels, 50 single-phone words
    INFO: file_omitted(0): fwdflat: min_ef_width = 4, max_sf_win = 25
    2014-07-14 11:53:58.252 Flashcards[23135:3c03] Starting openAudioDevice on the simulator. This Simulator-compatible audio driver is only provided to you as a convenience so you can use the Simulator to test recognition logic, however, its audio driver is not supported and bug reports for it will be circular-filed.
    2014-07-14 11:53:58.287 Flashcards[23135:3c03] Restoring SmartCMN value of 35.114819
    2014-07-14 11:53:59.131 Flashcards[23135:3c03] Calibration has started
    2014-07-14 11:54:01.332 Flashcards[23135:3c03] Calibration has completed
    2014-07-14 11:54:01.333 Flashcards[23135:3c03] Listening.
    2014-07-14 11:54:01.333 Flashcards[23135:613] Started Listening
    2014-07-14 11:54:34.916 Flashcards[23135:613] SPASMODIC
    2014-07-14 11:54:34.917 Flashcards[23135:613] Vocabulary2
    2014-07-14 11:54:35.017 Flashcards[23135:613] I’m done running performDictionaryLookup and it took 0.048521 seconds
    2014-07-14 11:54:35.020 Flashcards[23135:613] Starting dynamic language model generation
    2014-07-14 11:54:35.021 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.corpus for reading
    2014-07-14 11:54:35.049 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2_pipe.txt for writing
    2014-07-14 11:54:35.049 Flashcards[23135:613] Starting text2wfreq_impl
    2014-07-14 11:54:35.070 Flashcards[23135:613] Done with text2wfreq_impl
    2014-07-14 11:54:35.070 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2_pipe.txt for reading.
    2014-07-14 11:54:35.071 Flashcards[23135:613] Able to open /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.vocab for reading.
    2014-07-14 11:54:35.071 Flashcards[23135:613] Starting wfreq2vocab
    2014-07-14 11:54:35.088 Flashcards[23135:613] Done with wfreq2vocab
    2014-07-14 11:54:35.089 Flashcards[23135:613] Starting text2idngram
    2014-07-14 11:54:35.110 Flashcards[23135:613] Done with text2idngram
    2014-07-14 11:54:35.112 Flashcards[23135:613] Starting idngram2lm

    2014-07-14 11:54:35.115 Flashcards[23135:613] Done with idngram2lm
    2014-07-14 11:54:35.115 Flashcards[23135:613] Starting sphinx_lm_convert
    INFO: file_omitted(0): Parsing command line:
    sphinx_lm_convert \
    -i /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.arpa \
    -o /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -case
    -debug 0
    -help no no
    -i /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.arpa
    -ienc
    -ifmt
    -logbase 1.0001 1.000100e+00
    -mmap no no
    -o /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP
    -oenc utf8 utf8
    -ofmt

    INFO: file_omitted(0): ngrams 1=42, 2=80, 3=40
    INFO: file_omitted(0): Reading unigrams
    INFO: file_omitted(0): 42 = #unigrams created
    INFO: file_omitted(0): Reading bigrams
    INFO: file_omitted(0): 80 = #bigrams created
    INFO: file_omitted(0): 3 = #prob2 entries
    INFO: file_omitted(0): 3 = #bo_wt2 entries
    INFO: file_omitted(0): Reading trigrams
    INFO: file_omitted(0): 40 = #trigrams created
    INFO: file_omitted(0): 2 = #prob3 entries
    INFO: file_omitted(0): Building DMP model…
    INFO: file_omitted(0): 42 = #unigrams created
    INFO: file_omitted(0): 80 = #bigrams created
    INFO: file_omitted(0): 3 = #prob2 entries
    INFO: file_omitted(0): 3 = #bo_wt2 entries
    INFO: file_omitted(0): 40 = #trigrams created
    INFO: file_omitted(0): 2 = #prob3 entries
    2014-07-14 11:54:35.119 Flashcards[23135:613] Finishing sphinx_lm_convert
    2014-07-14 11:54:35.120 Flashcards[23135:613] Done creating language model with CMUCLMTK in 0.099981 seconds.
    2014-07-14 11:54:35.120 Flashcards[23135:613] Starting sphinx_lm_convert
    INFO: file_omitted(0): Parsing command line:
    sphinx_lm_convert \
    -i /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.arpa \
    -o /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -case
    -debug 0
    -help no no
    -i /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.arpa
    -ienc
    -ifmt
    -logbase 1.0001 1.000100e+00
    -mmap no no
    -o /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP
    -oenc utf8 utf8
    -ofmt

    INFO: file_omitted(0): ngrams 1=42, 2=80, 3=40
    INFO: file_omitted(0): Reading unigrams
    INFO: file_omitted(0): 42 = #unigrams created
    INFO: file_omitted(0): Reading bigrams
    INFO: file_omitted(0): 80 = #bigrams created
    INFO: file_omitted(0): 3 = #prob2 entries
    INFO: file_omitted(0): 3 = #bo_wt2 entries
    INFO: file_omitted(0): Reading trigrams
    INFO: file_omitted(0): 40 = #trigrams created
    INFO: file_omitted(0): 2 = #prob3 entries
    INFO: file_omitted(0): Building DMP model…
    INFO: file_omitted(0): 42 = #unigrams created
    INFO: file_omitted(0): 80 = #bigrams created
    INFO: file_omitted(0): 3 = #prob2 entries
    INFO: file_omitted(0): 3 = #bo_wt2 entries
    INFO: file_omitted(0): 40 = #trigrams created
    INFO: file_omitted(0): 2 = #prob3 entries
    2014-07-14 11:54:35.124 Flashcards[23135:613] Finishing sphinx_lm_convert
    2014-07-14 11:54:35.125 Flashcards[23135:613] I’m done running dynamic language model generation and it took 427056875.125829 seconds
    2014-07-14 11:54:35.126 Flashcards[23135:613] setSecondsOfSilence value of 0.000000 was too large or too small or was NULL, using default of 0.700000.
    2014-07-14 11:54:35.149 Flashcards[23135:3c03] there is a request to change to the language model file /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP
    2014-07-14 11:54:35.150 Flashcards[23135:3c03] A request has been made to change an ARPA grammar on the fly. The language model to change to is /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP
    2014-07-14 11:54:35.151 Flashcards[23135:3c03] Error: couldn’t get attributes of language model file.
    ERROR: “file_omitted”, line 0: File /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP not found
    INFO: file_omitted(0): Will use memory-mapped I/O for LM file
    INFO: file_omitted(0): ngrams 1=42, 2=80, 3=40
    INFO: file_omitted(0): 42 = LM.unigrams(+trailer) read
    INFO: file_omitted(0): 80 = LM.bigrams(+trailer) read
    INFO: file_omitted(0): 40 = LM.trigrams read
    INFO: file_omitted(0): 3 = LM.prob2 entries read
    INFO: file_omitted(0): 3 = LM.bo_wt2 entries read
    INFO: file_omitted(0): 2 = LM.prob3 entries read
    INFO: file_omitted(0): 1 = LM.tseg_base entries read
    INFO: file_omitted(0): 42 = ascii word strings read
    2014-07-14 11:54:35.173 Flashcards[23135:3c03] languageModelID is 999
    INFO: file_omitted(0): 1 unique initial diphones
    INFO: file_omitted(0): 0 root, 0 non-root channels, 51 single-phone words
    INFO: file_omitted(0): Creating search tree
    INFO: file_omitted(0): before: 0 root, 0 non-root channels, 51 single-phone words
    ERROR: “file_omitted”, line 0: No word from the language model has pronunciation in the dictionary
    INFO: file_omitted(0): after: 0 root, 0 non-root channels, 50 single-phone words
    INFO: file_omitted(0): Parsing command line:

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -agc none none
    -agcthresh 2.0 2.000000e+00
    -alpha 0.97 9.700000e-01
    -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
    -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
    -input_endian little little
    -jsgf
    -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 6.500000e+00
    -maxhmmpf -1 -1
    -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

    INFO: file_omitted(0): Allocating 4147 * 32 bytes (129 KiB) for word entries
    INFO: file_omitted(0): Reading main dictionary: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.dic
    INFO: file_omitted(0): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: file_omitted(0): 40 words read
    INFO: file_omitted(0): Reading filler dictionary: /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Flashcards.app/AcousticModelEnglish.bundle/noisedict
    INFO: file_omitted(0): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: file_omitted(0): 11 words read
    INFO: file_omitted(0): Building PID tables for dictionary
    INFO: file_omitted(0): Allocating 50^3 * 2 bytes (244 KiB) for word-initial triphones
    INFO: file_omitted(0): Allocated 60400 bytes (58 KiB) for word-final triphones
    INFO: file_omitted(0): Allocated 60400 bytes (58 KiB) for single-phone word triphones
    INFO: file_omitted(0): 1 unique initial diphones
    INFO: file_omitted(0): 0 root, 0 non-root channels, 51 single-phone words
    INFO: file_omitted(0): Creating search tree
    INFO: file_omitted(0): before: 0 root, 0 non-root channels, 51 single-phone words
    INFO: file_omitted(0): after: 1 root, 7 non-root channels, 50 single-phone words
    2014-07-14 11:54:35.290 Flashcards[23135:3c03] Success loading the dictionary file /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.dic.
    2014-07-14 11:54:35.291 Flashcards[23135:3c03] There were too many errors to switch the language model or grammar, please search the console for the word ‘error’ to investigate the issues.
    2014-07-14 11:54:35.291 Flashcards[23135:3c03] Listening.
    2014-07-14 11:54:35.292 Flashcards[23135:613] Started Listening

    #1021954
    piggins
    Participant

    Also, I was testing on iOS 7.1 with Xcode 5.1.1

    I’m really sorry about the length of the logging. It might be helpful to isolate the lines that seem to show the error:

    2014-07-14 11:54:35.151 Flashcards[23135:3c03] Error: couldn’t get attributes of language model file.
    ERROR: “file_omitted”, line 0: File /Users/SameerVijay/Library/Application Support/iPhone Simulator/7.1-64/Applications/8D531DE6-BD29-44C8-8DC1-7FC9EB62BAED/Library/Caches/Vocabulary2.DMP not found

    It says that the file can’t be found, but I’m fairly sure I created the file using:

    NSError *err = [lmGenerator generateRejectingLanguageModelFromArray:vocab withFilesNamed:name withOptionalExclusions:nil usingVowelsOnly:FALSE withWeight:nil forAcousticModelAtPath:[AcousticModel pathToModel:@”AcousticModelEnglish”]];

    NSDictionary *languageGeneratorResults = [err userInfo];

    if([err code] == noErr) {

    lmPath = [languageGeneratorResults objectForKey:@”LMPath”];
    dicPath = [languageGeneratorResults objectForKey:@”DictionaryPath”];
    }

    Thanks for any help!

    #1021959
    Halle Winkler
    Politepix

    Does the issue with no longer getting hypotheses happen the very first time you change models, or does it happen the second and later times only? That is, can you make one single successful change and still get hypotheses or does it stop working any time there is a change request?

    The file not found errors are actually false positives – the .DMP and .dic files are being loaded correctly, but this could nonetheless be a bug due to the “couldn’t get attributes” issue.

    #1021967
    piggins
    Participant

    The issue only occurs the second and later times. That is exactly the behavior. The first time I try it, after starting the app, it works perfectly. I can change the language model once, and it works perfectly again. Any further changes, however, cause this error to occur. Also, thanks a lot for the prompt replies!

    #1021968
    piggins
    Participant

    Is this a known issue that can be fixed, given the fact that the situation you previously described is exactly what’s happening to me? Thanks again!

    #1021969
    Halle Winkler
    Politepix

    No problem! I appreciate hearing about the bug. Are you comfortable making changes to the OpenEars project and recompiling the framework? I could suggest a change you could test.

    #1021970
    piggins
    Participant

    Absolutely! If there’s any possible fix I’d love to hear it.

    #1021971
    Halle Winkler
    Politepix

    OK, I will do a permanent fix for this in the next version, but for now, look for this chunk in ContinuousModel.m:

    		NSFileManager *fileManager = [[NSFileManager alloc] init];
    		NSError *error = nil;
    		NSDictionary *fileAttributes = [fileManager attributesOfItemAtPath:self.languageModelFileToChangeTo error:&error];
    		if(error) {
    			if(openears_logging == 1) NSLog(@"Error: couldn't get attributes of language model file.");
                fatalErrors++;
    		} else {
    			if(openears_logging == 1) NSLog(@"In this session, the requested language model will be known to Pocketsphinx as id %@.",[fileAttributes valueForKey:NSFileSystemFileNumber]);
    			languageModelID = [fileAttributes valueForKey:NSFileSystemFileNumber];
    		}
            
    		[fileManager release];
    

    I think this issue should be fixed if you comment this entire section above out, and change this line which precedes it:

    NSNumber *languageModelID = [NSNumber numberWithInt:999];
    

    So that the integer 999 is basically replaced with any guaranteed-to-be-unique int for that listening loop instance. So you could have a property int that increments right before it is assigned to that NSNumber, or you could derive it from a datestamp, or any similar approach to get a new number that you like. The goal is just to make sure that where it says 999 above is replaced with some other int which is definitely unique for every language model change request within a single run of the continuous listening loop.

    I would expect this to work – let me know if the 2nd and later model changes start listening successfully again.

    #1021972
    piggins
    Participant

    This fix worked perfectly! Thanks for all the help Halle!

    #1021977
    Halle Winkler
    Politepix

    Glad to hear it! Thanks for the bug report.

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