From c6618737c7f0ec62307a7a9bac57a87ac74f4904 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 23 Oct 2019 20:45:17 +0800 Subject: [PATCH] up --- .../app/service/HttpReadAloudService.kt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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 4ba84edcc..a797118d6 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -39,18 +39,25 @@ class HttpReadAloudService : BaseReadAloudService(), } private fun getAudioBody(): Map { - val spd = (getPrefInt("ttsSpeechRate", 25) + 5) / 5 - val per = getPrefString("ttsSpeechPer") ?: "0" return mapOf( + Pair( + "tex", + URLEncoder.encode( + URLEncoder.encode( + contentList[nowSpeak], + "UTF-8" + ), + "UTF-8" + ) + ), + Pair("spd", ((getPrefInt("ttsSpeechRate", 25) + 5) / 5).toString()), + Pair("per", getPrefString("ttsSpeechPer") ?: "0"), + Pair("cuid", "baidu_speech_demo"), Pair("idx", "1"), - Pair("tex", URLEncoder.encode(URLEncoder.encode(contentList[nowSpeak], "UTF-8"), "UTF-8")), - Pair("cuid", "baidu_speech_demo "), Pair("cod", "2"), Pair("lan", "zh"), Pair("ctp", "1"), Pair("pdt", "1"), - Pair("spd", spd.toString()), - Pair("per", per), Pair("vol", "5"), Pair("pit", "5"), Pair("_res_tag_", "audio")