mizzzuno commited on
Commit
79dfd5a
·
verified ·
1 Parent(s): 353124a

Upload talkDetail.html

Browse files
Files changed (1) hide show
  1. talkDetail.html +94 -0
talkDetail.html ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="ja">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>会話表示画面</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ margin: 0;
11
+ padding: 20px;
12
+ background-color: #f4f4f4;
13
+ }
14
+ .container {
15
+ max-width: 800px;
16
+ margin: 0 auto;
17
+ background-color: #fff;
18
+ padding: 20px;
19
+ border-radius: 8px;
20
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
21
+ }
22
+ h2 {
23
+ margin-bottom: 20px;
24
+ }
25
+ #transcription {
26
+ white-space: pre-wrap;
27
+ padding: 10px;
28
+ background-color: #e9e9e9;
29
+ border-radius: 4px;
30
+ margin-bottom: 20px;
31
+ max-height: 400px;
32
+ overflow-y: auto;
33
+ }
34
+ button {
35
+ margin: 5px;
36
+ padding: 10px 20px;
37
+ border: none;
38
+ border-radius: 4px;
39
+ background-color: #007bff;
40
+ color: #fff;
41
+ cursor: pointer;
42
+ }
43
+ button:hover {
44
+ background-color: #0056b3;
45
+ }
46
+ </style>
47
+ </head>
48
+ <body>
49
+ <div class="container">
50
+ <h2>会話の文字起こし表示</h2>
51
+ <div id="transcription">ここに会話内容が表示されます。</div>
52
+ <button onclick="goToRecording()">録音画面</button>
53
+ <button onclick="goToFeedback()">フィードバック画面</button>
54
+ </div>
55
+
56
+ <script>
57
+ // 会話データを表示
58
+ async function displayTranscription() {
59
+ const transcriptionElement = document.getElementById('transcription');
60
+
61
+ try {
62
+ // バックエンドからデータを取得(デモ用のURLを指定)
63
+ const response = await fetch('/api/transcription');
64
+ if (!response.ok) throw new Error('データ取得に失敗しました。');
65
+
66
+ const data = await response.json();
67
+
68
+ // 会話内容を整形して表示
69
+ const formattedText = data.conversations.map((conv, index) =>
70
+ `【${conv.speaker}】 ${conv.text}`
71
+ ).join('\n');
72
+
73
+ transcriptionElement.textContent = formattedText;
74
+ } catch (error) {
75
+ transcriptionElement.textContent = `エラー: ${error.message}`;
76
+ console.error('データ取得エラー:', error);
77
+ }
78
+ }
79
+
80
+ // 録音画面に戻る
81
+ function goToRecording() {
82
+ window.location.href = 'index.html';
83
+ }
84
+
85
+ // フィードバック画面に移動
86
+ function goToFeedback() {
87
+ window.location.href = 'feedback.html';
88
+ }
89
+
90
+ // 初期化処理
91
+ displayTranscription();
92
+ </script>
93
+ </body>
94
+ </html>