首页 > 其他分享 >Android 8.0 更换TTS为Google TTS , TTS播报出来是女声,更改为男生

Android 8.0 更换TTS为Google TTS , TTS播报出来是女声,更改为男生

时间:2024-11-19 13:43:24浏览次数:3  
标签:8.0 Google vendor TTS apps apk GoogleTTS dw GoogleTts

diff --git a/frameworks/base/core/java/android/speech/tts/TextToSpeech.java b/frameworks/base/core/java/android/speech/tts/TextToSpeech.java
index 763ea2ca38…2ec9f737b0 100755
— a/frameworks/base/core/java/android/speech/tts/TextToSpeech.java
+++ b/frameworks/base/core/java/android/speech/tts/TextToSpeech.java
@@ -244,7 +244,7 @@ public class TextToSpeech {
* Default pitch.
* @hide
*/

  •    public static final int DEFAULT_PITCH = 100;
    
  •    public static final int DEFAULT_PITCH = 1;
    
       /**
        * Default volume.
    

diff --git a/vendor/dw/apps/GoogleTts/Android.mk b/vendor/dw/apps/GoogleTts/Android.mk
new file mode 100755
index 0000000000…b54f58f6db
— /dev/null
+++ b/vendor/dw/apps/GoogleTts/Android.mk
@@ -0,0 +1,20 @@
+###############################################################################
+# GoogleTTS
+LOCAL_PATH := $(call my-dir)
+
+my_archs := arm x86 arm64 x86_64
+my_src_arch := $(call get-prebuilt-src-arch, $(my_archs))
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := GoogleTTS
+LOCAL_MODULE_CLASS := APPS
+LOCAL_MODULE_TAGS := optional
+LOCAL_BUILT_MODULE_STEM := package.apk
+LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
+#LOCAL_PRIVILEGED_MODULE :=
+LOCAL_CERTIFICATE := PRESIGNED
+LOCAL_OVERRIDES_PACKAGES := PicoTts
+LOCAL_SRC_FILES := KaTeX parse error: Expected group after '_' at position 15: (LOCAL_MODULE)_̲(my_src_arch).apk
+#LOCAL_REQUIRED_MODULES :=
+LOCAL_MODULE_TARGET_ARCH := $(my_src_arch)
+include $(BUILD_PREBUILT)
diff --git a/vendor/dw/apps/GoogleTts/GoogleTTS_arm.apk b/vendor/dw/apps/GoogleTts/GoogleTTS_arm.apk
new file mode 100755
index 0000000000…bbb790cf78
Binary files /dev/null and b/vendor/dw/apps/GoogleTts/GoogleTTS_arm.apk differ
diff --git a/vendor/dw/apps/GoogleTts/GoogleTTS_arm64.apk b/vendor/dw/apps/GoogleTts/GoogleTTS_arm64.apk
new file mode 100755
index 0000000000…8fb06e5c08
Binary files /dev/null and b/vendor/dw/apps/GoogleTts/GoogleTTS_arm64.apk differ
diff --git a/vendor/dw/apps/GoogleTts/GoogleTTS_x86.apk b/vendor/dw/apps/GoogleTts/GoogleTTS_x86.apk
new file mode 100755
index 0000000000…9b3ef67b7e
Binary files /dev/null and b/vendor/dw/apps/GoogleTts/GoogleTTS_x86.apk differ
diff --git a/vendor/dw/apps/GoogleTts/GoogleTTS_x86_64.apk b/vendor/dw/apps/GoogleTts/GoogleTTS_x86_64.apk
new file mode 100755
index 0000000000…1a2cb8988e
Binary files /dev/null and b/vendor/dw/apps/GoogleTts/GoogleTTS_x86_64.apk differ
diff --git a/vendor/dw/products/dw.mk b/vendor/dw/products/dw.mk
index e5bcc9dafa…558a69d344 100755
— a/vendor/dw/products/dw.mk
+++ b/vendor/dw/products/dw.mk
@@ -1,8 +1,11 @@
PRODUCT_PACKAGES +=
SogouInput_11.21_android_swap \

  • Iflytek \
  • GPS_Factory_Text
  • GPS_Factory_Text ^M
  • GoogleTTS ^M
  • FleetClient58^M
  • #Iflytek ^M

    SpeechService3.0 \

    GPS_Test \

    Lisheng \

  •   # ^M
    

diff --git a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/tts/TextToSpeechSettings.java b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/tts/TextToSpeechSettings.java
index e8823a6388…7176fcadc1 100755
— a/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/tts/TextToSpeechSettings.java
+++ b/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/tts/TextToSpeechSettings.java
@@ -228,7 +228,8 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
// Do set pitch correctly after it may have changed, and unlike speed, it doesn’t change
// immediately.
final ContentResolver resolver = getContentResolver();

  •        mTts.setPitch(android.provider.Settings.Secure.getInt(resolver, TTS_DEFAULT_PITCH, TextToSpeech.Engine.DEFAULT_PITCH)/100.0f);
    
  •        //mTts.setPitch(android.provider.Settings.Secure.getInt(resolver, TTS_DEFAULT_PITCH, TextToSpeech.Engine.DEFAULT_PITCH)/100.0f);
    
  •                   mTts.setPitch(0.5f);
       }
    
       Locale ttsDefaultLocale = mTts.getDefaultLanguage();
    

@@ -301,7 +302,9 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
if (mTts != null) {
mCurrentEngine = mTts.getCurrentEngine();
mTts.setSpeechRate(mDefaultRate / 100.0f);

  •        mTts.setPitch(mDefaultPitch / 100.0f);
    
  •        //mTts.setPitch(mDefaultPitch / 100.0f);
    
  •                   mTts.setPitch(0.5f);
    
  •    }
    
       SettingsActivity activity = null;
    

@@ -705,7 +708,8 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
android.provider.Settings.Secure.putInt(
getContentResolver(), TTS_DEFAULT_PITCH, mDefaultPitch);
if (mTts != null) {

  •            mTts.setPitch(mDefaultPitch / 100.0f);
    
  •            //mTts.setPitch(mDefaultPitch / 100.0f);
    
  •                           mTts.setPitch(0.5f);
           }
           if (DBG) Log.d(TAG, "TTS default pitch changed, now" + mDefaultPitch);
       } catch (NumberFormatException e) {
    

diff --git a/vendor/partner_gms/apps/GoogleTTS/Android.mk b/vendor/partner_gms/apps/GoogleTTS/Android.mk_disable
similarity index 100%
rename from vendor/partner_gms/apps/GoogleTTS/Android.mk
rename to vendor/partner_gms/apps/GoogleTTS/Android.mk_disable

标签:8.0,Google,vendor,TTS,apps,apk,GoogleTTS,dw,GoogleTts
From: https://blog.csdn.net/juzi_bug/article/details/143883697

相关文章

  • 调整方法和相关的注册表项,能帮助你加速 MS Edge 的加载:增强 Google Chrome 浏览器在视
    在Windows11系统中,通过调整MicrosoftEdge浏览器的注册表设置,你可以对其性能进行优化,尤其是提高启动速度和加载速度。以下是一些常见的调整方法和相关的注册表项,能帮助你加速MSEdge的加载:1. 禁用硬件加速硬件加速可能会影响性能,尤其是在资源较少的设备上。如果你遇到性......
  • Windows10安装MySQL8.0.40
    官网地址https://www.mysql.com/环境查看Windows10MySQL8.0.40下载MySQL打开首页-下载-MySQL社区版本下载本次下载Window10的安装版本,其他系统如Linux,Mac可根据需要自行选择需要登录Oracle账号才能下载,如果没有账号则注册一个登录安装双击下载的软件开始......
  • 【网络安全 | 漏洞挖掘】Google SSO用户的帐户接管
    未经许可,不得转载。文章目录DOMXSS获取CSRFToken解除Google账户绑定在这篇博文中,我将详细介绍找到针对GoogleSSO用户的账号接管(ATO)漏洞的过程。DOMXSS我遇到DOMXSS漏洞的位置非常微妙,因为我遇到了非常严格的WAF。获取CSRFToken在找到XSS漏......
  • 什么是Google Kubernetes Engine (GKE) 中Node Pool 和 Pod
    在GoogleKubernetesEngine(GKE)中,NodePool和Pod是Kubernetes集群中的两个关键概念,它们的关系密切但作用不同:简单类比:想象一个工厂(Kubernetes集群):NodePool: 是工厂里的多个相同的车间,每个车间都有相同的机器设备。Pod: 是车间里的生产线,每个生产线都在进行不......
  • 11月ChatGPT商业运营网站程序源码,支持Midjourney绘画,GPT语音对话+DALL-E3文生图+suno-
    11月ChatGPT商业运营网站程序源码,支持Midjourney绘画,GPT语音对话+DALL-E3文生图+suno-ai音乐生成+TTS语音对话+支持GPTs文章目录11月ChatGPT商业运营网站程序源码,支持Midjourney绘画,GPT语音对话+DALL-E3文生图+suno-ai音乐生成+TTS语音对话+支持GPTs前言一、文档总结二......
  • <QNAP 453D QTS-5.x> 日志记录:在 NAS 从 huggingface_hub 下载模型 google-t5/t5-base,在
    目的:离线使用 google-t5/t5-base预训练模型, 行多种自然语言处理任务:翻译可借不支持东亚语言。Project-22.Ai-1.T5-base只能在:  English,French,Romanian,German间使用,code非常简单,大概沾到本地/离线使用模型的皮毛。运行这么小的模型,也使我的笔记拔高了,硬件要......
  • shodan 和 Google 语法
    shodan和Google语法shodanshodan作用shodan是一个网络空间测绘引擎,也可以叫做网络空间搜索引擎。可以用来搜索网络设备,主要用于信息收集。工作原理厂商在全球范围内的服务器上部署了很多扫描器,通过24小时不停地扫描相关的设备IP地址。优点:方便缺点:实时性差、消耗......
  • 探索Google Earth Engine:利用MODIS数据和R语言进行2000-2021年遥感生态指数(RSEI)的时空
    前段时间,小编学习了在GEE上进行遥感生态指数(RSEI)的评估,非常头疼,但是实验了两周后,亲测有效,主要采用的是MODIS数据分析了2000-2021年中国内蒙古某地的RSEI时间序列分布状况,现在把学习的代码分享给大家。1GEE计算RSEI1.1研究区域导入与初步定义varsa=ee.FeatureCollection(......
  • Google Play上架被拒的原因以及解决方法合集
     GooglePlay商店是全球Android开发者发布应用的首选平台,但在这个平台上发布或更新应用时,开发者必须遵守严格的规定和政策。如果违反这些规定,应用可能会被拒绝上架或更新,甚至可能导致开发者账号被封禁。本文将总结GooglePlay上架或更新被拒的常见原因,并提供相应的解决方案。......
  • Google Ads账号被封原因与申诉方法
      GoogleAds是全球最大的在线广告平台之一,为广告主提供了广泛的广告服务。然而,即使在遵守规则的情况下,有时账户也可能因为各种原因遭遇封禁。了解这些原因和申诉方法对于维护广告账户的健康至关重要。一、GoogleAds封户原因:1、违反平台政策:1)规避系统:常见原因包括在账......