TLSPhinx,Swift中的音频识别问题

时间:2016-08-22 20:37:51

标签: voice-recognition speech

2016-08-14 20:49:11.603 ACRCloudDemo_Swift[2332:76253] HER
 INFO: cmd_ln.c(697): Parsing command line:
 \
 -hmm /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us \
 -lm /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us.lm.dmp \
 -dict /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/cmudict-en-us.dict 

Current configuration:
 [NAME] [DEFLT] [VALUE]
 -agc none none
 -agcthresh 2.0 2.000000e+00
 -allphone

 -allphone_ci no no
 -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
 -ceplen 13 13
 -cmn current current
 -cmninit 8.0 8.0
 -compallsen no no
 -debug 0
 -dict /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/cmudict-en-us.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 /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us
 -input_endian little little
 -jsgf

 -keyphrase

 -kws

 -kws_plp 1e-1 1.000000e-01
 -kws_threshold 1 1.000000e+00
 -latsize 5000 5000
 -lda

 -ldadim 0 0
 -lifter 0 0
 -lm /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us.lm.dmp
 -lmctl

 -lmname

 -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 30000 30000
 -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-10 1.000000e-10
 -pl_pip 1.0 1.000000e+00
 -pl_weight 3.0 3.000000e+00
 -pl_window 5 5
 -rawlogdir

 -remove_dc no no
 -remove_noise yes yes
 -remove_silence yes yes
 -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
 -uw 1.0 1.000000e+00
 -vad_postspeech 50 50
 -vad_prespeech 10 10
 -vad_threshold 2.0 2.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(697): Parsing command line:
 \
 -lowerf 130 \
 -upperf 6800 \
 -nfilt 25 \
 -transform dct \
 -lifter 22 \
 -feat 1s_c_d_dd \
 -svspec 0-12/13-25/26-38 \
 -agc none \
 -cmn current \
 -varnorm no \
 -model ptm \
 -cmninit 40,3,-1 

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 40,3,-1
 -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 22
 -logspec no no
 -lowerf 133.33334 1.300000e+02
 -ncep 13 13
 -nfft 512 512
 -nfilt 40 25
 -remove_dc no no
 -remove_noise yes yes
 -remove_silence yes yes
 -round_filters yes yes
 -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 6.800000e+03
 -vad_postspeech 50 50
 -vad_prespeech 10 10
 -vad_threshold 2.0 2.000000e+00
 -varnorm no no
 -verbose no no
 -warp_params

 -warp_type inverse_linear inverse_linear
 -wlen 0.025625 2.562500e-02

INFO: acmod.c(252): Parsed model-specific feature parameters from /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/feat.params
 INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none'
 INFO: cmn.c(143): 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(518): Reading model definition: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/mdef
 INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
 INFO: bin_mdef.c(336): Reading binary model definition: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/mdef
 INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
 INFO: tmat.c(206): Reading HMM transition probability matrices: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/transition_matrices
 INFO: acmod.c(124): Attempting to use PTM computation module
 INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/means
 INFO: ms_gauden.c(292): 42 codebook, 3 feature, size: 
 INFO: ms_gauden.c(294): 128x13
 INFO: ms_gauden.c(294): 128x13
 INFO: ms_gauden.c(294): 128x13
 INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/variances
 INFO: ms_gauden.c(292): 42 codebook, 3 feature, size: 
 INFO: ms_gauden.c(294): 128x13
 INFO: ms_gauden.c(294): 128x13
 INFO: ms_gauden.c(294): 128x13
 INFO: ms_gauden.c(354): 222 variance values floored
 INFO: ptm_mgau.c(476): Loading senones from dump file /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/sendump
 INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
 INFO: ptm_mgau.c(563): Rows: 128, Columns: 5126
 INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
 INFO: ptm_mgau.c(835): Maximum top-N: 4
 INFO: phone_loop_search.c(115): State beam -225 Phone exit beam -225 Insertion penalty 0
 INFO: dict.c(320): Allocating 137526 * 32 bytes (4297 KiB) for word entries
 INFO: dict.c(333): Reading main dictionary: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/cmudict-en-us.dict
 INFO: dict.c(213): Allocated 1007 KiB for strings, 1662 KiB for phones
 INFO: dict.c(336): 133425 words read
 INFO: dict.c(342): Reading filler dictionary: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/noisedict
 INFO: dict.c(213): Allocated 0 KiB for strings, 0 KiB for phones
 INFO: dict.c(345): 5 words read
 INFO: dict2pid.c(396): Building PID tables for dictionary
 INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
 INFO: dict2pid.c(132): Allocated 42672 bytes (41 KiB) for word-final triphones
 INFO: dict2pid.c(196): Allocated 42672 bytes (41 KiB) for single-phone word triphones
 INFO: ngram_model_arpa.c(77): No \data\ mark in LM file
 INFO: ngram_model_dmp.c(142): Will use memory-mapped I/O for LM file
 INFO: ngram_model_dmp.c(196): ngrams 1=19794, 2=1377200, 3=3178194
 INFO: ngram_model_dmp.c(242): 19794 = LM.unigrams(+trailer) read
 INFO: ngram_model_dmp.c(288): 1377200 = LM.bigrams(+trailer) read
 INFO: ngram_model_dmp.c(314): 3178194 = LM.trigrams read
 INFO: ngram_model_dmp.c(339): 57155 = LM.prob2 entries read
 INFO: ngram_model_dmp.c(359): 10935 = LM.bo_wt2 entries read
 INFO: ngram_model_dmp.c(379): 34843 = LM.prob3 entries read
 INFO: ngram_model_dmp.c(407): 2690 = LM.tseg_base entries read
 INFO: ngram_model_dmp.c(463): 19794 = ascii word strings read
 INFO: ngram_search_fwdtree.c(99): 788 unique initial diphones
 INFO: ngram_search_fwdtree.c(148): 0 root, 0 non-root channels, 56 single-phone words
 INFO: ngram_search_fwdtree.c(186): Creating search tree
 INFO: ngram_search_fwdtree.c(192): before: 0 root, 0 non-root channels, 56 single-phone words
 INFO: ngram_search_fwdtree.c(326): after: max nonroot chan increased to 44782
 INFO: ngram_search_fwdtree.c(339): after: 573 root, 44654 non-root channels, 47 single-phone words
 INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
 2016-08-14 20:49:12.787 ACRCloudDemo_Swift[2332:76253] 20:49:12.786 ERROR: AVAudioIONodeImpl.mm:784: SetOutputFormat: required condition is false: format.sampleRate == hwFormat.sampleRate
 2016-08-14 20:49:12.802 ACRCloudDemo_Swift[2332:76253] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate'
 *** First throw call stack:
 (
 0 CoreFoundation 0x000000010d484d85 exceptionPreprocess + 165
 1 libobjc.A.dylib 0x000000010f260deb objc_exception_throw + 48
 2 CoreFoundation 0x000000010d484bea +[NSException raise:format:arguments:] + 106
 3 libAVFAudio.dylib 0x00000001100bfff3 Z19AVAE_RaiseExceptionP8NSStringz + 176
 4 libAVFAudio.dylib 0x0000000110101aef _ZN17AVAudioIONodeImpl15SetOutputFormatEmP13AVAudioFormat + 533
 5 libAVFAudio.dylib 0x00000001100d2ead _ZN18AVAudioEngineGraph8_ConnectEP19AVAudioNodeImplBaseS1_jjP13AVAudioFormat + 2027
 6 libAVFAudio.dylib 0x00000001100d5df0 _ZN18AVAudioEngineGraph7ConnectEP11AVAudioNodeS1_mmP13AVAudioFormat + 322
 7 libAVFAudio.dylib 0x0000000110108a71 _ZN17AVAudioEngineImpl7ConnectEP11AVAudioNodeS1_mmP13AVAudioFormat + 301
 8 libAVFAudio.dylib 0x0000000110108ad8 -[AVAudioEngine connect:to:format:] + 83
 9 ACRCloudDemo_Swift 0x000000010c4b7737 _TFC18ACRCloudDemo_Swift7Decoder19startDecodingSpeechfFGSqVS_10Hypothesis_T_T + 1127
 10 ACRCloudDemo_Swift 0x000000010c4aca45 TFC18ACRCloudDemo_Swift14ViewController11viewDidLoadfT_T + 2149
 11 ACRCloudDemo_Swift 0x000000010c4ad892 TToFC18ACRCloudDemo_Swift14ViewController11viewDidLoadfT_T + 34
 12 UIKit 0x000000010de47984 -[UIViewController loadViewIfRequired] + 1198
 13 UIKit 0x000000010de47cd3 -[UIViewController view] + 27
 14 UIKit 0x000000010dd1dfb4 -[UIWindow addRootViewControllerViewIfPossible] + 61
 15 UIKit 0x000000010dd1e69d -[UIWindow _setHidden:forced:] + 282
 16 UIKit 0x000000010dd30180 -[UIWindow makeKeyAndVisible] + 42
 17 UIKit 0x000000010dca4ed9 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
 18 UIKit 0x000000010dcab568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
 19 UIKit 0x000000010dca8714 -[UIApplication workspaceDidEndTransaction:] + 188
 20 FrontBoardServices 0x000000011216e8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
 21 FrontBoardServices 0x000000011216e741 -[FBSSerialQueue performNext] + 178
 22 FrontBoardServices 0x000000011216eaca -[FBSSerialQueue performNextFromRunLoopSource] + 45
 23 CoreFoundation 0x000000010d3aa301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
 24 CoreFoundation 0x000000010d3a022c __CFRunLoopDoSources0 + 556
 25 CoreFoundation 0x000000010d39f6e3 __CFRunLoopRun + 867
 26 CoreFoundation 0x000000010d39f0f8 CFRunLoopRunSpecific + 488
 27 UIKit 0x000000010dca7f21 -[UIApplication _run] + 402
 28 UIKit 0x000000010dcacf09 UIApplicationMain + 171
 29 ACRCloudDemo_Swift 0x000000010c4ba742 main + 114
 30 libdyld.dylib 0x000000010fd5492d start + 1
 )
 libc++abi.dylib: terminating with uncaught exception of type NSException
 (lldb) 

所以,这是我的输出和崩溃....在我的应用程序启动时,我调用startDecoding语音...  如何以有组织的方式获得具体的输出????帮助

似乎修复这很简单,我正在自己研究,如果有人可以帮助那就好了。

0 个答案:

没有答案