Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ android {
}
compileSdkVersion 27
defaultConfig {
applicationId "com.github.fielddb.lessons"
applicationId "com.github.opensourcefieldlinguistics.fielddb.speech.kartuli"
minSdkVersion 16
targetSdkVersion 25
versionCode 9
versionName "2.18.2"
targetSdkVersion 26
versionCode 18
versionName "2.19.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
33 changes: 28 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />

<supports-screens
android:anyDensity="true"
Expand Down Expand Up @@ -53,8 +57,7 @@

<activity
android:name="com.github.fielddb.lessons.ui.DatumListActivity"
android:label="@string/title_datum_list_activity">
</activity>
android:label="@string/title_datum_list_activity"></activity>
<activity
android:name="com.github.fielddb.lessons.ui.WelcomeActivity"
android:label="@string/speech_app_name">
Expand All @@ -67,8 +70,7 @@
<activity
android:name="com.github.fielddb.experimentation.ui.ProductionExperimentActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/train">
</activity>
android:label="@string/train"></activity>
<activity
android:name="com.github.fielddb.lessons.ui.SpeechRecognitionActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
Expand Down Expand Up @@ -106,10 +108,31 @@
<service android:name="com.github.fielddb.service.KartuliLegalSearchCorpusService"></service>
<service android:name="com.github.fielddb.service.PocketSphinxRecognitionService"></service>

<service
android:name="com.github.fielddb.service.CorpusSyncService"
android:exported="true"
android:process=":sync">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter" />
</service>
<service android:name="com.github.fielddb.service.AuthenticatorService">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator" />
</service>

<provider
android:name="com.github.fielddb.database.DatumContentProvider"
android:authorities="com.github.fielddb.speechrecognition.kartuli.datum"
android:exported="true"></provider>
android:exported="true"
android:syncable="true"></provider>
<provider
android:name="com.github.fielddb.database.AudioVideoContentProvider"
android:authorities="com.github.fielddb.speechrecognition.kartuli.audiovideo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ public class KartuliSpeechRecognitionApplication extends FieldDBApplication {

@Override
public final void onCreate() {
if (BuildConfig.DEBUG) {
PrivateConstants.ACRA_SERVER_URL = PrivateConstants.ACRA_SERVER_URL.replace("learnx", "debug");
} else {
PrivateConstants.ACRA_SERVER_URL = PrivateConstants.ACRA_SERVER_URL.replace("debug", "learnx");
}
PrivateConstants.DATUM_AUTHORITY = "com.github.fielddb.speechrecognition.kartuli.datum";

super.onCreate();

/*
Expand Down Expand Up @@ -48,7 +55,7 @@ public final void onCreate() {
}
datumCursor.close();
} else {
if (wifi.isConnected() || Config.D) {
if (wifi.isConnected() || BuildConfig.DEBUG) {
Intent updateSamples = new Intent(getApplicationContext(), DownloadDatumsService.class);
getApplicationContext().startService(updateSamples);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,6 @@ public void onDestroy() {
super.onDestroy();
return;
}
Config.D = false;
// Config.DEFAULT_UPLOAD_AUDIO_VIDEO_URL = PrivateConstants.DEFAULT_UPLOAD_AUDIO_VIDEO_URL;
Log.d(Config.TAG, "Requesting upload of recognition audio file " + filename + " to " + Config.DEFAULT_UPLOAD_AUDIO_VIDEO_URL);
Intent uploadAudioFile = new Intent(getActivity(), UploadAudioVideoService.class);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
speech recognizer for low resource language speakers. You can use this
application to prepare your Android to recognize your speech, or the speech of
your language consultants. You need to read some
suggestions and then contact WiFi in order to prepare your voice model. We
phrases and then contact WiFi in order to prepare your voice model. We
expect that after reading some training sentences you will have a better result.
Because low resource languages are different from other languages ​​so we do
Because low resource languages are different from other languages, ​​so we do
not know how useful this application will be.\n\n

By using this app to train your recognizer you agree that we can
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/xml/authenticator.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator
xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="com.github.opensourcefieldlinguistics.fielddb.speech.kartulib"
android:icon="@mipmap/ic_launcher"
android:smallIcon="@mipmap/ic_launcher"
android:label="@string/app_name"/>
6 changes: 6 additions & 0 deletions app/src/main/res/xml/syncadapter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<sync-adapter
xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="com.github.fielddb.speechrecognition.kartuli.datum"
android:accountType="com.github.opensourcefieldlinguistics.fielddb.speech.kartuli"
android:isAlwaysSyncable="true"/>