我正在尝试在默认的AOSP TTS引擎上运行CTS。但是,cts仍然会因为以下命令而失败:为语音运行CTS运行cts --skip-device-info --skip-preconditions -disable-reboot --module CtsSpeechTestCases
模块通过失败的总测试完成x86 CtsSpeechTestCases 4 5 9 true x86_64 CtsSpeechTestCases 3 6 9 true
onUtteranceCompleted(String utteranceId)未取消,在oero中使用UtteranceProgressListener。
模块通过失败的总测试完成x86 CtsSpeechTestCases 4 5 9 true x86_64 CtsSpeechTestCases 3 6 9 true
aosp默认TTS引擎出现故障的原因
发布于 2019-08-09 18:17:54
https://android-review.googlesource.com/c/platform/external/svox/+/617406
Failed CTS cases:
android.speech.tts.cts.TextToSpeechTest#testSpeak
android.speech.tts.cts.TextToSpeechTest#testSpeakStop
android.speech.tts.cts.TextToSpeechTest#testSynthesizeToFile
We can also reproduce this NE by following steps:
1. Go to Accessibility Settings
2. Select Text to speech output
3. Click play
Analysis:
Exception occurs due to calculation of
picokpr_getAttrValArrInt32(...) is incorrect. The logic here
intends to clear the MSB and return the rest of the bits. We
found if library compiled in Android N environment the result
of comparison operation is different from library compiled in
Android O environment. In Android O, actual returne value doesn't
process the value and returns as it is. This causes invalid
pointer access and hence native exception due to segmentation fault.
Solution: Changed to use bitwise shift instead.
Bug: 64204643
Test: After applying this patch, CTS cases can pass and exception
can be fixed.
Change-Id: Ife3137225ecf9667df62321472420fab6ab88d2ehttps://stackoverflow.com/questions/57392429
复制相似问题