Browse Source

Report the eSpeak version in the main activity.

master
Reece H. Dunn 12 years ago
parent
commit
920dc0ad0c

+ 8
- 1
android/jni/jni/eSpeakService.cpp View File

/* /*
* Copyright (C) 2011 Google Inc. * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
return JNI_TRUE; 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 JNIEXPORT jint
JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeGetSampleRate( JNICALL Java_com_reecedunn_espeak_SpeechSynthesis_nativeGetSampleRate(
JNIEnv *env, jobject object) { JNIEnv *env, jobject object) {

+ 1
- 0
android/res/values/strings.xml View File

<item>5x</item> <item>5x</item>
</string-array> </string-array>
<string name="status">Status</string> <string name="status">Status</string>
<string name="tts_version">eSpeak version</string>


</resources> </resources>

+ 7
- 1
android/src/com/reecedunn/espeak/SpeechSynthesis.java View File

/* /*
* Copyright (C) 2012 Reece H. Dunn
* Copyright (C) 2012-2013 Reece H. Dunn
* Copyright (C) 2011 Google Inc. * Copyright (C) 2011 Google Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
nativeDestroy(); nativeDestroy();
} }


public static String getVersion() {
return nativeGetVersion();
}

public int getSampleRate() { public int getSampleRate() {
return nativeGetSampleRate(); return nativeGetSampleRate();
} }


private native final boolean nativeDestroy(); private native final boolean nativeDestroy();


private native final static String nativeGetVersion();

private native final int nativeGetSampleRate(); private native final int nativeGetSampleRate();


private native final int nativeGetChannelCount(); private native final int nativeGetChannelCount();

+ 4
- 1
android/src/com/reecedunn/espeak/eSpeakActivity.java View File

/* /*
* Copyright (C) 2012 Reece H. Dunn
* Copyright (C) 2012-2013 Reece H. Dunn
* Copyright (C) 2009 The Android Open Source Project * Copyright (C) 2009 The Android Open Source Project
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
mInformation.add(new Pair<String,String>(availableVoices, Integer.toString(mVoices.size()))); mInformation.add(new Pair<String,String>(availableVoices, Integer.toString(mVoices.size())));
} }


final String version = getString(R.string.tts_version);
mInformation.add(new Pair<String,String>(version, SpeechSynthesis.getVersion()));

final String statusText; final String statusText;
switch (mState) { switch (mState) {
case ERROR: case ERROR:

Loading…
Cancel
Save