添加语音的空实现
This commit is contained in:
15
.idea/codeStyles/Project.xml
generated
15
.idea/codeStyles/Project.xml
generated
@@ -3,18 +3,9 @@
|
|||||||
<JetCodeStyleSettings>
|
<JetCodeStyleSettings>
|
||||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||||
<value>
|
<value>
|
||||||
<package name="java.util" alias="false" withSubpackages="false" />
|
<package name="java.util" withSubpackages="false" static="false" />
|
||||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
|
||||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
<package name="io.ktor" withSubpackages="true" static="false" />
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
|
||||||
<value>
|
|
||||||
<package name="" alias="false" withSubpackages="true" />
|
|
||||||
<package name="java" alias="false" withSubpackages="true" />
|
|
||||||
<package name="javax" alias="false" withSubpackages="true" />
|
|
||||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
|
||||||
<package name="" alias="true" withSubpackages="true" />
|
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</JetCodeStyleSettings>
|
</JetCodeStyleSettings>
|
||||||
|
|||||||
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -74,6 +74,7 @@
|
|||||||
<option value="$PROJECT_DIR$/tts" />
|
<option value="$PROJECT_DIR$/tts" />
|
||||||
<option value="$PROJECT_DIR$/tts/tts-base" />
|
<option value="$PROJECT_DIR$/tts/tts-base" />
|
||||||
<option value="$PROJECT_DIR$/tts/tts-di" />
|
<option value="$PROJECT_DIR$/tts/tts-di" />
|
||||||
|
<option value="$PROJECT_DIR$/tts/tts-noop" />
|
||||||
<option value="$PROJECT_DIR$/tts/tts-zhi" />
|
<option value="$PROJECT_DIR$/tts/tts-zhi" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
|||||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||||
<groovy codeStyle="LEGACY" />
|
<groovy codeStyle="LEGACY" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
project.dependencies {
|
project.dependencies {
|
||||||
if (Boolean.valueOf(RELEASE)) {
|
if (Boolean.valueOf(RELEASE)) {
|
||||||
bydautoImplementation rootProject.ext.dependencies.ttszhi
|
bydautoImplementation rootProject.ext.dependencies.ttsdi
|
||||||
d82xImplementation rootProject.ext.dependencies.ttszhi
|
d82xImplementation rootProject.ext.dependencies.ttszhi
|
||||||
em1Implementation rootProject.ext.dependencies.ttszhi
|
em1Implementation rootProject.ext.dependencies.ttszhi
|
||||||
em3Implementation rootProject.ext.dependencies.ttszhi
|
em3Implementation rootProject.ext.dependencies.ttszhi
|
||||||
@@ -11,7 +11,7 @@ project.dependencies {
|
|||||||
em4Implementation rootProject.ext.dependencies.ttszhi
|
em4Implementation rootProject.ext.dependencies.ttszhi
|
||||||
e8xxImplementation rootProject.ext.dependencies.ttszhi
|
e8xxImplementation rootProject.ext.dependencies.ttszhi
|
||||||
} else {
|
} else {
|
||||||
bydautoImplementation project(':tts:tts-zhi')
|
bydautoImplementation project(':tts:tts-di')
|
||||||
d82xImplementation project(':tts:tts-zhi')
|
d82xImplementation project(':tts:tts-zhi')
|
||||||
em1Implementation project(':tts:tts-zhi')
|
em1Implementation project(':tts:tts-zhi')
|
||||||
em3Implementation project(':tts:tts-zhi')
|
em3Implementation project(':tts:tts-zhi')
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ targetSdkVersion : 22,
|
|||||||
ttsbase : "com.mogo.tts:tts-base:${TTS_BASE_VERSION}",
|
ttsbase : "com.mogo.tts:tts-base:${TTS_BASE_VERSION}",
|
||||||
ttsdi : "com.mogo.tts:tts-di:${TTS_DI_VERSION}",
|
ttsdi : "com.mogo.tts:tts-di:${TTS_DI_VERSION}",
|
||||||
ttszhi : "com.mogo.tts:tts-zhi:${TTS_ZHI_VERSION}",
|
ttszhi : "com.mogo.tts:tts-zhi:${TTS_ZHI_VERSION}",
|
||||||
|
ttsnoop : "com.mogo.tts:tts-noop:${TTS_NOOP_VERSION}",
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -102,6 +102,7 @@ CRASHREPORT_NOOP_VERSION=2.0.0
|
|||||||
TTS_BASE_VERSION=1.0.0
|
TTS_BASE_VERSION=1.0.0
|
||||||
TTS_DI_VERSION=1.0.0
|
TTS_DI_VERSION=1.0.0
|
||||||
TTS_ZHI_VERSION=1.0.0
|
TTS_ZHI_VERSION=1.0.0
|
||||||
|
TTS_NOOP_VERSION=1.0.0
|
||||||
|
|
||||||
######## 外部依赖引用
|
######## 外部依赖引用
|
||||||
# 车聊聊
|
# 车聊聊
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
include ':tts:tts-base'
|
include ':tts:tts-base'
|
||||||
include ':tts:tts-di'
|
include ':tts:tts-di'
|
||||||
include ':tts:tts-zhi'
|
include ':tts:tts-zhi'
|
||||||
|
include ':tts:tts-noop'
|
||||||
include ':test:crashreport'
|
include ':test:crashreport'
|
||||||
include ':test:crashreport-bugly'
|
include ':test:crashreport-bugly'
|
||||||
include ':test:crashreport-noop'
|
include ':test:crashreport-noop'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.mogo.tts.di">
|
package="com.mogo.tts.noop">
|
||||||
|
|
||||||
/
|
/
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.mogo.tts.di;
|
package com.mogo.tts.noop;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.mogo.tts.di;
|
package com.mogo.tts.noop;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
1
tts/tts-noop/.gitignore
vendored
Normal file
1
tts/tts-noop/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
50
tts/tts-noop/build.gradle
Normal file
50
tts/tts-noop/build.gradle
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
apply plugin: 'com.android.library'
|
||||||
|
apply plugin: 'com.alibaba.arouter'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||||
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||||
|
versionCode Integer.valueOf(VERSION_CODE)
|
||||||
|
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||||
|
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
|
|
||||||
|
javaCompileOptions {
|
||||||
|
annotationProcessorOptions {
|
||||||
|
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
|
implementation rootProject.ext.dependencies.androidxappcompat
|
||||||
|
implementation rootProject.ext.dependencies.arouter
|
||||||
|
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||||
|
|
||||||
|
if (Boolean.valueOf(RELEASE)) {
|
||||||
|
implementation rootProject.ext.dependencies.ttsbase
|
||||||
|
} else {
|
||||||
|
implementation project(":tts:tts-base")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||||
0
tts/tts-noop/consumer-rules.pro
Normal file
0
tts/tts-noop/consumer-rules.pro
Normal file
3
tts/tts-noop/gradle.properties
Normal file
3
tts/tts-noop/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
GROUP=com.mogo.tts
|
||||||
|
POM_ARTIFACT_ID=tts-noop
|
||||||
|
VERSION_CODE=1
|
||||||
21
tts/tts-noop/proguard-rules.pro
vendored
Normal file
21
tts/tts-noop/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
5
tts/tts-noop/src/main/AndroidManifest.xml
Normal file
5
tts/tts-noop/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.mogo.tts.noop">
|
||||||
|
|
||||||
|
/
|
||||||
|
</manifest>
|
||||||
91
tts/tts-noop/src/main/java/com/mogo/tts/noop/NoopTTS.java
Normal file
91
tts/tts-noop/src/main/java/com/mogo/tts/noop/NoopTTS.java
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
package com.mogo.tts.noop;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.mogo.tts.base.IMogoTTS;
|
||||||
|
import com.mogo.tts.base.IMogoTTSCallback;
|
||||||
|
import com.mogo.tts.base.MogoTTSConstants;
|
||||||
|
import com.mogo.tts.base.PreemptType;
|
||||||
|
|
||||||
|
public
|
||||||
|
/**
|
||||||
|
* @author congtaowang
|
||||||
|
* @since 2020/10/13
|
||||||
|
*
|
||||||
|
* 无语音播报
|
||||||
|
*/
|
||||||
|
@Route( path = MogoTTSConstants.API_PATH )
|
||||||
|
class NoopTTS implements IMogoTTS {
|
||||||
|
|
||||||
|
private static final String TAG = "NoopTTS";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void flush() {
|
||||||
|
Log.d( TAG, "noop - flush" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void speakTTSVoice( String tts ) {
|
||||||
|
Log.d( TAG, "noop - speakTTSVoice" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void speakTTSVoice( String tts, IMogoTTSCallback callback ) {
|
||||||
|
speakTTSVoice( tts );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void speakTTSVoice( String tts, PreemptType type, IMogoTTSCallback callback ) {
|
||||||
|
speakTTSVoice( tts );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void speakQAndACmd( String tts, IMogoTTSCallback callback ) {
|
||||||
|
Log.d( TAG, "noop - speakQAndACmd" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void speakQAndACmd( String tts, String[] okWords, String[] cancelWords, IMogoTTSCallback callback ) {
|
||||||
|
Log.d( TAG, "noop - speakQAndACmd2" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerUnWakeupCommand( String cmd, String[] cmdWords, IMogoTTSCallback callback ) {
|
||||||
|
Log.d( TAG, "noop - registerUnWakeupCommand" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unregisterUnWakeupCommand( String cmd ) {
|
||||||
|
Log.d( TAG, "noop - unregisterUnWakeupCommand" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unregisterUnWakeupCommand( String cmd, IMogoTTSCallback callback ) {
|
||||||
|
Log.d( TAG, "noop - unregisterUnWakeupCommand2" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startAIAssist( Context context ) {
|
||||||
|
Log.d( TAG, "noop - startAIAssist" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startAIAssist( Context context, int status ) {
|
||||||
|
Log.d( TAG, "noop - startAIAssist2" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakOffSpeak() {
|
||||||
|
Log.d( TAG, "noop - breakOffSpeak" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init( Context context ) {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,8 @@ if [ $? -ne 0 ]; then exit; fi
|
|||||||
if [ $? -ne 0 ]; then exit; fi
|
if [ $? -ne 0 ]; then exit; fi
|
||||||
./gradlew :tts:tts-di:clean :tts:tts-di:uploadArchives
|
./gradlew :tts:tts-di:clean :tts:tts-di:uploadArchives
|
||||||
if [ $? -ne 0 ]; then exit; fi
|
if [ $? -ne 0 ]; then exit; fi
|
||||||
|
./gradlew :tts:tts-noop:clean :tts:tts-noop:uploadArchives
|
||||||
|
if [ $? -ne 0 ]; then exit; fi
|
||||||
./gradlew :foudations:mogo-commons:clean :foudations:mogo-commons:uploadArchives
|
./gradlew :foudations:mogo-commons:clean :foudations:mogo-commons:uploadArchives
|
||||||
if [ $? -ne 0 ]; then exit; fi
|
if [ $? -ne 0 ]; then exit; fi
|
||||||
./gradlew :libraries:mogo-map-api:clean :libraries:mogo-map-api:uploadArchives
|
./gradlew :libraries:mogo-map-api:clean :libraries:mogo-map-api:uploadArchives
|
||||||
|
|||||||
Reference in New Issue
Block a user