Skip to content

Commit

Permalink
Turn into an IME
Browse files Browse the repository at this point in the history
  • Loading branch information
ElishaAz committed Feb 16, 2022
1 parent b003565 commit 8553c66
Show file tree
Hide file tree
Showing 13 changed files with 906 additions and 299 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
## About
## Vosk Voice IME

This demo implements offline speech recognition and speaker identification for mobile applications using Kaldi and Vosk libraries.

Check the [releases](https://github.com/alphacep/vosk-android-demo/releases) for pre-built binaries.

## Documentation

For documentation and instructions please visit the [Vosk Website](https://alphacephei.com/vosk/android).
This project provides a voice keyboard using [Vosk](https://alphacephei.com/vosk/android).
It is based on [https://github.com/Felicis/vosk-android-demo](https://github.com/Felicis/vosk-android-demo).
4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
android {
compileSdkVersion 31
defaultConfig {
applicationId "org.vosk.demo"
applicationId "org.vosk.ime"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
Expand All @@ -34,4 +34,6 @@ dependencies {
implementation 'net.java.dev.jna:jna:5.8.0@aar'
implementation group: 'com.alphacephei', name: 'vosk-android', version: '0.3.32'
implementation project(':models')
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.android.material:material:1.5.0'
}
23 changes: 19 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.vosk.demo">
package="org.vosk.ime">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<application
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:dataExtractionRules="@xml/data_extraction_rules"
tools:targetApi="s">

<service
android:name="org.vosk.ime.VoskIME"
android:exported="true"
android:label="@string/app_name"
android:permission="android.permission.BIND_INPUT_METHOD">
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>

<meta-data
android:name="android.view.im"
android:resource="@xml/method" />
</service>

<activity
android:name="VoskActivity"
android:name="org.vosk.ime.Settings"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -22,4 +36,5 @@
</intent-filter>
</activity>
</application>

</manifest>
248 changes: 0 additions & 248 deletions app/src/main/java/org/vosk/demo/VoskActivity.java

This file was deleted.

Loading

0 comments on commit 8553c66

Please sign in to comment.