浏览器端无法播放语音bug修改
This commit is contained in:
parent
0a0070da94
commit
4b537fc7ab
@ -81,15 +81,8 @@ func _on_total_current_click_check_signal(isCorrect):
|
|||||||
if $total.trainingMode != TotalScene.Training_Mode.Exam:
|
if $total.trainingMode != TotalScene.Training_Mode.Exam:
|
||||||
$StepJudgment.showError()
|
$StepJudgment.showError()
|
||||||
|
|
||||||
|
|
||||||
func load_mp3(path):
|
|
||||||
var file = FileAccess.open(path, FileAccess.READ)
|
|
||||||
var sound = AudioStreamMP3.new()
|
|
||||||
sound.data = file.get_buffer(file.get_length())
|
|
||||||
return sound
|
|
||||||
|
|
||||||
##回复收到
|
##回复收到
|
||||||
var sound = load_mp3("res://Assets/training_speech/sd.mp3")
|
var sound = load("res://Assets/training_speech/sd.mp3")
|
||||||
func _on_voice_communication_speech_recognition_successed() -> void:
|
func _on_voice_communication_speech_recognition_successed() -> void:
|
||||||
if handleStepIndex == 0 :
|
if handleStepIndex == 0 :
|
||||||
await $VoiceCommunication.play_reply(sound)
|
await $VoiceCommunication.play_reply(sound)
|
||||||
|
Loading…
Reference in New Issue
Block a user