Reply To: Enabling Bluetooth Support

Home Forums OpenEars Enabling Bluetooth Support Reply To: Enabling Bluetooth Support

#15168
markNZed
Participant

Hi Halle, thanks for your reply. I’m not good enough at coding to call myself a developer so please excuse my lack of iOS knowledge. I can get the OpenEars demo to crash if it detects the BT headset on startup. I’m using the Motorola HS850 headset (very old)

In the log that follows you can see the infamous “AUIOClient_StartIO failed”

2012-12-28 23:50:12.134 OpenEarsSampleApp[12658:907] Starting OpenEars logging for OpenEars version 1.2.3 on device: iPhone running iOS version: 6.000000
2012-12-28 23:50:12.140 OpenEarsSampleApp[12658:907] Normalized array contains the following entries:
(
SUNDAY,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
QUIDNUNC,
“CHANGE MODEL”
)
2012-12-28 23:50:12.143 OpenEarsSampleApp[12658:907] Starting dynamic language model generation
2012-12-28 23:50:12.146 OpenEarsSampleApp[12658:907] Able to open /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/Documents/OpenEarsDynamicGrammar.corpus for reading
2012-12-28 23:50:12.148 OpenEarsSampleApp[12658:907] Able to open /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/Documents/OpenEarsDynamicGrammar_pipe.txt for writing
2012-12-28 23:50:12.149 OpenEarsSampleApp[12658:907] Starting text2wfreq_impl
2012-12-28 23:50:12.167 OpenEarsSampleApp[12658:907] Done with text2wfreq_impl
2012-12-28 23:50:12.169 OpenEarsSampleApp[12658:907] Able to open /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/Documents/OpenEarsDynamicGrammar_pipe.txt for reading.
2012-12-28 23:50:12.171 OpenEarsSampleApp[12658:907] Able to open /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/Documents/OpenEarsDynamicGrammar.vocab for reading.
2012-12-28 23:50:12.172 OpenEarsSampleApp[12658:907] Starting wfreq2vocab
2012-12-28 23:50:12.174 OpenEarsSampleApp[12658:907] Done with wfreq2vocab
2012-12-28 23:50:12.176 OpenEarsSampleApp[12658:907] Starting text2idngram
2012-12-28 23:50:12.196 OpenEarsSampleApp[12658:907] Done with text2idngram
2012-12-28 23:50:12.200 OpenEarsSampleApp[12658:907] Starting idngram2lm

2012-12-28 23:50:12.210 OpenEarsSampleApp[12658:907] Done with idngram2lm
2012-12-28 23:50:12.211 OpenEarsSampleApp[12658:907] Starting sphinx_lm_convert
2012-12-28 23:50:12.222 OpenEarsSampleApp[12658:907] Finishing sphinx_lm_convert
2012-12-28 23:50:12.226 OpenEarsSampleApp[12658:907] Done creating language model with CMUCLMTK in 0.082105 seconds.
2012-12-28 23:50:12.361 OpenEarsSampleApp[12658:907] The word QUIDNUNC was not found in the dictionary /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/cmu07a.dic.
2012-12-28 23:50:12.362 OpenEarsSampleApp[12658:907] Now using the fallback method to look up the word QUIDNUNC
2012-12-28 23:50:12.369 OpenEarsSampleApp[12658:907] Using convertGraphemes for the word or phrase QUIDNUNC which doesn’t appear in the dictionary
2012-12-28 23:50:12.406 OpenEarsSampleApp[12658: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-12-28 23:50:12.436 OpenEarsSampleApp[12658:907] I’m done running performDictionaryLookup and it took 0.151596 seconds
2012-12-28 23:50:12.441 OpenEarsSampleApp[12658:907] I’m done running dynamic language model generation and it took 378384612.441783 seconds
2012-12-28 23:50:12.443 OpenEarsSampleApp[12658:907] Dynamic language generator completed successfully, you can find your new files OpenEarsDynamicGrammar.DMP
and
OpenEarsDynamicGrammar.dic
at the paths
/var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/Documents/OpenEarsDynamicGrammar.DMP
and
/var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/Documents/OpenEarsDynamicGrammar.dic
2012-12-28 23:50:12.444 OpenEarsSampleApp[12658: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-12-28 23:50:12.447 OpenEarsSampleApp[12658: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-12-28 23:50:12.450 OpenEarsSampleApp[12658:907] The audio session has never been initialized so we will do that now.
2012-12-28 23:50:12.452 OpenEarsSampleApp[12658:907] Checking and resetting all audio session settings.
2012-12-28 23:50:12.453 OpenEarsSampleApp[12658:907] audioCategory is incorrect, we will change it.
2012-12-28 23:50:12.455 OpenEarsSampleApp[12658:907] audioCategory is now on the correct setting of kAudioSessionCategory_PlayAndRecord.
2012-12-28 23:50:12.456 OpenEarsSampleApp[12658:907] bluetoothInput is incorrect, we will change it.
2012-12-28 23:50:12.458 OpenEarsSampleApp[12658:907] bluetooth input is now on the correct setting of 1.
2012-12-28 23:50:12.459 OpenEarsSampleApp[12658:907] categoryDefaultToSpeaker is incorrect, we will change it.
2012-12-28 23:50:12.461 OpenEarsSampleApp[12658:907] CategoryDefaultToSpeaker is now on the correct setting of 1.
2012-12-28 23:50:12.462 OpenEarsSampleApp[12658:907] preferredBufferSize is incorrect, we will change it.
2012-12-28 23:50:12.463 OpenEarsSampleApp[12658:907] PreferredBufferSize is now on the correct setting of 0.128000.
2012-12-28 23:50:12.465 OpenEarsSampleApp[12658:907] preferredSampleRateCheck is incorrect, we will change it.
2012-12-28 23:50:12.467 OpenEarsSampleApp[12658:907] preferred hardware sample rate is now on the correct setting of 16000.000000.
2012-12-28 23:50:12.512 OpenEarsSampleApp[12658:907] AudioSessionManager startAudioSession has reached the end of the initialization.
2012-12-28 23:50:12.515 OpenEarsSampleApp[12658:907] Exiting startAudioSession.
2012-12-28 23:50:12.521 OpenEarsSampleApp[12658:3c03] Recognition loop has started
INFO: cmd_ln.c(706): Parsing command line:
\
-lm /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/OpenEars1.languagemodel \
-dict /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/OpenEars1.dic \
-hmm /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app \
-lw 6.500000 \
-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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app
-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 /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/OpenEars1.languagemodel
-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 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

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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/feat.params
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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/mdef
2012-12-28 23:50:12.549 OpenEarsSampleApp[12658:907] Pocketsphinx is starting up.
2012-12-28 23:50:12.578 OpenEarsSampleApp[12658:907] The audio session has already been initialized but we will override its properties.
2012-12-28 23:50:12.579 OpenEarsSampleApp[12658:907] Checking and resetting all audio session settings.
2012-12-28 23:50:12.583 OpenEarsSampleApp[12658:907] audioCategory is correct, we will leave it as it is.
2012-12-28 23:50:12.586 OpenEarsSampleApp[12658:907] bluetoothInput is correct, we will leave it as it is.
2012-12-28 23:50:12.588 OpenEarsSampleApp[12658:907] categoryDefaultToSpeaker is correct, we will leave it as it is.
2012-12-28 23:50:12.589 OpenEarsSampleApp[12658:907] preferredBufferSize is correct, we will leave it as it is.
2012-12-28 23:50:12.591 OpenEarsSampleApp[12658:907] preferredSampleRateCheck is correct, we will leave it as it is.
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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/transition_matrices
INFO: acmod.c(125): Attempting to use SCHMM computation module
2012-12-28 23:50:12.593 OpenEarsSampleApp[12658:907] AudioSessionManager startAudioSession has reached the end of the initialization.
2012-12-28 23:50:12.595 OpenEarsSampleApp[12658:907] Exiting startAudioSession.
INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/means
INFO: ms_gauden.c(292): 1 codebook, 3 feature, size:
INFO: ms_gauden.c(294): 256×13
INFO: ms_gauden.c(294): 256×13
INFO: ms_gauden.c(294): 256×13
INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/OpenEarsSampleApp.app/variances
INFO: ms_gauden.c(292): 1 codebook, 3 feature, size:
INFO: ms_gauden.c(294): 256×13
INFO: ms_gauden.c(294): 256×13
INFO: ms_gauden.c(294): 256×13
INFO: ms_gauden.c(354): 0 variance values floored
INFO: s2_semi_mgau.c(995): Loading senones from dump file /var/mobile/Applications/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/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/37466C01-3CCE-4E8E-A939-BA60EDD9C2DA/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: ngram_model_arpa.c(488): ngrams 1=10, 2=16, 3=8
INFO: ngram_model_arpa.c(143): Reading unigrams
INFO: ngram_model_arpa.c(528): 10 = #unigrams created
INFO: ngram_model_arpa.c(204): Reading bigrams
INFO: ngram_model_arpa.c(547): 16 = #bigrams created
INFO: ngram_model_arpa.c(548): 3 = #prob2 entries
INFO: ngram_model_arpa.c(558): 3 = #bo_wt2 entries
INFO: ngram_model_arpa.c(302): Reading trigrams
INFO: ngram_model_arpa.c(573): 8 = #trigrams created
INFO: ngram_model_arpa.c(574): 2 = #prob3 entries
INFO: ngram_search_fwdtree.c(99): 8 unique initial diphones
INFO: ngram_search_fwdtree.c(147): 0 root, 0 non-root channels, 12 single-phone words
INFO: ngram_search_fwdtree.c(186): Creating search tree
INFO: ngram_search_fwdtree.c(191): before: 0 root, 0 non-root channels, 12 single-phone words
INFO: ngram_search_fwdtree.c(326): after: max nonroot chan increased to 145
INFO: ngram_search_fwdtree.c(338): after: 8 root, 17 non-root channels, 11 single-phone words
INFO: ngram_search_fwdflat.c(167): fwdflat: min_ef_width = 4, max_sf_win = 25
2012-12-28 23:50:12.652 OpenEarsSampleApp[12658:3c03] Starting openAudioDevice on the device.
2012-12-28 23:50:12.654 OpenEarsSampleApp[12658:3c03] Audio unit wrapper successfully created.
2012-12-28 23:50:12.658 OpenEarsSampleApp[12658:3c03] Set audio route to HeadsetBT
2012-12-28 23:50:12.660 OpenEarsSampleApp[12658:3c03] Checking and resetting all audio session settings.
2012-12-28 23:50:12.661 OpenEarsSampleApp[12658:3c03] audioCategory is correct, we will leave it as it is.
2012-12-28 23:50:12.662 OpenEarsSampleApp[12658:3c03] bluetoothInput is correct, we will leave it as it is.
2012-12-28 23:50:12.663 OpenEarsSampleApp[12658:3c03] categoryDefaultToSpeaker is correct, we will leave it as it is.
2012-12-28 23:50:12.665 OpenEarsSampleApp[12658:3c03] preferredBufferSize is correct, we will leave it as it is.
2012-12-28 23:50:12.666 OpenEarsSampleApp[12658:3c03] preferredSampleRateCheck is correct, we will leave it as it is.
2012-12-28 23:50:12.667 OpenEarsSampleApp[12658:3c03] Setting the variables for the device and starting it.
2012-12-28 23:50:12.668 OpenEarsSampleApp[12658:3c03] Looping through ringbuffer sections and pre-allocating them.
2012-12-28 23:50:15.733 OpenEarsSampleApp[12658:3c03] 23:50:15.733 AUIOClient_StartIO failed (2003329396)
2012-12-28 23:50:15.734 OpenEarsSampleApp[12658:3c03] Couldn’t start audio unit output: 2003329396
2012-12-28 23:50:15.736 OpenEarsSampleApp[12658:3c03] startRecording failed
2012-12-28 23:50:15.737 OpenEarsSampleApp[12658:3c03] Calibration has started
2012-12-28 23:50:15.737 OpenEarsSampleApp[12658:907] Setting up the continuous recognition loop has failed for some reason, please turn on [OpenEarsLogging startOpenEarsLogging] in OpenEarsConfig.h to learn more.
2012-12-28 23:50:15.739 OpenEarsSampleApp[12658:907] Pocketsphinx calibration has started.
2012-12-28 23:50:17.938 OpenEarsSampleApp[12658:3c03] cont_ad_calib failed
2012-12-28 23:50:17.941 OpenEarsSampleApp[12658:3c03] Calibration has completed
2012-12-28 23:50:17.941 OpenEarsSampleApp[12658:907] Setting up the continuous recognition loop has failed for some reason, please turn on [OpenEarsLogging startOpenEarsLogging] in OpenEarsConfig.h to learn more.
2012-12-28 23:50:17.944 OpenEarsSampleApp[12658:3c03] Project has these words in its dictionary:
BACKWARD
CHANGE
FORWARD
GO
LEFT
MODEL
RIGHT
TURN
2012-12-28 23:50:17.944 OpenEarsSampleApp[12658:907] Pocketsphinx calibration is complete.
2012-12-28 23:50:17.945 OpenEarsSampleApp[12658:3c03] Listening.
2012-12-28 23:50:17.946 OpenEarsSampleApp[12658:907] I’m running flite
2012-12-28 23:50:17.946 OpenEarsSampleApp[12658:3c03] cont_ad_read failed
2012-12-28 23:50:17.948 OpenEarsSampleApp[12658:907] Checking and resetting all audio session settings.
2012-12-28 23:50:17.950 OpenEarsSampleApp[12658:907] audioCategory is correct, we will leave it as it is.
2012-12-28 23:50:17.952 OpenEarsSampleApp[12658:907] bluetoothInput is correct, we will leave it as it is.
2012-12-28 23:50:17.953 OpenEarsSampleApp[12658:907] categoryDefaultToSpeaker is correct, we will leave it as it is.
2012-12-28 23:50:17.956 OpenEarsSampleApp[12658:907] preferredBufferSize is correct, we will leave it as it is.
2012-12-28 23:50:17.958 OpenEarsSampleApp[12658:907] preferredSampleRateCheck is correct, we will leave it as it is.
(lldb)