Spaces:
Runtime error
Runtime error
| async function displayTranscription() { | |
| const transcriptionElement = document.getElementById("transcription"); | |
| const loader = document.getElementById("loader"); | |
| loader.style.display = "block"; | |
| try { | |
| const response = await fetch("/transcription"); | |
| if (!response.ok) throw new Error("データ取得に失敗しました。"); | |
| const data = await response.json(); | |
| const conversations = data.transcription; | |
| if (!data || !data.transcription) { | |
| throw new Error("会話データが見つかりませんでした。"); | |
| } | |
| transcriptionElement.innerHTML = conversations; | |
| loader.style.display = "none"; | |
| console.log(conversations); | |
| } catch (error) { | |
| loader.style.display = "none"; | |
| transcriptionElement.textContent = `エラー: ${error.message}`; | |
| console.error("データ取得エラー:", error); | |
| } | |
| } | |
| displayTranscription(); | |
| function showRecorder() { | |
| window.location.href = "/index"; | |
| } | |
| function showFeedback() { | |
| window.location.href = "/feedback"; | |
| } | |