Spaces:
Runtime error
Runtime error
Updated:Screen transitions
Browse files- app.py +5 -0
- feedback.html +12 -10
- index.html +2 -8
- talkDetail.html +13 -2
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import os
|
|
| 5 |
app = Flask(__name__)
|
| 6 |
|
| 7 |
@app.route('/')
|
|
|
|
| 8 |
def index():
|
| 9 |
return send_from_directory(".", "index.html")
|
| 10 |
|
|
@@ -12,6 +13,10 @@ def index():
|
|
| 12 |
def feedback():
|
| 13 |
return send_from_directory(".","feedback.html")
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
@app.route('/upload_audio', methods=['POST'])
|
| 16 |
def upload_audio():
|
| 17 |
try:
|
|
|
|
| 5 |
app = Flask(__name__)
|
| 6 |
|
| 7 |
@app.route('/')
|
| 8 |
+
@app.route('/index',methods=['POST'])
|
| 9 |
def index():
|
| 10 |
return send_from_directory(".", "index.html")
|
| 11 |
|
|
|
|
| 13 |
def feedback():
|
| 14 |
return send_from_directory(".","feedback.html")
|
| 15 |
|
| 16 |
+
@app.route('/talk_detail',methods=['POST'])
|
| 17 |
+
def talk_detail():
|
| 18 |
+
return send_from_directory(".","talkDetail.html")
|
| 19 |
+
|
| 20 |
@app.route('/upload_audio', methods=['POST'])
|
| 21 |
def upload_audio():
|
| 22 |
try:
|
feedback.html
CHANGED
|
@@ -77,14 +77,6 @@
|
|
| 77 |
return "素晴らしい";
|
| 78 |
}
|
| 79 |
|
| 80 |
-
function showRecorder() {
|
| 81 |
-
window.location.href = "index.html";
|
| 82 |
-
}
|
| 83 |
-
|
| 84 |
-
function showHistory() {
|
| 85 |
-
window.location.href = "talkDetail.html";
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
window.onload = function() {
|
| 89 |
const level = 73; // レベル値
|
| 90 |
const percentages = [80, 50, 60, 100, 30]; // 各バーのパーセンテージ
|
|
@@ -129,8 +121,18 @@
|
|
| 129 |
<div class="bar"><div class="bar-fill" style="background-color: lightcoral;"></div></div>
|
| 130 |
</div>
|
| 131 |
|
| 132 |
-
<
|
| 133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
</div>
|
| 135 |
</body>
|
| 136 |
</html>
|
|
|
|
| 77 |
return "素晴らしい";
|
| 78 |
}
|
| 79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
window.onload = function() {
|
| 81 |
const level = 73; // レベル値
|
| 82 |
const percentages = [80, 50, 60, 100, 30]; // 各バーのパーセンテージ
|
|
|
|
| 121 |
<div class="bar"><div class="bar-fill" style="background-color: lightcoral;"></div></div>
|
| 122 |
</div>
|
| 123 |
|
| 124 |
+
<form method="POST" action="/index">
|
| 125 |
+
<div class="feedback-space">
|
| 126 |
+
<input class="history-button" id="indexButton" type="submit" name="submit" value="録音画面を表示">
|
| 127 |
+
</div>
|
| 128 |
+
</form>
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
<form method="POST" action="/talk_detail">
|
| 132 |
+
<div class="feedback-space">
|
| 133 |
+
<input class="history-button" id="detailButton" type="submit" name="submit" value="会話履歴を表示">
|
| 134 |
+
</div>
|
| 135 |
+
</form>
|
| 136 |
</div>
|
| 137 |
</body>
|
| 138 |
</html>
|
index.html
CHANGED
|
@@ -70,17 +70,13 @@
|
|
| 70 |
<button class="record-button" id="recordButton" onclick="toggleRecording()">
|
| 71 |
<div class="record-icon" id="recordIcon"></div>
|
| 72 |
</button>
|
| 73 |
-
|
| 74 |
-
<button class="result-button" id="resultButton" onclick="showResults()">結果を表示</button>
|
| 75 |
-
-->
|
| 76 |
-
|
| 77 |
<form method="POST" action="/feedback">
|
| 78 |
<div class="feedback-space">
|
| 79 |
<input class="result-button" id="resultButton" type="submit" name="submit" value="フィードバック画面を表示">
|
| 80 |
</div>
|
| 81 |
</form>
|
| 82 |
|
| 83 |
-
|
| 84 |
<script>
|
| 85 |
let isRecording = false;
|
| 86 |
let mediaRecorder;
|
|
@@ -139,9 +135,7 @@
|
|
| 139 |
}
|
| 140 |
}
|
| 141 |
}
|
| 142 |
-
|
| 143 |
-
window.location.href = 'feedback.html';
|
| 144 |
-
}
|
| 145 |
// Chart.js の初期化
|
| 146 |
const ctx = document.getElementById('speechChart').getContext('2d');
|
| 147 |
const speechChart = new Chart(ctx, {
|
|
|
|
| 70 |
<button class="record-button" id="recordButton" onclick="toggleRecording()">
|
| 71 |
<div class="record-icon" id="recordIcon"></div>
|
| 72 |
</button>
|
| 73 |
+
|
|
|
|
|
|
|
|
|
|
| 74 |
<form method="POST" action="/feedback">
|
| 75 |
<div class="feedback-space">
|
| 76 |
<input class="result-button" id="resultButton" type="submit" name="submit" value="フィードバック画面を表示">
|
| 77 |
</div>
|
| 78 |
</form>
|
| 79 |
|
|
|
|
| 80 |
<script>
|
| 81 |
let isRecording = false;
|
| 82 |
let mediaRecorder;
|
|
|
|
| 135 |
}
|
| 136 |
}
|
| 137 |
}
|
| 138 |
+
|
|
|
|
|
|
|
| 139 |
// Chart.js の初期化
|
| 140 |
const ctx = document.getElementById('speechChart').getContext('2d');
|
| 141 |
const speechChart = new Chart(ctx, {
|
talkDetail.html
CHANGED
|
@@ -52,8 +52,19 @@
|
|
| 52 |
<div class="container">
|
| 53 |
<h2>会話の文字起こし表示</h2>
|
| 54 |
<div id="transcription">ここに会話内容が表示されます。</div>
|
| 55 |
-
|
| 56 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
</div>
|
| 58 |
|
| 59 |
<script>
|
|
|
|
| 52 |
<div class="container">
|
| 53 |
<h2>会話の文字起こし表示</h2>
|
| 54 |
<div id="transcription">ここに会話内容が表示されます。</div>
|
| 55 |
+
|
| 56 |
+
<form method="POST" action="/index">
|
| 57 |
+
<div class="feedback-space">
|
| 58 |
+
<input class="history-button" id="indexButton" type="submit" name="submit" value="録音画面を表示">
|
| 59 |
+
</div>
|
| 60 |
+
</form>
|
| 61 |
+
|
| 62 |
+
<form method="POST" action="/feedback">
|
| 63 |
+
<div class="feedback-space">
|
| 64 |
+
<input class="history-button" id="feedbackButton" type="submit" name="submit" value="フィードバック画面を表示">
|
| 65 |
+
</div>
|
| 66 |
+
</form>
|
| 67 |
+
|
| 68 |
</div>
|
| 69 |
|
| 70 |
<script>
|