Android语音合成出现ANR
Leautolink 发布于2017-07 浏览:2388 回复:1
0
收藏

我使用的服务是:语音合成

调用的接口是:speechSynthesizer.initTts(TtsMode.MIX);

SDK版本号:com.baidu.tts_2.3.0.jar


当语音合成初始化的时候出现ANR,看log是阻塞在调用speechSynthesizer.initTts(TtsMode.MIX);方法的时候,trace文件内容如下:

----- pid 4519 at 2017-07-20 01:51:46 -----
Cmd line: com.letv.voice
ABI: arm
Build type: optimized
Zygote loaded classes=3414 post zygote classes=348
Intern table: 37406 strong; 229 weak
JNI: CheckJNI is off; globals=250
Libraries: /system/app/LetvVoice/lib/arm/libBDSpeechDecoder_V1.so /system/app/LetvVoice/lib/arm/libbd_etts.so /system/app/LetvVoice/lib/arm/libbdtts.so /system/app/LetvVoice/lib/arm/libgnustl_shared.so /system/lib/libandroid.so /system/lib/libaudioeffect_jni.so /system/lib/libcompiler_rt.so /system/lib/libjavacrypto.so /system/lib/libjnigraphics.so /system/lib/libmedia_jni.so /system/lib/librs_jni.so /system/lib/libsoundpool.so /system/lib/libwebviewchromium_loader.so libjavacore.so (14)
Heap: 8% free, 2MB/2MB; 53261 objects
Dumping cumulative Gc timings
Start Dumping histograms for 166 iterations for concurrent mark sweep
ProcessMarkStack:    Sum: 657.226ms 99% C.I. 0.002ms-18.016ms Avg: 1.319ms Max: 21.246ms
MarkConcurrentRoots:    Sum: 284.030ms 99% C.I. 2us-9403.999us Avg: 855.512us Max: 11602us
UpdateAndMarkImageModUnionTable:    Sum: 171.117ms 99% C.I. 0.053ms-20.747ms Avg: 1.030ms Max: 24.387ms
MarkRootsCheckpoint:    Sum: 53.482ms 99% C.I. 16us-5071.999us Avg: 161.090us Max: 7835us
SweepMallocSpace:    Sum: 47.709ms 99% C.I. 0.917us-3033.999us Avg: 143.701us Max: 7559us
ImageModUnionClearCards:    Sum: 30.149ms 99% C.I. 44us-868us Avg: 90.810us Max: 8966us
SweepLargeObjects:    Sum: 17.396ms 99% C.I. 1.121us-1029.999us Avg: 104.795us Max: 4318us
AllocSpaceClearCards:    Sum: 13.864ms 99% C.I. 0.254us-133.500us Avg: 20.879us Max: 3203us
FinishPhase:    Sum: 9.706ms 99% C.I. 31us-808.499us Avg: 58.469us Max: 832us
MarkNonThreadRoots:    Sum: 8.497ms 99% C.I. 7us-116.999us Avg: 25.593us Max: 1328us
SwapBitmaps:    Sum: 7.494ms 99% C.I. 5us-1117.999us Avg: 45.144us Max: 5503us
ScanGrayAllocSpaceObjects:    Sum: 7.365ms 99% C.I. 0.294us-183.500us Avg: 22.183us Max: 1026us
MarkAllocStackAsLive:    Sum: 7.322ms 99% C.I. 18us-258.499us Avg: 44.108us Max: 273us
(Paused)ScanGrayImageSpaceObjects:    Sum: 7.128ms 99% C.I. 33us-345.499us Avg: 42.939us Max: 1278us
ScanGrayImageSpaceObjects:    Sum: 6.800ms 99% C.I. 33us-392.499us Avg: 40.963us Max: 596us
SweepSystemWeaks:    Sum: 6.555ms 99% C.I. 8us-760.499us Avg: 39.487us Max: 1275us
ReMarkRoots:    Sum: 6.406ms 99% C.I. 13us-534.999us Avg: 38.590us Max: 926us
RevokeAllThreadLocalAllocationStacks:    Sum: 4.612ms 99% C.I. 2us-729.999us Avg: 27.783us Max: 4028us
MarkingPhase:    Sum: 3.749ms 99% C.I. 5us-555.999us Avg: 22.584us Max: 2045us
ReclaimPhase:    Sum: 2.818ms 99% C.I. 4us-364.499us Avg: 16.975us Max: 1869us
(Paused)ScanGrayAllocSpaceObjects:    Sum: 2.747ms 99% C.I. 0.251us-83.999us Avg: 8.274us Max: 245us
InitializePhase:    Sum: 2.260ms 99% C.I. 0.253us-370.999us Avg: 13.614us Max: 1435us
ProcessCards:    Sum: 1.496ms 99% C.I. 2us-49.900us Avg: 4.506us Max: 69us
(Paused)PausePhase:    Sum: 1.442ms 99% C.I. 7us-49us Avg: 8.686us Max: 49us
PreCleanCards:    Sum: 1.332ms 99% C.I. 5us-79.250us Avg: 8.024us Max: 91us
EnqueueFinalizerReferences:    Sum: 1.316ms 99% C.I. 2us-35us Avg: 7.927us Max: 35us
ZygoteModUnionClearCards:    Sum: 975us 99% C.I. 1us-49.904us Avg: 3.009us Max: 287us
Sweep:    Sum: 610us 99% C.I. 2us-6us Avg: 3.674us Max: 6us
SweepZygoteSpace:    Sum: 537us 99% C.I. 2us-22us Avg: 3.314us Max: 22us
MarkRoots:    Sum: 392us 99% C.I. 2us-4us Avg: 2.361us Max: 4us
ProcessReferences:    Sum: 373us 99% C.I. 1us-7us Avg: 2.246us Max: 7us
RecursiveMark:    Sum: 316us 99% C.I. 1us-8us Avg: 1.903us Max: 8us
ScanGrayZygoteSpaceObjects:    Sum: 179us 99% C.I. 0.250us-20us Avg: 1.104us Max: 20us
SwapStacks:    Sum: 173us 99% C.I. 1us-2us Avg: 1.042us Max: 2us
BindBitmaps:    Sum: 170us 99% C.I. 0.250us-2us Avg: 1.024us Max: 2us
(Paused)ScanGrayZygoteSpaceObjects:    Sum: 146us 99% C.I. 251ns-59500ns Avg: 901ns Max: 64000ns
UnBindBitmaps:    Sum: 65us 99% C.I. 251ns-58499ns Avg: 391ns Max: 61000ns
FindDefaultSpaceBitmap:    Sum: 3us 99% C.I. 250ns-1000ns Avg: 18ns Max: 1000ns
(Paused)ProcessMarkStack:    Sum: 0 99% C.I. 0ns-0ns Avg: 0ns Max: 0ns
Done Dumping histograms
concurrent mark sweep paused:    Sum: 27.980ms 99% C.I. 78us-3669.999us Avg: 168.554us Max: 4111us
concurrent mark sweep total time: 1.367s mean time: 8.240ms
concurrent mark sweep freed: 134542 objects with total size 10MB
concurrent mark sweep throughput: 98421.4/s / 7MB/s
Start Dumping histograms for 1 iterations for sticky concurrent mark sweep
MarkRootsCheckpoint:    Sum: 2.901ms 99% C.I. 0.270ms-2.626ms Avg: 1.450ms Max: 2.631ms
MarkConcurrentRoots:    Sum: 1.150ms 99% C.I. 3us-1139us Avg: 575us Max: 1147us
FreeList:    Sum: 756us 99% C.I. 29us-146us Avg: 68.727us Max: 146us
ProcessMarkStack:    Sum: 686us 99% C.I. 1us-683us Avg: 228.666us Max: 683us
SweepArray:    Sum: 418us 99% C.I. 418us-418us Avg: 418us Max: 418us
ScanGrayImageSpaceObjects:    Sum: 313us 99% C.I. 54us-259us Avg: 156.500us Max: 259us
ScanGrayAllocSpaceObjects:    Sum: 242us 99% C.I. 1us-204us Avg: 60.500us Max: 204us
MarkingPhase:    Sum: 233us 99% C.I. 233us-233us Avg: 233us Max: 233us
AllocSpaceClearCards:    Sum: 137us 99% C.I. 0.500us-76us Avg: 34.250us Max: 76us
ImageModUnionClearCards:    Sum: 117us 99% C.I. 56us-61us Avg: 58.500us Max: 61us
ReMarkRoots:    Sum: 56us 99% C.I. 56us-56us Avg: 56us Max: 56us
(Paused)ScanGrayImageSpaceObjects:    Sum: 36us 99% C.I. 36us-36us Avg: 36us Max: 36us
ResetStack:    Sum: 33us 99% C.I. 33us-33us Avg: 33us Max: 33us
FinishPhase:    Sum: 32us 99% C.I. 32us-32us Avg: 32us Max: 32us
MarkNonThreadRoots:    Sum: 27us 99% C.I. 12us-15us Avg: 13.500us Max: 15us
SweepSystemWeaks:    Sum: 23us 99% C.I. 23us-23us Avg: 23us Max: 23us
(Paused)ScanGrayAllocSpaceObjects:    Sum: 17us 99% C.I. 0.250us-17us Avg: 8.500us Max: 17us
(Paused)PausePhase:    Sum: 9us 99% C.I. 9us-9us Avg: 9us Max: 9us
PreCleanCards:    Sum: 8us 99% C.I. 8us-8us Avg: 8us Max: 8us
ReclaimPhase:    Sum: 7us 99% C.I. 7us-7us Avg: 7us Max: 7us
RevokeAllThreadLocalAllocationStacks:    Sum: 6us 99% C.I. 6us-6us Avg: 6us Max: 6us
ScanGrayZygoteSpaceObjects:    Sum: 5us 99% C.I. 2us-3us Avg: 2.500us Max: 3us
EnqueueFinalizerReferences:    Sum: 4us 99% C.I. 4us-4us Avg: 4us Max: 4us
MarkRoots:    Sum: 3us 99% C.I. 3us-3us Avg: 3us Max: 3us
BindBitmaps:    Sum: 2us 99% C.I. 2us-2us Avg: 2us Max: 2us
InitializePhase:    Sum: 1us 99% C.I. 1us-1us Avg: 1us Max: 1us
(Paused)ProcessMarkStack:    Sum: 0 99% C.I. 0ns-0ns Avg: 0ns Max: 0ns
Done Dumping histograms
sticky concurrent mark sweep paused:    Sum: 165us 99% C.I. 165us-165us Avg: 165us Max: 165us
sticky concurrent mark sweep total time: 7.244ms mean time: 7.244ms
sticky concurrent mark sweep freed: 10706 objects with total size 518KB
sticky concurrent mark sweep throughput: 1.52943e+06/s / 72MB/s
Total time spent in GC: 1.375s
Mean GC size throughput: 7MB/s
Mean GC object throughput: 107277 objects/s
Total number of allocations 200789
Total bytes allocated 13MB
Free memory 238KB
Free memory until GC 238KB
Free memory until OOME 77MB
Total memory 2MB
Max memory 80MB
Total mutator paused time: 28.145ms
Total time waiting for GC to complete: 106.214us

DALVIK THREADS (12):
"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x73ce6700 self=0xb4827800
  | sysTid=4519 nice=0 cgrp=default sched=0/0 handle=0xb6fa4bec
  | state=R schedstat=( 0 0 0 ) utm=1865 stm=9 core=0 HZ=100
  | stack=0xbe0f7000-0xbe0f9000 stackSize=8MB
  | held mutexes=
  native: #00 pc 000df86c  /system/lib/libbd_etts.so (SPEECH::MatrixT::read(__sFILE*)+37)
  native: #01 pc 000ea66f  /system/lib/libbd_etts.so (SPEECH::FullWeights::readW(__sFILE*)+28)
  native: #02 pc 000e5db5  /system/lib/libbd_etts.so (SPEECH::FullConfig::readFromBin(__sFILE*)+92)
  native: #03 pc 000e7839  /system/lib/libbd_etts.so (SPEECH::NNConfig::readFromBin(__sFILE*)+432)
  native: #04 pc 000dbe8d  /system/lib/libbd_etts.so (SPEECH::loadGlobalW_2(__sFILE*, long, long, int, _hmmmmfhead*)+92)
  native: #05 pc 000dbbc7  /system/lib/libbd_etts.so (loadGlobalW_2(__sFILE*, long, long, int, _hmmmmfhead*)+38)
  native: #06 pc 000b04ab  /system/lib/libbd_etts.so (etts::NNEngine::load_model(char const*)+86)
  native: #07 pc 000b05bb  /system/lib/libbd_etts.so (etts::NNEngine::initial(char const*)+6)
  native: #08 pc 000b34e7  /system/lib/libbd_etts.so (PLEngine::initial(char const*, TAEngine*, int)+18)
  native: #09 pc 0003c7db  /system/lib/libbd_etts.so (text_lib_initial_chs+242)
  native: #10 pc 00062adb  /system/lib/libbd_etts.so (???)
  native: #11 pc 00064efd  /system/lib/libbd_etts.so (bd_etts_engine_init+504)
  native: #12 pc 00001a97  /system/lib/libbdtts.so (Java_com_baidu_tts_jni_EmbeddedSynthesizerEngine_bdTTSEngineInit+66)
  native: #13 pc 001397d5  /data/dalvik-cache/arm/system@app@LetvVoice@LetvVoice.apk@classes.dex (Java_com_baidu_tts_jni_EmbeddedSynthesizerEngine_bdTTSEngineInit___3B_3B_3J+152)
  at com.baidu.tts.jni.EmbeddedSynthesizerEngine.bdTTSEngineInit(Native method)
  at com.baidu.tts.b.a.b.e.a(OfflineSynthesizer.java:76)
  at com.baidu.tts.b.a.b.d.a(MixSynthesizer.java:140)
  at com.baidu.tts.b.a.a.c.s(EngineExecutor.java:132)
  at com.baidu.tts.b.a.a.h.b(UninitialEngineState.java:32)
  at com.baidu.tts.b.a.a.a.g(AEngineExecutor.java:47)
  at com.baidu.tts.j.a.b(ASafeLife.java:27)
  - locked <@addr=0x12dff610> (a com.baidu.tts.b.a.a.c)
  at com.baidu.tts.a.c.b.b(TtsAdapter.java:51)
  at com.baidu.tts.a.c.c.a(Ttser.java:20)
  at com.baidu.tts.o.a.c.h(Tts.java:233)
  at com.baidu.tts.o.a.d.b(UninitialState.java:32)
  at com.baidu.tts.o.a.c.b(Tts.java:57)
  at java.lang.reflect.Method.invoke!(Native method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.baidu.tts.aop.AInterceptorHandler.invoke(AInterceptorHandler.java:75)
  at java.lang.reflect.Proxy.invoke(Proxy.java:397)
  at com.baidu.tts.j.b.b(ILife.java:-2)
  at com.baidu.tts.a.b.a.a(SpeechSynthesizerAdapter.java:87)
  at com.baidu.tts.client.SpeechSynthesizer.initTts(SpeechSynthesizer.java:202)
  - locked <@addr=0x12eac300> (a com.baidu.tts.client.SpeechSynthesizer)
  at com.letv.voice.tts.BDTTSEngine.init(BDTTSEngine.java:231)
  at com.letv.voice.tts.BDTTSEngine.(BDTTSEngine.java:179)
  at com.letv.voice.tts.BDTTSEngine.getInstance(BDTTSEngine.java:165)
  at com.letv.voice.tts.TtsService.(TtsService.java:122)
  at com.letv.voice.tts.TtsService.getInstance(TtsService.java:109)
  - locked <@addr=0x12cb1db0> (a java.lang.Class)
  at com.letv.voice.AssistantApp.prepareVoiceData(AssistantApp.java:232)
  at com.letv.voice.AssistantApp.onCreate(AssistantApp.java:127)
  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
  at android.app.ActivityThread.access$1500(ActivityThread.java:151)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:135)
  at android.app.ActivityThread.main(ActivityThread.java:5254)
  at java.lang.reflect.Method.invoke!(Native method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:923)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:710)


收藏
点赞
0
个赞
共1条回复 最后由用户已被禁言回复于2022-04
#2fujiayi1984回复于2017-07

Leautolink:

我使用的服务是:语音合成

调用的接口是:speechSynthesizer.initTts(TtsMode.MIX);

SDK版本号:com.baidu.tts_2.3.0.jar


当语音合成初始化的时候出现ANR,看log是阻塞在调用speechSynthesizer.initTts(TtsMode.MIX);方法的时候,trace文件内容如下:

----- pid 4519 at 2017-07-20 01:51:46 -----
Cmd line: com.letv.voice
ABI: arm
Build type: optimized
Zygote loaded classes=3414 post zygote classes=348
Intern table: 37406 strong; 229 weak
JNI: CheckJNI is off; globals=250
Libraries: /system/app/LetvVoice/lib/arm/libBDSpeechDecoder_V1.so /system/app/LetvVoice/lib/arm/libbd_etts.so /system/app/LetvVoice/lib/arm/libbdtts.so /system/app/LetvVoice/lib/arm/libgnustl_shared.so /system/lib/libandroid.so /system/lib/libaudioeffect_jni.so /system/lib/libcompiler_rt.so /system/lib/libjavacrypto.so /system/lib/libjnigraphics.so /system/lib/libmedia_jni.so /system/lib/librs_jni.so /system/lib/libsoundpool.so /system/lib/libwebviewchromium_loader.so libjavacore.so (14)
Heap: 8% free, 2MB/2MB; 53261 objects
Dumping cumulative Gc timings
Start Dumping histograms for 166 iterations for concurrent mark sweep
ProcessMarkStack:    Sum: 657.226ms 99% C.I. 0.002ms-18.016ms Avg: 1.319ms Max: 21.246ms
MarkConcurrentRoots:    Sum: 284.030ms 99% C.I. 2us-9403.999us Avg: 855.512us Max: 11602us
UpdateAndMarkImageModUnionTable:    Sum: 171.117ms 99% C.I. 0.053ms-20.747ms Avg: 1.030ms Max: 24.387ms
MarkRootsCheckpoint:    Sum: 53.482ms 99% C.I. 16us-5071.999us Avg: 161.090us Max: 7835us
SweepMallocSpace:    Sum: 47.709ms 99% C.I. 0.917us-3033.999us Avg: 143.701us Max: 7559us
ImageModUnionClearCards:    Sum: 30.149ms 99% C.I. 44us-868us Avg: 90.810us Max: 8966us
SweepLargeObjects:    Sum: 17.396ms 99% C.I. 1.121us-1029.999us Avg: 104.795us Max: 4318us
AllocSpaceClearCards:    Sum: 13.864ms 99% C.I. 0.254us-133.500us Avg: 20.879us Max: 3203us
FinishPhase:    Sum: 9.706ms 99% C.I. 31us-808.499us Avg: 58.469us Max: 832us
MarkNonThreadRoots:    Sum: 8.497ms 99% C.I. 7us-116.999us Avg: 25.593us Max: 1328us
SwapBitmaps:    Sum: 7.494ms 99% C.I. 5us-1117.999us Avg: 45.144us Max: 5503us
ScanGrayAllocSpaceObjects:    Sum: 7.365ms 99% C.I. 0.294us-183.500us Avg: 22.183us Max: 1026us
MarkAllocStackAsLive:    Sum: 7.322ms 99% C.I. 18us-258.499us Avg: 44.108us Max: 273us
(Paused)ScanGrayImageSpaceObjects:    Sum: 7.128ms 99% C.I. 33us-345.499us Avg: 42.939us Max: 1278us
ScanGrayImageSpaceObjects:    Sum: 6.800ms 99% C.I. 33us-392.499us Avg: 40.963us Max: 596us
SweepSystemWeaks:    Sum: 6.555ms 99% C.I. 8us-760.499us Avg: 39.487us Max: 1275us
ReMarkRoots:    Sum: 6.406ms 99% C.I. 13us-534.999us Avg: 38.590us Max: 926us
RevokeAllThreadLocalAllocationStacks:    Sum: 4.612ms 99% C.I. 2us-729.999us Avg: 27.783us Max: 4028us
MarkingPhase:    Sum: 3.749ms 99% C.I. 5us-555.999us Avg: 22.584us Max: 2045us
ReclaimPhase:    Sum: 2.818ms 99% C.I. 4us-364.499us Avg: 16.975us Max: 1869us
(Paused)ScanGrayAllocSpaceObjects:    Sum: 2.747ms 99% C.I. 0.251us-83.999us Avg: 8.274us Max: 245us
InitializePhase:    Sum: 2.260ms 99% C.I. 0.253us-370.999us Avg: 13.614us Max: 1435us
ProcessCards:    Sum: 1.496ms 99% C.I. 2us-49.900us Avg: 4.506us Max: 69us
(Paused)PausePhase:    Sum: 1.442ms 99% C.I. 7us-49us Avg: 8.686us Max: 49us
PreCleanCards:    Sum: 1.332ms 99% C.I. 5us-79.250us Avg: 8.024us Max: 91us
EnqueueFinalizerReferences:    Sum: 1.316ms 99% C.I. 2us-35us Avg: 7.927us Max: 35us
ZygoteModUnionClearCards:    Sum: 975us 99% C.I. 1us-49.904us Avg: 3.009us Max: 287us
Sweep:    Sum: 610us 99% C.I. 2us-6us Avg: 3.674us Max: 6us
SweepZygoteSpace:    Sum: 537us 99% C.I. 2us-22us Avg: 3.314us Max: 22us
MarkRoots:    Sum: 392us 99% C.I. 2us-4us Avg: 2.361us Max: 4us
ProcessReferences:    Sum: 373us 99% C.I. 1us-7us Avg: 2.246us Max: 7us
RecursiveMark:    Sum: 316us 99% C.I. 1us-8us Avg: 1.903us Max: 8us
ScanGrayZygoteSpaceObjects:    Sum: 179us 99% C.I. 0.250us-20us Avg: 1.104us Max: 20us
SwapStacks:    Sum: 173us 99% C.I. 1us-2us Avg: 1.042us Max: 2us
BindBitmaps:    Sum: 170us 99% C.I. 0.250us-2us Avg: 1.024us Max: 2us
(Paused)ScanGrayZygoteSpaceObjects:    Sum: 146us 99% C.I. 251ns-59500ns Avg: 901ns Max: 64000ns
UnBindBitmaps:    Sum: 65us 99% C.I. 251ns-58499ns Avg: 391ns Max: 61000ns
FindDefaultSpaceBitmap:    Sum: 3us 99% C.I. 250ns-1000ns Avg: 18ns Max: 1000ns
(Paused)ProcessMarkStack:    Sum: 0 99% C.I. 0ns-0ns Avg: 0ns Max: 0ns
Done Dumping histograms
concurrent mark sweep paused:    Sum: 27.980ms 99% C.I. 78us-3669.999us Avg: 168.554us Max: 4111us
concurrent mark sweep total time: 1.367s mean time: 8.240ms
concurrent mark sweep freed: 134542 objects with total size 10MB
concurrent mark sweep throughput: 98421.4/s / 7MB/s
Start Dumping histograms for 1 iterations for sticky concurrent mark sweep
MarkRootsCheckpoint:    Sum: 2.901ms 99% C.I. 0.270ms-2.626ms Avg: 1.450ms Max: 2.631ms
MarkConcurrentRoots:    Sum: 1.150ms 99% C.I. 3us-1139us Avg: 575us Max: 1147us
FreeList:    Sum: 756us 99% C.I. 29us-146us Avg: 68.727us Max: 146us
ProcessMarkStack:    Sum: 686us 99% C.I. 1us-683us Avg: 228.666us Max: 683us
SweepArray:    Sum: 418us 99% C.I. 418us-418us Avg: 418us Max: 418us
ScanGrayImageSpaceObjects:    Sum: 313us 99% C.I. 54us-259us Avg: 156.500us Max: 259us
ScanGrayAllocSpaceObjects:    Sum: 242us 99% C.I. 1us-204us Avg: 60.500us Max: 204us
MarkingPhase:    Sum: 233us 99% C.I. 233us-233us Avg: 233us Max: 233us
AllocSpaceClearCards:    Sum: 137us 99% C.I. 0.500us-76us Avg: 34.250us Max: 76us
ImageModUnionClearCards:    Sum: 117us 99% C.I. 56us-61us Avg: 58.500us Max: 61us
ReMarkRoots:    Sum: 56us 99% C.I. 56us-56us Avg: 56us Max: 56us
(Paused)ScanGrayImageSpaceObjects:    Sum: 36us 99% C.I. 36us-36us Avg: 36us Max: 36us
ResetStack:    Sum: 33us 99% C.I. 33us-33us Avg: 33us Max: 33us
FinishPhase:    Sum: 32us 99% C.I. 32us-32us Avg: 32us Max: 32us
MarkNonThreadRoots:    Sum: 27us 99% C.I. 12us-15us Avg: 13.500us Max: 15us
SweepSystemWeaks:    Sum: 23us 99% C.I. 23us-23us Avg: 23us Max: 23us
(Paused)ScanGrayAllocSpaceObjects:    Sum: 17us 99% C.I. 0.250us-17us Avg: 8.500us Max: 17us
(Paused)PausePhase:    Sum: 9us 99% C.I. 9us-9us Avg: 9us Max: 9us
PreCleanCards:    Sum: 8us 99% C.I. 8us-8us Avg: 8us Max: 8us
ReclaimPhase:    Sum: 7us 99% C.I. 7us-7us Avg: 7us Max: 7us
RevokeAllThreadLocalAllocationStacks:    Sum: 6us 99% C.I. 6us-6us Avg: 6us Max: 6us
ScanGrayZygoteSpaceObjects:    Sum: 5us 99% C.I. 2us-3us Avg: 2.500us Max: 3us
EnqueueFinalizerReferences:    Sum: 4us 99% C.I. 4us-4us Avg: 4us Max: 4us
MarkRoots:    Sum: 3us 99% C.I. 3us-3us Avg: 3us Max: 3us
BindBitmaps:    Sum: 2us 99% C.I. 2us-2us Avg: 2us Max: 2us
InitializePhase:    Sum: 1us 99% C.I. 1us-1us Avg: 1us Max: 1us
(Paused)ProcessMarkStack:    Sum: 0 99% C.I. 0ns-0ns Avg: 0ns Max: 0ns
Done Dumping histograms
sticky concurrent mark sweep paused:    Sum: 165us 99% C.I. 165us-165us Avg: 165us Max: 165us
sticky concurrent mark sweep total time: 7.244ms mean time: 7.244ms
sticky concurrent mark sweep freed: 10706 objects with total size 518KB
sticky concurrent mark sweep throughput: 1.52943e+06/s / 72MB/s
Total time spent in GC: 1.375s
Mean GC size throughput: 7MB/s
Mean GC object throughput: 107277 objects/s
Total number of allocations 200789
Total bytes allocated 13MB
Free memory 238KB
Free memory until GC 238KB
Free memory until OOME 77MB
Total memory 2MB
Max memory 80MB
Total mutator paused time: 28.145ms
Total time waiting for GC to complete: 106.214us

DALVIK THREADS (12):
"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x73ce6700 self=0xb4827800
  | sysTid=4519 nice=0 cgrp=default sched=0/0 handle=0xb6fa4bec
  | state=R schedstat=( 0 0 0 ) utm=1865 stm=9 core=0 HZ=100
  | stack=0xbe0f7000-0xbe0f9000 stackSize=8MB
  | held mutexes=
  native: #00 pc 000df86c  /system/lib/libbd_etts.so (SPEECH::MatrixT::read(__sFILE*)+37)
  native: #01 pc 000ea66f  /system/lib/libbd_etts.so (SPEECH::FullWeights::readW(__sFILE*)+28)
  native: #02 pc 000e5db5  /system/lib/libbd_etts.so (SPEECH::FullConfig::readFromBin(__sFILE*)+92)
  native: #03 pc 000e7839  /system/lib/libbd_etts.so (SPEECH::NNConfig::readFromBin(__sFILE*)+432)
  native: #04 pc 000dbe8d  /system/lib/libbd_etts.so (SPEECH::loadGlobalW_2(__sFILE*, long, long, int, _hmmmmfhead*)+92)
  native: #05 pc 000dbbc7  /system/lib/libbd_etts.so (loadGlobalW_2(__sFILE*, long, long, int, _hmmmmfhead*)+38)
  native: #06 pc 000b04ab  /system/lib/libbd_etts.so (etts::NNEngine::load_model(char const*)+86)
  native: #07 pc 000b05bb  /system/lib/libbd_etts.so (etts::NNEngine::initial(char const*)+6)
  native: #08 pc 000b34e7  /system/lib/libbd_etts.so (PLEngine::initial(char const*, TAEngine*, int)+18)
  native: #09 pc 0003c7db  /system/lib/libbd_etts.so (text_lib_initial_chs+242)
  native: #10 pc 00062adb  /system/lib/libbd_etts.so (???)
  native: #11 pc 00064efd  /system/lib/libbd_etts.so (bd_etts_engine_init+504)
  native: #12 pc 00001a97  /system/lib/libbdtts.so (Java_com_baidu_tts_jni_EmbeddedSynthesizerEngine_bdTTSEngineInit+66)
  native: #13 pc 001397d5  /data/dalvik-cache/arm/system@app@LetvVoice@LetvVoice.apk@classes.dex (Java_com_baidu_tts_jni_EmbeddedSynthesizerEngine_bdTTSEngineInit___3B_3B_3J+152)
  at com.baidu.tts.jni.EmbeddedSynthesizerEngine.bdTTSEngineInit(Native method)
  at com.baidu.tts.b.a.b.e.a(OfflineSynthesizer.java:76)
  at com.baidu.tts.b.a.b.d.a(MixSynthesizer.java:140)
  at com.baidu.tts.b.a.a.c.s(EngineExecutor.java:132)
  at com.baidu.tts.b.a.a.h.b(UninitialEngineState.java:32)
  at com.baidu.tts.b.a.a.a.g(AEngineExecutor.java:47)
  at com.baidu.tts.j.a.b(ASafeLife.java:27)
  - locked <@addr=0x12dff610> (a com.baidu.tts.b.a.a.c)
  at com.baidu.tts.a.c.b.b(TtsAdapter.java:51)
  at com.baidu.tts.a.c.c.a(Ttser.java:20)
  at com.baidu.tts.o.a.c.h(Tts.java:233)
  at com.baidu.tts.o.a.d.b(UninitialState.java:32)
  at com.baidu.tts.o.a.c.b(Tts.java:57)
  at java.lang.reflect.Method.invoke!(Native method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.baidu.tts.aop.AInterceptorHandler.invoke(AInterceptorHandler.java:75)
  at java.lang.reflect.Proxy.invoke(Proxy.java:397)
  at com.baidu.tts.j.b.b(ILife.java:-2)
  at com.baidu.tts.a.b.a.a(SpeechSynthesizerAdapter.java:87)
  at com.baidu.tts.client.SpeechSynthesizer.initTts(SpeechSynthesizer.java:202)
  - locked <@addr=0x12eac300> (a com.baidu.tts.client.SpeechSynthesizer)
  at com.letv.voice.tts.BDTTSEngine.init(BDTTSEngine.java:231)
  at com.letv.voice.tts.BDTTSEngine.(BDTTSEngine.java:179)
  at com.letv.voice.tts.BDTTSEngine.getInstance(BDTTSEngine.java:165)
  at com.letv.voice.tts.TtsService.(TtsService.java:122)
  at com.letv.voice.tts.TtsService.getInstance(TtsService.java:109)
  - locked <@addr=0x12cb1db0> (a java.lang.Class)
  at com.letv.voice.AssistantApp.prepareVoiceData(AssistantApp.java:232)
  at com.letv.voice.AssistantApp.onCreate(AssistantApp.java:127)
  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
  at android.app.ActivityThread.access$1500(ActivityThread.java:151)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:135)
  at android.app.ActivityThread.main(ActivityThread.java:5254)
  at java.lang.reflect.Method.invoke!(Native method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:923)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:710)


                           

回复Leautolink:请在不要在主线程上使用initTTs方法,可以用新线程,另外新线程不要结束。

0
TOP
切换版块