Skip to content

Commit ea2d551

Browse files
committed
Working Vosk RecognitionService
0 parents  commit ea2d551

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+378718
-0
lines changed

.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
6+
7+
.settings
8+
.project
9+
10+
# JDT-specific (Eclipse Java Development Tools)
11+
.classpath

app/build.gradle

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apply plugin: 'com.android.application'
2+
3+
repositories {
4+
google()
5+
maven {
6+
url "https://dl.bintray.com/alphacep/vosk"
7+
}
8+
}
9+
10+
android {
11+
compileSdkVersion 30
12+
defaultConfig {
13+
applicationId "cat.oreilly.localstt"
14+
minSdkVersion 21
15+
targetSdkVersion 30
16+
versionCode 1
17+
versionName "1.0"
18+
ndk {
19+
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64', 'x86'
20+
}
21+
}
22+
buildTypes {
23+
release {
24+
minifyEnabled false
25+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
26+
}
27+
}
28+
}
29+
30+
dependencies {
31+
implementation 'com.alphacep:vosk-android:0.3.15'
32+
implementation 'androidx.appcompat:appcompat:1.2.0'
33+
implementation 'com.google.code.gson:gson:2.8.6'
34+
}

app/src/main/AndroidManifest.xml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="cat.oreilly.localstt">
4+
5+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
6+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
7+
8+
<application
9+
android:allowBackup="false"
10+
android:icon="@drawable/ic_service_trigger"
11+
android:label="@string/app_name" >
12+
13+
<service
14+
android:name=".VoskRecognitionService"
15+
android:icon="@drawable/ic_service_trigger"
16+
android:label="@string/vosk_recognition_service"
17+
android:permission="android.permission.RECORD_AUDIO">
18+
<intent-filter>
19+
20+
<!-- The constant value is defined at RecognitionService.SERVICE_INTERFACE. -->
21+
<action android:name="android.speech.RecognitionService" />
22+
23+
<category android:name="android.intent.category.DEFAULT" />
24+
</intent-filter>
25+
26+
<meta-data
27+
android:name="android.speech"
28+
android:resource="@xml/recognition_service" />
29+
</service>
30+
</application>
31+
</manifest>
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Catalan model for android
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0b98b3c582e789693996799f0f434008
238 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
baeff4e70c13f9a61e1987f4abc2f827
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--use-energy=false
2+
--num-mel-bins=20
3+
--num-ceps=20
4+
--low-freq=20
5+
--high-freq=7600
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e44d88fe84f60e0926bba88e46e556fd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--min-active=200
2+
--max-active=3000
3+
--beam=10.0
4+
--lattice-beam=2.0
5+
--acoustic-scale=1.0
6+
--frame-subsampling-factor=3
7+
--endpoint.silence-phones=1:2:3:4:5:6:7:8:9:10
8+
--endpoint.rule2.min-trailing-silence=0.5
9+
--endpoint.rule3.min-trailing-silence=1.0
10+
--endpoint.rule4.min-trailing-silence=2.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
37d7392bf7d3b67bd59a7eb5bcfbaf47
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
702de9c65b1d27a709fb185046afc07f
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
494db51b272c42cb251a9831de70b4ee
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
7935
2+
7936
3+
7937
4+
7938
5+
7939
6+
7940
7+
7941
8+
7942
9+
7943
10+
7944
11+
7945
12+
7946
13+
7947
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
974869565e76c84c27f43558398e9531

0 commit comments

Comments
 (0)