When using Qt Speech on Android, you need to have only one single QTextToSpeech object to have proper locale setup. Otherwise setLanguage() call via JNI fails.
What a day(lol).
Life of a programmer with business major, with no formal programming education experience at all. :P
안드로이드에서 Qt Speech 사용시 유의점: 단일 인스턴스
QTextToSpeech를 단일 instance로 생성해서 공유 사용해야 로케일 설정이 제대로 됩니다. 이렇게 하지 않으면 JNI를 통해 setLanguage()를 호출할때 locale 설정이 안되는 문제가 생기더군요.
역시 삽질도 하기 나름입니다.
First impressions on Android programming
During the holidays I could have a chance to dig into Android programming and got some short thought. I share them here, hoping that these would help someone else.
- The programming environment of Android is literally fantastic. Now I can understand why a lot of companies are seriously considering Android in their embedded environment.
- Java is...... too slow(OTL). Damn slow. I can't wait for the delay
- I could, eventually, build Qt for Android in Windows
- Build environment: Qt 5.9.2 + SDK Level 19 + NDK r15c + BuildTools 26.0.2 + JDK 8 + Windows 10 64bit (find_java.bat in Android SDK can't find JDK 9. -_-)
- Qt Creator 4.4.0 can't recognize SDK Buildtools 26.X. At least 4.4.1 is needed
- QTextToSpeech seems to fix the locale to system in Android, and can't be changed(In Java you can). However, considering that I accidentally hear TTS in other locale in the app, we may have some change(or it may be simply and error)
안드로이드 프로그래밍 경험기
그간 연휴도 있고 해서 안드로이드 프로그래밍을 좀 각잡고 파고들었습니다. 몇가지 단상들이 남아서 혹시 도움이 될까 하여 정리해봅니다.
- Android의 프로그래밍 환경은 정말 기립박수를 치고 싶을 정도로 훌륭함. 왜 많은 회사들이 Android를 임베디드 환경에서 매우 긍정적으로 검토하는지 이해가 됨
- Java는...... 매우 느림(OTL). 답답함. 못써먹겠음
- 수많은 삽질 끝에 Windows에서 Qt for Android 빌드 성공
- Qt 5.9.2 + SDK Level 19 + NDK r15c + BuildTools 26.0.2 + JDK 8 + Windows 10 64bit 기반(JDK 9은 Android SDK의 find_java.bat가 인식을 못하더군요. -_-)
- Qt Creator 4.4.0은 SDK Buildtools 26.X대를 정상적으로 인식하지 못함. 최소 4.4.1이 필요
- QTextToSpeech는 locale이 시스템 로케일로 고정되며, 변경할 수 없는 것으로 생각됨(Java에선 가능한디......). 하지만 테스트 앱에서 시스템 로케일을 변경하지 않은 상태에서 다른 로케일의 TTS 출력이 가능했던걸 보면, 어쩌면 방법이 있을지도 모름(아니면 단순 오동작이었을지도......).
Subscribe to:
Posts (Atom)
PostgreSQL vs. SQLite: read & write in multithreaded environment
The start was humble. I needed to cache some data, and I thought just push them to database table and give index, and the rest will be datab...
Popular in Code{nested}
-
Unlike libssh, which uses cmake, libssh2 forces you to use Linux-like environment even in Windows, which eventually makes you to install MSY...
-
Net-SNMP는 거의 모든 리눅스 배포본에서 표준 SNMP 관리자로 사용되고 있는, 사실상의 표준이라고 할 수 있는 범용적인 도구입니다. 이번에 기회가 있어서 SNMP Trap 메시지를 받아서 처리는 도구를 만들게 되었는데, 개발중 중요하다고 생각되...
-
2019년 6월 19일부로 Qt 5.13.0이 발표 되었습니다. Qt 5.13.0의 새로운 기능 중에서 제 눈길을 꽤 끈 신기능이 하나 있었는데요....... Qt for WebAssembly 입니다. 그러니까...... Emscripten 을 사용해...