浏览代码

1.修改MOCA语音合成无法播放bug

王鹏鹏 1 年之前
父节点
当前提交
376f664a62
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 1 0
      .idea/misc.xml
  2. 7 1
      moca/src/main/java/com/yingyangfly/moca/record/ListenRecordFragment.kt

+ 1 - 0
.idea/misc.xml

@@ -556,6 +556,7 @@
         <entry key="..\:/workspace/hcp-pads/livebroadcast/src/main/res/layout/dialog_game_tasks.xml" value="0.536" />
         <entry key="..\:/workspace/hcp-pads/livebroadcast/src/main/res/layout/item_live_broadcast.xml" value="0.6" />
         <entry key="..\:/workspace/hcp-pads/login/src/main/res/layout/activity_login.xml" value="0.4" />
+        <entry key="..\:/workspace/hcp-pads/moca/src/main/res/layout/fragment_listen_record.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pads/personalcenter/src/main/res/drawable/bg_common_head_layout.xml" value="0.151" />
         <entry key="..\:/workspace/hcp-pads/personalcenter/src/main/res/drawable/bg_comprehensive_evaluation.xml" value="0.151" />
         <entry key="..\:/workspace/hcp-pads/personalcenter/src/main/res/drawable/bg_diagnosis.xml" value="0.151" />

+ 7 - 1
moca/src/main/java/com/yingyangfly/moca/record/ListenRecordFragment.kt

@@ -114,7 +114,13 @@ class ListenRecordFragment : BaseFragment<FragmentListenRecordBinding>(),
                         nextPage(v)
                     }
                     R.id.imagePlay -> {
-                        LiveEventBusUtil.send(RxBusCodes.SPEECHSYNTHESIS, words)
+                        val stringBuffer = StringBuffer()
+                        if(words.isNotEmpty()){
+                            words.forEach {
+                                stringBuffer.append(it)
+                            }
+                        }
+                        LiveEventBusUtil.send(RxBusCodes.SPEECHSYNTHESIS, stringBuffer.toString())
                     }
                 }
             }