From f398adb6d5b08a83c0dbd706e68a1a766118b390 Mon Sep 17 00:00:00 2001 From: keitakn Date: Fri, 3 Jan 2025 16:18:52 +0900 Subject: [PATCH] =?UTF-8?q?:art:=20isAudioInitialized=20=E3=81=AE=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E3=81=8C=E4=B8=8A=E6=89=8B=E3=81=8F=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E3=81=AE=E3=81=A7?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=88=86=E5=B2=90=E3=82=92=E3=82=B3=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=82=A2=E3=82=A6=E3=83=88=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/_components/InputPromptForm.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/_components/InputPromptForm.tsx b/frontend/src/app/_components/InputPromptForm.tsx index 521b79f..700e094 100644 --- a/frontend/src/app/_components/InputPromptForm.tsx +++ b/frontend/src/app/_components/InputPromptForm.tsx @@ -124,13 +124,17 @@ export function InputPromptForm() { setIsSpeaking(false); } - if (!isAudioInitialized) { - log.info('音声が初期化されていません。初期化を試みます。'); - const initialized = await initializeAudio(); - if (!initialized) { - log.error('音声の初期化に失敗しました'); - return; - } + // if (!isAudioInitialized) { + // log.info('音声が初期化されていません。初期化を試みます。'); + // const initialized = await initializeAudio(); + // if (!initialized) { + // log.error('音声の初期化に失敗しました'); + // return; + // } + // } + + if (audioContextRef.current?.state === 'suspended') { + await audioContextRef.current?.resume(); } try {