Whisper To Input, also known by its Mandarin name 輕聲細語輸入法, is an Android keyboard that performs speech-to-text (STT/ASR) with OpenAI Whisper or Google Gemini and inputs the recognized text; Supports English, Chinese, Japanese, etc. and even mixed languages and Taiwanese.
This project is a fork of the original Whisper To Input. This version includes the significant addition of support for Google's Gemini API, contributed by aptdnfapt (@aptdnfapt), allowing users to turn voice into text using Gemini models.
-
Download the APK file from the latest release to your phone.
-
Locate the APK file in your phone and click it. Click "Install" to install the app.
-
An
Unsafe app blockedwarning will pop up. ClickMore detailsand then clickInstall anyway. ClickOpento open the app.
-
Allow the app to record audio and send notifications. These permissions are required for the app to work properly. If you accidentally denied the permissions, you must go to the app settings page to allow them.
-
Go to the app settings page and enter your configuration. You have 3 choices for the transcription service: using the official OpenAI API with your API key, self-hosting a Whisper ASR Webservice, or using Google's Gemini API with your API key.
Some example configurations:
- OpenAI API:
Request Style: OpenAI API Endpoint: https://api.openai.com/v1/audio/transcriptions Language Code: API Key: sk-...xxxx Gemini API Key: - Whisper ASR Service:
Request Style: Whisper Webservice Endpoint: http://<SERVER_IP>:9000/asr Language Code: API Key: Gemini API Key: - Gemini API:
Request Style: Gemini API Endpoint: https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest Language Code: API Key: Gemini API Key: AIzaSy...xxxx
- OpenAI API:
-
Go to the system settings page and enable the app keyboard. This process may vary depending on your Android version and phone model. The following screenshots are taken on Android 13 of a Asus Zenfone 8.
-
Open any app that requires text input, such as a browser, and click the input box. Choose the app keyboard by clicking the bottom right button and choosing
Whisper Input.
-
Click the microphone button to start recording. After you finish speaking, click the microphone button again. The recognized text will be inputted into the text box.
Microphone Keyin the center: Click to start recording, click again to stop recording, and input the recognized text.Cancel Keyin the bottom left (Only visible when recording): Click to cancel the current recording.Backspace Keyin the upper right: Delete the previous character. If you press and hold this key, it will keep deleting characters until you release it.Enter Keyin the bottom right: Input a newline character. If you press this while recording, it will stop recording and input the recognized text with a trailing newline.Settings Keyin the upper left: Open the app settings page.Switch Keyin the upper left: Switch to the previous input method. Note that if there were no previous input method, this key will not do anything.
All current builds in the release page are debug builds. To view the logs, enable USB debugging, connect your phone to a PC, and use adb logcat to view the logs. If you have a local Android Studio install, launch the ADB tool, otherwise, you may want to consider installing a minimal standalone ADB from Minimal ADB and Fastboot.
Below are some useful adb logcat commands:
adb devices
adb logcat *:E
adb logcat *:W
adb logcat *:I
adb logcat *:D
adb logcat *:VSee the adb doc for more info.
RECORD_AUDIO: Required for the app to record audio for voice input.POST_NOTIFICATIONS: Required for the app to show toasts in the background if any error occurs.
- Sometimes the keyboard will silently fail, please see issue #17 for further information.
- Taiwanese (or Hokkien) transcription seems to work quiet well, although not declared officially (thanks @ijsun for discovering this). To support Taiwanese transcription, do not set the
Language Codein the settings page.
Please open an issue if you have any questions.
To build and release a newer version, open Android Studio and follow the steps below:
- Bump the version code and version name.
- Retrieve signing keystore and its password from Johnson.
- Menu:
Build > Generate Signed App Bundle / APK... - Select
APK, and fill in the signing keystore path and password, and selectDebugin the next step to build. - Rename the file
whisper-to-input/android/app/build/outputs/apk/debug/app-debug.apkaccordingly. - Create Git tag and release on GitHub.
See the official document for more information.
This repository is licensed under the GPLv3 license. For more information, please refer to the LICENSE file.
- Yan-Bin Diau (@tigerpaws01) & Johnson Sun (@j3soon): Original project development.
- Ying-Chou Sun (@ijsun): Discovered Taiwanese language support.
- aptdnfapt (@aptdnfapt): Forked the project and added Google Gemini API support.
For a complete list of contributors to the code of this repository, please visit the contributor list.
