diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index fb25b4e2d..4ba84edcc 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -17,6 +17,7 @@ import kotlinx.coroutines.withContext import org.jetbrains.anko.toast import java.io.File import java.io.FileInputStream +import java.net.URLEncoder class HttpReadAloudService : BaseReadAloudService(), MediaPlayer.OnPreparedListener, @@ -42,7 +43,7 @@ class HttpReadAloudService : BaseReadAloudService(), val per = getPrefString("ttsSpeechPer") ?: "0" return mapOf( Pair("idx", "1"), - Pair("tex", contentList[nowSpeak]), + Pair("tex", URLEncoder.encode(URLEncoder.encode(contentList[nowSpeak], "UTF-8"), "UTF-8")), Pair("cuid", "baidu_speech_demo "), Pair("cod", "2"), Pair("lan", "zh"), diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 323b10384..ae43df648 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -1,12 +1,16 @@ - 普通女声 - 普通男声 + 度小美 + 度小宇 度逍遥 - 百度丫丫 + 度丫丫 + 度小娇 + 度米朵 + 度博文 + 度小童 + 度小萌 百度骚男 - 百度暖女 百度评书 百度主持 @@ -16,8 +20,12 @@ 1 3 4 - 11 5 + 103 + 106 + 110 + 111 + 11 6 9