Spaces:
Running
Running
Update talkDetail.html
Browse files
templates/talkDetail.html
CHANGED
@@ -43,17 +43,21 @@
|
|
43 |
if (!response.ok) throw new Error("データ取得に失敗しました。");
|
44 |
|
45 |
const data = await response.json();
|
46 |
-
const conversations = data.
|
47 |
|
48 |
-
if (!
|
49 |
throw new Error("会話データが見つかりませんでした。");
|
50 |
}
|
|
|
51 |
const formattedText = conversations
|
52 |
|
53 |
.map((conv) => `【${conv.speaker}】 ${conv.text}`)
|
54 |
.join("\n");
|
55 |
console.log("フォーマットテキスト:", formattedText);
|
56 |
transcriptionElement.textContent = formattedText;
|
|
|
|
|
|
|
57 |
} catch (error) {
|
58 |
transcriptionElement.textContent = `エラー: ${error.message}`;
|
59 |
console.error("データ取得エラー:", error);
|
|
|
43 |
if (!response.ok) throw new Error("データ取得に失敗しました。");
|
44 |
|
45 |
const data = await response.json();
|
46 |
+
const conversations = data.transcription;
|
47 |
|
48 |
+
if (!data || !data.transcription) {
|
49 |
throw new Error("会話データが見つかりませんでした。");
|
50 |
}
|
51 |
+
/*
|
52 |
const formattedText = conversations
|
53 |
|
54 |
.map((conv) => `【${conv.speaker}】 ${conv.text}`)
|
55 |
.join("\n");
|
56 |
console.log("フォーマットテキスト:", formattedText);
|
57 |
transcriptionElement.textContent = formattedText;
|
58 |
+
*/
|
59 |
+
transcriptionElement.textContent = conversations;
|
60 |
+
console.log(conversations);
|
61 |
} catch (error) {
|
62 |
transcriptionElement.textContent = `エラー: ${error.message}`;
|
63 |
console.error("データ取得エラー:", error);
|