summaryrefslogtreecommitdiffstats
path: root/packages/TtsService
diff options
context:
space:
mode:
authorCharles Chen <clchen@google.com>2009-07-07 14:33:52 -0700
committerCharles Chen <clchen@google.com>2009-07-07 14:57:16 -0700
commitb02ced7e454ae195c53993fe310ee38de6452ded (patch)
tree1f982b93c95a2e91686ddf4fdcea8ac01283cc46 /packages/TtsService
parent7fdd661f12f73148517e5e011efc206cc7259fbc (diff)
downloadframeworks_base-b02ced7e454ae195c53993fe310ee38de6452ded.zip
frameworks_base-b02ced7e454ae195c53993fe310ee38de6452ded.tar.gz
frameworks_base-b02ced7e454ae195c53993fe310ee38de6452ded.tar.bz2
Cleaning up logs.
Initializing SpeechItem.mText to "" instead of null to prevent a null from accidentally being used when it is a non-text utterance.
Diffstat (limited to 'packages/TtsService')
-rw-r--r--packages/TtsService/jni/android_tts_SynthProxy.cpp6
-rwxr-xr-xpackages/TtsService/src/android/tts/TtsService.java9
2 files changed, 8 insertions, 7 deletions
diff --git a/packages/TtsService/jni/android_tts_SynthProxy.cpp b/packages/TtsService/jni/android_tts_SynthProxy.cpp
index 058c033..1bd4991 100644
--- a/packages/TtsService/jni/android_tts_SynthProxy.cpp
+++ b/packages/TtsService/jni/android_tts_SynthProxy.cpp
@@ -133,7 +133,7 @@ class SynthProxyJniStorage {
delete mAudioOut;
mAudioOut = NULL;
} else {
- LOGI("AudioTrack OK");
+ //LOGI("AudioTrack OK");
mAudioOut->start();
LOGI("AudioTrack started");
}
@@ -178,7 +178,7 @@ static tts_callback_status ttsSynthDoneCB(void *& userdata, uint32_t rate,
SynthProxyJniStorage* pJniData = (SynthProxyJniStorage*)(pForAfter->jniStorage);
if (pForAfter->usageMode == USAGEMODE_PLAY_IMMEDIATELY){
- LOGV("Direct speech");
+ //LOGV("Direct speech");
if (wav == NULL) {
delete pForAfter;
@@ -610,7 +610,7 @@ LOGI("android_tts_SynthProxy_playAudioBuffer");
SynthProxyJniStorage* pSynthData = (SynthProxyJniStorage*)jniData;
short* wav = (short*) bufferPointer;
pSynthData->mAudioOut->write(wav, bufferSize);
- LOGI("AudioTrack wrote: %d bytes", bufferSize);
+ //LOGI("AudioTrack wrote: %d bytes", bufferSize);
}
diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java
index 10f4d6e..a713edf 100755
--- a/packages/TtsService/src/android/tts/TtsService.java
+++ b/packages/TtsService/src/android/tts/TtsService.java
@@ -52,7 +52,7 @@ public class TtsService extends Service implements OnCompletionListener {
public static final int EARCON = 1;
public static final int SILENCE = 2;
public static final int TEXT_TO_FILE = 3;
- public String mText = null;
+ public String mText = "";
public ArrayList<String> mParams = null;
public int mType = TEXT;
public long mDuration = 0;
@@ -66,6 +66,7 @@ public class TtsService extends Service implements OnCompletionListener {
public SpeechItem(long silenceTime) {
mDuration = silenceTime;
+ mType = SILENCE;
}
public SpeechItem(String text, ArrayList<String> params, int itemType, String filename) {
@@ -125,7 +126,7 @@ public class TtsService extends Service implements OnCompletionListener {
@Override
public void onCreate() {
super.onCreate();
- Log.i("TTS", "TTS starting");
+ //Log.i("TTS", "TTS starting");
mResolver = getContentResolver();
@@ -231,7 +232,7 @@ public class TtsService extends Service implements OnCompletionListener {
private int isLanguageAvailable(String lang, String country, String variant) {
- Log.v("TTS", "TtsService.isLanguageAvailable(" + lang + ", " + country + ", " +variant+")");
+ //Log.v("TTS", "TtsService.isLanguageAvailable(" + lang + ", " + country + ", " +variant+")");
return nativeSynth.isLanguageAvailable(lang, country, variant);
}
@@ -242,7 +243,7 @@ public class TtsService extends Service implements OnCompletionListener {
private int setLanguage(String lang, String country, String variant) {
- Log.v("TTS", "TtsService.setLanguage(" + lang + ", " + country + ", " + variant + ")");
+ //Log.v("TTS", "TtsService.setLanguage(" + lang + ", " + country + ", " + variant + ")");
if (isDefaultEnforced()) {
return nativeSynth.setLanguage(getDefaultLanguage(), getDefaultCountry(),
getDefaultLocVariant());