diff --git a/android/jni/jni/eSpeakService.cpp b/android/jni/jni/eSpeakService.cpp
index 432d604d..19ea3cf2 100644
--- a/android/jni/jni/eSpeakService.cpp
+++ b/android/jni/jni/eSpeakService.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Google Inc.
- * Copyright (C) 2012 Reece H. Dunn
+ * Copyright (C) 2012-2013 Reece H. Dunn
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -162,6 +162,13 @@ JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeDestroy(
return JNI_TRUE;
}
+JNIEXPORT jobject
+JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeGetVersion(
+ JNIEnv *env, jclass clazz) {
+ if (DEBUG) LOGV("%s", __FUNCTION__);
+ return env->NewStringUTF(espeak_Info(NULL));
+}
+
JNIEXPORT jint
JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeGetSampleRate(
JNIEnv *env, jobject object) {
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
index 747b46db..70bc7163 100755
--- a/android/res/values/strings.xml
+++ b/android/res/values/strings.xml
@@ -128,5 +128,6 @@
- 5x
Status
+ eSpeak version
\ No newline at end of file
diff --git a/android/src/com/reecedunn/espeak/SpeechSynthesis.java b/android/src/com/reecedunn/espeak/SpeechSynthesis.java
index a2a09d95..f248ffcc 100644
--- a/android/src/com/reecedunn/espeak/SpeechSynthesis.java
+++ b/android/src/com/reecedunn/espeak/SpeechSynthesis.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Reece H. Dunn
+ * Copyright (C) 2012-2013 Reece H. Dunn
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -78,6 +78,10 @@ public class SpeechSynthesis {
nativeDestroy();
}
+ public static String getVersion() {
+ return nativeGetVersion();
+ }
+
public int getSampleRate() {
return nativeGetSampleRate();
}
@@ -185,6 +189,8 @@ public class SpeechSynthesis {
private native final boolean nativeDestroy();
+ private native final static String nativeGetVersion();
+
private native final int nativeGetSampleRate();
private native final int nativeGetChannelCount();
diff --git a/android/src/com/reecedunn/espeak/eSpeakActivity.java b/android/src/com/reecedunn/espeak/eSpeakActivity.java
index 9c62b81c..77bbbefa 100644
--- a/android/src/com/reecedunn/espeak/eSpeakActivity.java
+++ b/android/src/com/reecedunn/espeak/eSpeakActivity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Reece H. Dunn
+ * Copyright (C) 2012-2013 Reece H. Dunn
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -177,6 +177,9 @@ public class eSpeakActivity extends Activity {
mInformation.add(new Pair(availableVoices, Integer.toString(mVoices.size())));
}
+ final String version = getString(R.string.tts_version);
+ mInformation.add(new Pair(version, SpeechSynthesis.getVersion()));
+
final String statusText;
switch (mState) {
case ERROR: