Running on Android 4.1+
If you have a problem running Google Cloud speech to text api on Android devices 4.1+
What I did in this project
- Downloaded https://github.com/GoogleCloudPlatform/android-docs-samples/blob/master/README.md
- Changed classes in project SpeechRecognitionClient in android-docs-samples-master\speech
- Changed AudioRecord in AudoEmitter.kt to support API 16
- Imported org.conscrypt:conscrypt-android:2.5.1 library
- Had to exclude group org.conscrypt from google-cloud-speech (in build.gradle)
- Added init { Security.insertProviderAt(Conscrypt.newProvider(), 1) } For Android 4.1 to run proper TLS for GRC to work
- I downloaded https://github.com/googleapis project
- Changed all StandardCharsets found in google-http-client to Charset.forName("UTF-8"))
- And also changed some tests to work
- https://imgur.com/a/iU7yjCZ (files changes)
- I have build this project and gor .jar files, which I included here
- And now it works!
HOW TO INSTALL:
- Just add your credential.json in app/res/raw/credential.json
- Run