summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Chen <clchen@google.com>2009-06-05 17:21:55 -0700
committerCharles Chen <clchen@google.com>2009-06-05 18:11:40 -0700
commita0a2fb768c5183036a4dd68c795ea3596d9a6790 (patch)
treeb7a122d9bbd27bf076c15fd1cc4ecb4a60ea6bc9
parentb190149a69b110e6719ce0a41877a683f8db7ae7 (diff)
downloadexternal_svox-a0a2fb768c5183036a4dd68c795ea3596d9a6790.zip
external_svox-a0a2fb768c5183036a4dd68c795ea3596d9a6790.tar.gz
external_svox-a0a2fb768c5183036a4dd68c795ea3596d9a6790.tar.bz2
Adding svox tts plugin wrapper.
-rwxr-xr-xAndroid.mk94
-rwxr-xr-xAndroidManifest.xml48
-rwxr-xr-xres/drawable/icon.pngbin0 -> 3180 bytes
-rwxr-xr-xres/layout/main.xml30
-rwxr-xr-xres/values/strings.xml22
-rwxr-xr-xsrc/com/svox/pico/Pico.java42
-rwxr-xr-xsrc/com/svox/pico/PicoConfig.java28
7 files changed, 264 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100755
index 0000000..7213543
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,94 @@
+#include $(all-subdir-makefiles)
+
+# SVOX Pico TTS Engine
+# This makefile builds both an activity and a shared library.
+
+ifneq ($(TARGET_SIMULATOR),true) # not 64 bit clean
+
+TOP_LOCAL_PATH:= $(call my-dir)
+
+# Build Pico activity
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := user
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := svox
+
+LOCAL_JNI_SHARED_LIBRARIES := libttspico
+
+include $(BUILD_PACKAGE)
+
+# Build Pico Shared Library
+
+LOCAL_PATH:= $(TOP_LOCAL_PATH)/tts
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= com_svox_picottsengine.cpp
+
+LOCAL_C_INCLUDES += \
+ external/svox/lib \
+ frameworks
+
+LOCAL_STATIC_LIBRARIES:= libsvoxpico
+
+LOCAL_SHARED_LIBRARIES:= libcutils
+
+LOCAL_MODULE:= libttspico
+
+LOCAL_ARM_MODE:= arm
+
+LOCAL_PRELINK_MODULE:= false
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+# Build Base Generic SVOX Pico Library
+LOCAL_PATH:= $(TOP_LOCAL_PATH)/lib
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+ picoacph.c \
+ picoapi.c \
+ picobase.c \
+ picocep.c \
+ picoctrl.c \
+ picodata.c \
+ picodbg.c \
+ picoextapi.c \
+ picofftsg.c \
+ picokdbg.c \
+ picokdt.c \
+ picokfst.c \
+ picoklex.c \
+ picoknow.c \
+ picokpdf.c \
+ picokpr.c \
+ picoktab.c \
+ picoos.c \
+ picopal.c \
+ picopam.c \
+ picopr.c \
+ picorsrc.c \
+ picosa.c \
+ picosig.c \
+ picosig2.c \
+ picospho.c \
+ picotok.c \
+ picotrns.c \
+ picowa.c
+
+LOCAL_PRELINK_MODULE:= false
+
+LOCAL_MODULE:= libsvoxpico
+
+LOCAL_CFLAGS+= $(TOOL_CFLAGS)
+
+LOCAL_LDFLAGS+= $(TOOL_LDFLAGS)
+
+include $(BUILD_STATIC_LIBRARY)
+
+endif # TARGET_SIMULATOR
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100755
index 0000000..329f9a4
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.svox.pico" android:versionCode="1"
+ android:versionName="1.0">
+ <uses-sdk android:minSdkVersion="2" />
+ <application android:icon="@drawable/icon" android:label="@string/app_name">
+ <activity android:name=".PicoConfig" android:label="@string/app_name">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <activity android:enabled="true" android:name=".Pico"
+ android:hasCode="false"
+ android:label="@string/app_name"
+ android:theme="@android:style/Theme.Translucent.NoTitleBar">
+ <intent-filter>
+ <action android:name="android.intent.action.START_TTS_ENGINE" />
+ <category android:name="android.intent.category.tts_engine.PICO" />
+ <category android:name="android.intent.category.tts_lang.en" />
+ <category android:name="android.intent.category.tts_lang.en.US" />
+ <category android:name="android.intent.category.tts_lang.en.GB" />
+ <category android:name="android.intent.category.tts_lang.fr" />
+ <category android:name="android.intent.category.tts_lang.de" />
+ <category android:name="android.intent.category.tts_lang.it" />
+ <category android:name="android.intent.category.tts_lang.es" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/res/drawable/icon.png b/res/drawable/icon.png
new file mode 100755
index 0000000..7502484
--- /dev/null
+++ b/res/drawable/icon.png
Binary files differ
diff --git a/res/layout/main.xml b/res/layout/main.xml
new file mode 100755
index 0000000..7a7828e
--- /dev/null
+++ b/res/layout/main.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/app_name"
+ />
+</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100755
index 0000000..527b049
--- /dev/null
+++ b/res/values/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+ <string name="app_name">Pico TTS</string>
+</resources>
diff --git a/src/com/svox/pico/Pico.java b/src/com/svox/pico/Pico.java
new file mode 100755
index 0000000..b8ab7d1
--- /dev/null
+++ b/src/com/svox/pico/Pico.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.svox.pico;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+/*
+ * The Java portion of this TTS plugin engine app does nothing.
+ * This activity is only here so that the native code can be
+ * wrapped up inside an apk file.
+ *
+ * The file path structure convention is that the native library
+ * implementing TTS must be a file placed here:
+ * /data/data/<PACKAGE_NAME>/lib/libtts<ACTIVITY_NAME_LOWERCASED>.so
+ * Example:
+ * /data/data/com.svox.pico/lib/libttspico.so
+ */
+
+public class Pico extends Activity {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ // The Java portion of this does nothing.
+ // This activity is only here so that everything
+ // can be wrapped up inside an apk file.
+ finish();
+ }
+}
diff --git a/src/com/svox/pico/PicoConfig.java b/src/com/svox/pico/PicoConfig.java
new file mode 100755
index 0000000..a612bdc
--- /dev/null
+++ b/src/com/svox/pico/PicoConfig.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.svox.pico;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class PicoConfig extends Activity {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+ }
+}