+ {snapshot.currentQuestion || "The next question will appear here."}
+
- {statusText(snapshot)}
-
- Spoken responses use an AI-generated OpenAI voice.
-
- {snapshot.partialText && (
-
-
- Live transcript (not sent)
-
- {snapshot.partialText}
-
+
+ {snapshot.microphoneEnabled ? (
+
+ ) : (
+
)}
- {canCorrect && (
-
+
+ {snapshot.phase === "recoverable-error" && (
+
+
We couldn’t connect
+
{snapshot.errorMessage}
+ {(snapshot.errorCode || snapshot.errorRequestId) && (
+
+ Technical details
+ {snapshot.errorCode && (
+ Error code: {snapshot.errorCode}
+ )}
+ {snapshot.errorRequestId && (
+ Diagnostic reference: {snapshot.errorRequestId}
+ )}
+
+ )}
+
+ )}
+
+ {snapshot.partialText && (
+
+
+ What we’re hearing · Not sent yet
+
+ {snapshot.partialText}
+
+ )}
+ {!snapshot.partialText && snapshot.lastCommittedText && (
+
+ Answer recorded
+ {snapshot.lastCommittedText}
+
+ )}
+
+ {editing && (
+
+ )}
+
+
+ {isSpeaking && (
+
+ )}
+ {snapshot.phase === "listening" && (
+ <>
+
}
+ type="button"
+ onClick={onDoneSpeaking}
+ >
+ Done speaking
+
}
+ type="button"
variant="subtle"
+ onClick={onPause}
>
- Send correction
+ Pause
-
+ >
)}
-
- {hasError ? (
+ {snapshot.phase === "paused" && (
+
+ )}
+ {snapshot.phase === "recoverable-error" && (
+
+ )}
+ {snapshot.lastCommittedText && !snapshot.partialText && (
+ <>
- ) : (
- )}
-
-
- )}
-
+ >
+ )}
+
+