|
|
@@ -39,6 +39,7 @@ export function useDialogueEngine() {
|
|
|
status: 'done',
|
|
|
turnId: message.clientTurnId ?? undefined,
|
|
|
audioUrl: message.audioUrl ?? undefined,
|
|
|
+ audioDuration: message.audioDuration ?? undefined,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -144,6 +145,9 @@ export function useDialogueEngine() {
|
|
|
if (event.type === 'transcript') {
|
|
|
studentMsg.content = event.text
|
|
|
studentMsg.status = 'done'
|
|
|
+ if (event.audioDuration != null) {
|
|
|
+ studentMsg.audioDuration = event.audioDuration
|
|
|
+ }
|
|
|
if (!isFinalRound.value) {
|
|
|
messages.value.push(aiMsg)
|
|
|
}
|
|
|
@@ -426,6 +430,9 @@ export function useDialogueEngine() {
|
|
|
if (data.type === 'transcript' && studentMsg) {
|
|
|
studentMsg.content = data.text
|
|
|
studentMsg.status = 'done'
|
|
|
+ if (data.audioDuration != null) {
|
|
|
+ studentMsg.audioDuration = data.audioDuration
|
|
|
+ }
|
|
|
if (aiMsg && !messages.value.includes(aiMsg)) {
|
|
|
messages.value.push(aiMsg)
|
|
|
}
|