优化代码
This commit is contained in:
parent
36e2b55b07
commit
a01fe653c6
@ -165,7 +165,7 @@ class MainActivity : BaseViewModelActivity<ActivityMainBinding, MainViewModel>()
|
||||
voiceInfo = mutableListOf<VoiceBeanResp>().apply {
|
||||
add(
|
||||
VoiceBeanResp(
|
||||
audioUrl = /*UserInfoManager.userInfo?.wakeUpAudioUrl ?: */"https://static.seerteach.net/aidialogue/systemVoice/aliyun-nv.mp3"
|
||||
audioUrl = UserInfoManager.userInfo?.wakeUpAudioUrl ?: "https://static.seerteach.net/aidialogue/systemVoice/aliyun-nv.mp3"
|
||||
)
|
||||
)
|
||||
}
|
||||
@ -196,7 +196,7 @@ class MainActivity : BaseViewModelActivity<ActivityMainBinding, MainViewModel>()
|
||||
voiceInfo = mutableListOf<VoiceBeanResp>().apply {
|
||||
add(
|
||||
VoiceBeanResp(
|
||||
audioUrl = "https://static.seerteach.net/aidialogue/userWakeUpAudio/ttsmaker-file-2025-12-31-16-2-51.mp3"
|
||||
audioUrl = UserInfoManager.userInfo?.endAudioUrl ?: "https://static.seerteach.net/aidialogue/userWakeUpAudio/ttsmaker-file-2025-12-31-16-2-51.mp3"
|
||||
)
|
||||
)
|
||||
}
|
||||
@ -365,11 +365,7 @@ class MainActivity : BaseViewModelActivity<ActivityMainBinding, MainViewModel>()
|
||||
private var promptPlaying = false
|
||||
private var backPlaying = false
|
||||
private var promptTimeoutJob: Job? = null
|
||||
private val PROMPT_PLAY_TIMEOUT_MS = 3000L // 10 秒
|
||||
|
||||
|
||||
private var backTimeoutJob: Job? = null
|
||||
private val BACK_PLAY_TIMEOUT_MS = 3000L // 10 秒
|
||||
private val PROMPT_PLAY_TIMEOUT_MS = 3000L // 3 秒
|
||||
|
||||
|
||||
fun onAudioProgressUpdated( // Unity 调用此方法传递音频进度
|
||||
@ -379,8 +375,8 @@ class MainActivity : BaseViewModelActivity<ActivityMainBinding, MainViewModel>()
|
||||
word: String,
|
||||
audioUrl: String
|
||||
) {
|
||||
val wakeupUrl = /*UserInfoManager.userInfo?.wakeUpAudioUrl ?: */
|
||||
"https://static.seerteach.net/aidialogue/systemVoice/aliyun-nv.mp3" ?: return
|
||||
val wakeupUrl = UserInfoManager.userInfo?.wakeUpAudioUrl ?:
|
||||
"https://static.seerteach.net/aidialogue/systemVoice/aliyun-nv.mp3"
|
||||
|
||||
if (audioUrl != wakeupUrl) return
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user