Spaces:
Runtime error
Runtime error
Merge branch 'main' of https://huggingface.co/spaces/Justtalk/Justalk
Browse files- __pycache__/transcription.cpython-310.pyc +0 -0
- app.py +3 -2
- static/feedback.js +11 -0
- static/register_record.js +150 -150
- templates/feedback.html +174 -170
- templates/talkDetail.html +151 -49
- templates/userRegister.html +151 -151
__pycache__/transcription.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/transcription.cpython-310.pyc and b/__pycache__/transcription.cpython-310.pyc differ
|
|
|
app.py
CHANGED
|
@@ -196,8 +196,9 @@ def upload_audio():
|
|
| 196 |
@app.route('/reset', methods=['GET'])
|
| 197 |
def reset():
|
| 198 |
global users
|
| 199 |
-
users=[]
|
| 200 |
-
return 200
|
|
|
|
| 201 |
|
| 202 |
@app.route('/upload_base_audio', methods=['POST'])
|
| 203 |
def upload_base_audio():
|
|
|
|
| 196 |
@app.route('/reset', methods=['GET'])
|
| 197 |
def reset():
|
| 198 |
global users
|
| 199 |
+
users = []
|
| 200 |
+
return jsonify({"status": "success", "message": "Users reset"}), 200
|
| 201 |
+
|
| 202 |
|
| 203 |
@app.route('/upload_base_audio', methods=['POST'])
|
| 204 |
def upload_base_audio():
|
static/feedback.js
CHANGED
|
@@ -16,6 +16,7 @@ async function getAnalysis() {
|
|
| 16 |
loader.style.display = "block";
|
| 17 |
try {
|
| 18 |
const response = await fetch("/analyze");
|
|
|
|
| 19 |
if (!response.ok) {
|
| 20 |
throw new Error(`HTTP error! status: ${response.status}`);
|
| 21 |
}
|
|
@@ -32,6 +33,16 @@ async function getAnalysis() {
|
|
| 32 |
const pleasantConversation = analysis.pleasantConversation;
|
| 33 |
const blameOrHarassment = analysis.blameOrHarassment;
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
loader.style.display = "none";
|
| 36 |
// DOMに表示
|
| 37 |
document.getElementById(
|
|
|
|
| 16 |
loader.style.display = "block";
|
| 17 |
try {
|
| 18 |
const response = await fetch("/analyze");
|
| 19 |
+
|
| 20 |
if (!response.ok) {
|
| 21 |
throw new Error(`HTTP error! status: ${response.status}`);
|
| 22 |
}
|
|
|
|
| 33 |
const pleasantConversation = analysis.pleasantConversation;
|
| 34 |
const blameOrHarassment = analysis.blameOrHarassment;
|
| 35 |
|
| 36 |
+
if (harassmentPresent) {
|
| 37 |
+
harassmentPresent = "あり";
|
| 38 |
+
} else {
|
| 39 |
+
harassmentPresent = "なし";
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
if (harassmentType == null) {
|
| 43 |
+
harassmentType = "該当なし";
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
loader.style.display = "none";
|
| 47 |
// DOMに表示
|
| 48 |
document.getElementById(
|
static/register_record.js
CHANGED
|
@@ -1,150 +1,150 @@
|
|
| 1 |
-
let mediaRecorder;
|
| 2 |
-
let audioChunks = [];
|
| 3 |
-
let userCount = 0; // 追加されたメンバー数を保持
|
| 4 |
-
let isRecording = false; // 録音中かどうかを判定するフラグ
|
| 5 |
-
let currentRecordingButton = null; // 現在録音中のボタンを保持
|
| 6 |
-
let userNames = [];
|
| 7 |
-
|
| 8 |
-
function toggleRecording(button) {
|
| 9 |
-
button.classList.toggle("recording");
|
| 10 |
-
}
|
| 11 |
-
|
| 12 |
-
async function startRecording(button) {
|
| 13 |
-
if (isRecording && currentRecordingButton !== button) return; // 他の人が録音中なら何もしない
|
| 14 |
-
isRecording = true; // 録音中に設定
|
| 15 |
-
currentRecordingButton = button; // 録音中のボタンを記録
|
| 16 |
-
|
| 17 |
-
try {
|
| 18 |
-
const stream = await navigator.mediaDevices.getUserMedia({
|
| 19 |
-
audio: true,
|
| 20 |
-
});
|
| 21 |
-
mediaRecorder = new MediaRecorder(stream, { mimeType: "audio/webm" });
|
| 22 |
-
audioChunks = [];
|
| 23 |
-
mediaRecorder.ondataavailable = (e) => audioChunks.push(e.data);
|
| 24 |
-
mediaRecorder.onstop = () => {
|
| 25 |
-
sendAudioChunks(audioChunks, button); // ボタン情報を渡す
|
| 26 |
-
audioChunks = [];
|
| 27 |
-
isRecording = false; // 録音停止後はフラグを戻す
|
| 28 |
-
currentRecordingButton = null; // 録音ボタンを解除
|
| 29 |
-
};
|
| 30 |
-
mediaRecorder.start();
|
| 31 |
-
toggleRecording(button);
|
| 32 |
-
} catch (err) {
|
| 33 |
-
console.error("マイクアクセスに失敗しました:", err);
|
| 34 |
-
isRecording = false; // エラー発生時もフラグを戻す
|
| 35 |
-
currentRecordingButton = null;
|
| 36 |
-
}
|
| 37 |
-
}
|
| 38 |
-
|
| 39 |
-
function stopRecording(button) {
|
| 40 |
-
if (!isRecording) return; // 録音中でない場合は停止しない
|
| 41 |
-
mediaRecorder.stop();
|
| 42 |
-
toggleRecording(button);
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
function handleRecording(e) {
|
| 46 |
-
const button = e.target.closest(".record-button");
|
| 47 |
-
if (button) {
|
| 48 |
-
if (isRecording && currentRecordingButton !== button) {
|
| 49 |
-
// 他の人が録音中なら反応しない
|
| 50 |
-
return;
|
| 51 |
-
}
|
| 52 |
-
if (mediaRecorder && mediaRecorder.state === "recording") {
|
| 53 |
-
stopRecording(button);
|
| 54 |
-
} else {
|
| 55 |
-
startRecording(button);
|
| 56 |
-
}
|
| 57 |
-
}
|
| 58 |
-
}
|
| 59 |
-
|
| 60 |
-
function sendAudioChunks(chunks, button) {
|
| 61 |
-
// 引数に button を追加
|
| 62 |
-
const audioBlob = new Blob(chunks, { type: "audio/wav" });
|
| 63 |
-
const reader = new FileReader();
|
| 64 |
-
reader.onloadend = () => {
|
| 65 |
-
const base64String = reader.result.split(",")[1]; // Base64エンコードされた音声データ
|
| 66 |
-
// フォームの取得方法を変更
|
| 67 |
-
const form = button.closest(".user-item")?.querySelector("form")
|
| 68 |
-
const nameInput = form?.querySelector('input[name="name"]');
|
| 69 |
-
const name = nameInput ? nameInput.value : "unknown"; // 名前がない
|
| 70 |
-
fetch("/upload_base_audio", {
|
| 71 |
-
method: "POST",
|
| 72 |
-
headers: {
|
| 73 |
-
"Content-Type": "application/json",
|
| 74 |
-
},
|
| 75 |
-
body: JSON.stringify({ audio_data: base64String, name: name }),
|
| 76 |
-
})
|
| 77 |
-
.then((response) => response.json())
|
| 78 |
-
.then((data) => {
|
| 79 |
-
// エラー処理のみ残す
|
| 80 |
-
if (data.error) {
|
| 81 |
-
alert("エラー: " + data.error);
|
| 82 |
-
console.error(data.details);
|
| 83 |
-
}
|
| 84 |
-
// 成功時の処理(ボタンの有効化など)
|
| 85 |
-
else {
|
| 86 |
-
console.log("音声データ送信成功:", data);
|
| 87 |
-
userNames.push(name);
|
| 88 |
-
// 必要に応じて、ここでUIの変更(ボタンの有効化など)を行う
|
| 89 |
-
// 例: button.disabled = true; // 送信ボタンを無効化
|
| 90 |
-
// 例: button.classList.remove("recording"); //録音中のスタイルを解除
|
| 91 |
-
}
|
| 92 |
-
})
|
| 93 |
-
.catch((error) => {
|
| 94 |
-
console.error("エラー:", error);
|
| 95 |
-
});
|
| 96 |
-
};
|
| 97 |
-
reader.readAsDataURL(audioBlob);
|
| 98 |
-
}
|
| 99 |
-
|
| 100 |
-
//
|
| 101 |
-
function
|
| 102 |
-
window.location.href = "index";
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
// Add user function
|
| 106 |
-
function addUser() {
|
| 107 |
-
const userName = prompt("ユーザー名を入力してください");
|
| 108 |
-
if (userName) {
|
| 109 |
-
const userList = document.getElementById("people-list");
|
| 110 |
-
const userDiv = document.createElement("div");
|
| 111 |
-
userDiv.classList.add(
|
| 112 |
-
"user-item", // 追加
|
| 113 |
-
"bg-gray-700",
|
| 114 |
-
"p-4",
|
| 115 |
-
"rounded-lg",
|
| 116 |
-
"text-white",
|
| 117 |
-
"flex",
|
| 118 |
-
"justify-between",
|
| 119 |
-
"items-center",
|
| 120 |
-
"flex-wrap", // 追加
|
| 121 |
-
"gap-3" // 追加
|
| 122 |
-
);
|
| 123 |
-
userDiv.innerHTML = `
|
| 124 |
-
<form
|
| 125 |
-
action="/submit"
|
| 126 |
-
method="POST"
|
| 127 |
-
class="flex items-center space-x-2 w-full sm:w-auto"
|
| 128 |
-
onsubmit="event.preventDefault();"
|
| 129 |
-
>
|
| 130 |
-
<input
|
| 131 |
-
type="text"
|
| 132 |
-
name="name"
|
| 133 |
-
placeholder="名前を入力"
|
| 134 |
-
value="${userName}"
|
| 135 |
-
class="flex-1 px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 bg-gray-700 text-white"
|
| 136 |
-
/>
|
| 137 |
-
<button type="button" class="record-button" aria-label="音声録音開始">
|
| 138 |
-
<div class="record-icon"></div>
|
| 139 |
-
</button>
|
| 140 |
-
</form>
|
| 141 |
-
`;
|
| 142 |
-
userDiv
|
| 143 |
-
.querySelector(".record-button")
|
| 144 |
-
.addEventListener("click", handleRecording);
|
| 145 |
-
userList.appendChild(userDiv);
|
| 146 |
-
userCount++;
|
| 147 |
-
}
|
| 148 |
-
}
|
| 149 |
-
|
| 150 |
-
document.getElementById("add-btn").addEventListener("click", addUser);
|
|
|
|
| 1 |
+
let mediaRecorder;
|
| 2 |
+
let audioChunks = [];
|
| 3 |
+
let userCount = 0; // 追加されたメンバー数を保持
|
| 4 |
+
let isRecording = false; // 録音中かどうかを判定するフラグ
|
| 5 |
+
let currentRecordingButton = null; // 現在録音中のボタンを保持
|
| 6 |
+
let userNames = [];
|
| 7 |
+
|
| 8 |
+
function toggleRecording(button) {
|
| 9 |
+
button.classList.toggle("recording");
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
async function startRecording(button) {
|
| 13 |
+
if (isRecording && currentRecordingButton !== button) return; // 他の人が録音中なら何もしない
|
| 14 |
+
isRecording = true; // 録音中に設定
|
| 15 |
+
currentRecordingButton = button; // 録音中のボタンを記録
|
| 16 |
+
|
| 17 |
+
try {
|
| 18 |
+
const stream = await navigator.mediaDevices.getUserMedia({
|
| 19 |
+
audio: true,
|
| 20 |
+
});
|
| 21 |
+
mediaRecorder = new MediaRecorder(stream, { mimeType: "audio/webm" });
|
| 22 |
+
audioChunks = [];
|
| 23 |
+
mediaRecorder.ondataavailable = (e) => audioChunks.push(e.data);
|
| 24 |
+
mediaRecorder.onstop = () => {
|
| 25 |
+
sendAudioChunks(audioChunks, button); // ボタン情報を渡す
|
| 26 |
+
audioChunks = [];
|
| 27 |
+
isRecording = false; // 録音停止後はフラグを戻す
|
| 28 |
+
currentRecordingButton = null; // 録音ボタンを解除
|
| 29 |
+
};
|
| 30 |
+
mediaRecorder.start();
|
| 31 |
+
toggleRecording(button);
|
| 32 |
+
} catch (err) {
|
| 33 |
+
console.error("マイクアクセスに失敗しました:", err);
|
| 34 |
+
isRecording = false; // エラー発生時もフラグを戻す
|
| 35 |
+
currentRecordingButton = null;
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
function stopRecording(button) {
|
| 40 |
+
if (!isRecording) return; // 録音中でない場合は停止しない
|
| 41 |
+
mediaRecorder.stop();
|
| 42 |
+
toggleRecording(button);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
function handleRecording(e) {
|
| 46 |
+
const button = e.target.closest(".record-button");
|
| 47 |
+
if (button) {
|
| 48 |
+
if (isRecording && currentRecordingButton !== button) {
|
| 49 |
+
// 他の人が録音中なら反応しない
|
| 50 |
+
return;
|
| 51 |
+
}
|
| 52 |
+
if (mediaRecorder && mediaRecorder.state === "recording") {
|
| 53 |
+
stopRecording(button);
|
| 54 |
+
} else {
|
| 55 |
+
startRecording(button);
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
function sendAudioChunks(chunks, button) {
|
| 61 |
+
// 引数に button を追加
|
| 62 |
+
const audioBlob = new Blob(chunks, { type: "audio/wav" });
|
| 63 |
+
const reader = new FileReader();
|
| 64 |
+
reader.onloadend = () => {
|
| 65 |
+
const base64String = reader.result.split(",")[1]; // Base64エンコードされた音声データ
|
| 66 |
+
// フォームの取得方法を変更
|
| 67 |
+
const form = button.closest(".user-item")?.querySelector("form")
|
| 68 |
+
const nameInput = form?.querySelector('input[name="name"]');
|
| 69 |
+
const name = nameInput ? nameInput.value : "unknown"; // 名前がない
|
| 70 |
+
fetch("/upload_base_audio", {
|
| 71 |
+
method: "POST",
|
| 72 |
+
headers: {
|
| 73 |
+
"Content-Type": "application/json",
|
| 74 |
+
},
|
| 75 |
+
body: JSON.stringify({ audio_data: base64String, name: name }),
|
| 76 |
+
})
|
| 77 |
+
.then((response) => response.json())
|
| 78 |
+
.then((data) => {
|
| 79 |
+
// エラー処理のみ残す
|
| 80 |
+
if (data.error) {
|
| 81 |
+
alert("エラー: " + data.error);
|
| 82 |
+
console.error(data.details);
|
| 83 |
+
}
|
| 84 |
+
// 成功時の処理(ボタンの有効化など)
|
| 85 |
+
else {
|
| 86 |
+
console.log("音声データ送信成功:", data);
|
| 87 |
+
userNames.push(name);
|
| 88 |
+
// 必要に応じて、ここでUIの変更(ボタンの有効化など)を行う
|
| 89 |
+
// 例: button.disabled = true; // 送信ボタンを無効化
|
| 90 |
+
// 例: button.classList.remove("recording"); //録音中のスタイルを解除
|
| 91 |
+
}
|
| 92 |
+
})
|
| 93 |
+
.catch((error) => {
|
| 94 |
+
console.error("エラー:", error);
|
| 95 |
+
});
|
| 96 |
+
};
|
| 97 |
+
reader.readAsDataURL(audioBlob);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
// 録音画面に移動
|
| 101 |
+
function showRecorder() {
|
| 102 |
+
window.location.href = "index";
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
// Add user function
|
| 106 |
+
function addUser() {
|
| 107 |
+
const userName = prompt("ユーザー名を入力してください");
|
| 108 |
+
if (userName) {
|
| 109 |
+
const userList = document.getElementById("people-list");
|
| 110 |
+
const userDiv = document.createElement("div");
|
| 111 |
+
userDiv.classList.add(
|
| 112 |
+
"user-item", // 追加
|
| 113 |
+
"bg-gray-700",
|
| 114 |
+
"p-4",
|
| 115 |
+
"rounded-lg",
|
| 116 |
+
"text-white",
|
| 117 |
+
"flex",
|
| 118 |
+
"justify-between",
|
| 119 |
+
"items-center",
|
| 120 |
+
"flex-wrap", // 追加
|
| 121 |
+
"gap-3" // 追加
|
| 122 |
+
);
|
| 123 |
+
userDiv.innerHTML = `
|
| 124 |
+
<form
|
| 125 |
+
action="/submit"
|
| 126 |
+
method="POST"
|
| 127 |
+
class="flex items-center space-x-2 w-full sm:w-auto"
|
| 128 |
+
onsubmit="event.preventDefault();"
|
| 129 |
+
>
|
| 130 |
+
<input
|
| 131 |
+
type="text"
|
| 132 |
+
name="name"
|
| 133 |
+
placeholder="名前を入力"
|
| 134 |
+
value="${userName}"
|
| 135 |
+
class="flex-1 px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 bg-gray-700 text-white"
|
| 136 |
+
/>
|
| 137 |
+
<button type="button" class="record-button" aria-label="音声録音開始">
|
| 138 |
+
<div class="record-icon"></div>
|
| 139 |
+
</button>
|
| 140 |
+
</form>
|
| 141 |
+
`;
|
| 142 |
+
userDiv
|
| 143 |
+
.querySelector(".record-button")
|
| 144 |
+
.addEventListener("click", handleRecording);
|
| 145 |
+
userList.appendChild(userDiv);
|
| 146 |
+
userCount++;
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
document.getElementById("add-btn").addEventListener("click", addUser);
|
templates/feedback.html
CHANGED
|
@@ -1,170 +1,174 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="ja" class="dark">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
-
<title>会話フィードバック画面</title>
|
| 7 |
-
<
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
background-color
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
<div class="
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
<
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
<div class="text-
|
| 162 |
-
<div class="text-lg mb-2" id="
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ja" class="dark">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>会話フィードバック画面</title>
|
| 7 |
+
<link
|
| 8 |
+
rel="stylesheet"
|
| 9 |
+
href="{{ url_for('static', filename='loading.css') }}"
|
| 10 |
+
/>
|
| 11 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 12 |
+
<script>
|
| 13 |
+
tailwind.config = {
|
| 14 |
+
darkMode: "class",
|
| 15 |
+
};
|
| 16 |
+
</script>
|
| 17 |
+
<script src="https://use.fontawesome.com/releases/v5.10.0/js/all.js"></script>
|
| 18 |
+
<style>
|
| 19 |
+
/* Main Container */
|
| 20 |
+
body {
|
| 21 |
+
background: linear-gradient(135deg, #2c3e50, #1f2937);
|
| 22 |
+
display: flex;
|
| 23 |
+
align-items: center;
|
| 24 |
+
justify-content: center;
|
| 25 |
+
min-height: 100vh;
|
| 26 |
+
font-family: "Arial", sans-serif;
|
| 27 |
+
color: #fff;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
/* Main Content Wrapper */
|
| 31 |
+
.main-content {
|
| 32 |
+
border: 5px solid rgba(255, 255, 255, 0.2);
|
| 33 |
+
padding: 2rem;
|
| 34 |
+
border-radius: 1rem;
|
| 35 |
+
width: 90%;
|
| 36 |
+
max-width: 500px;
|
| 37 |
+
background-color: rgba(0, 0, 0, 0.3);
|
| 38 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
|
| 39 |
+
text-align: center;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
/* Title */
|
| 43 |
+
.main-title {
|
| 44 |
+
font-size: 2.5rem;
|
| 45 |
+
font-weight: bold;
|
| 46 |
+
margin-bottom: 1.5rem;
|
| 47 |
+
color: #fff;
|
| 48 |
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
/* Hamburger Menu Button */
|
| 52 |
+
#menuButton {
|
| 53 |
+
background-color: rgba(255, 255, 255, 0.1);
|
| 54 |
+
border: none;
|
| 55 |
+
border-radius: 50%;
|
| 56 |
+
padding: 0.5rem;
|
| 57 |
+
cursor: pointer;
|
| 58 |
+
transition: background-color 0.2s ease;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
#menuButton:hover {
|
| 62 |
+
background-color: rgba(255, 255, 255, 0.2);
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
/* Hamburger Menu Styles */
|
| 66 |
+
#menu {
|
| 67 |
+
position: absolute;
|
| 68 |
+
top: 0;
|
| 69 |
+
left: 0;
|
| 70 |
+
z-index: 10;
|
| 71 |
+
transform: translateX(-100%);
|
| 72 |
+
visibility: hidden;
|
| 73 |
+
opacity: 0;
|
| 74 |
+
background-color: rgb(31, 41, 55);
|
| 75 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0.3s,
|
| 76 |
+
opacity 0.3s ease-in-out;
|
| 77 |
+
backdrop-filter: blur(10px);
|
| 78 |
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
#menu.open {
|
| 82 |
+
transform: translateX(0);
|
| 83 |
+
visibility: visible;
|
| 84 |
+
opacity: 1;
|
| 85 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0s,
|
| 86 |
+
opacity 0.3s ease-in-out;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
#menu button {
|
| 90 |
+
transition: background-color 0.2s ease;
|
| 91 |
+
background-color: rgba(0, 0, 0, 0.1);
|
| 92 |
+
margin: 2px;
|
| 93 |
+
border-radius: 5px;
|
| 94 |
+
display: flex;
|
| 95 |
+
align-items: center;
|
| 96 |
+
justify-content: flex-start;
|
| 97 |
+
gap: 10px;
|
| 98 |
+
padding: 0.75rem 1rem;
|
| 99 |
+
width: 100%;
|
| 100 |
+
text-align: left;
|
| 101 |
+
border: none;
|
| 102 |
+
color: #fff;
|
| 103 |
+
font-size: 1rem;
|
| 104 |
+
cursor: pointer;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
#menu button:hover {
|
| 108 |
+
background-color: rgba(55, 65, 81, 0.7);
|
| 109 |
+
}
|
| 110 |
+
</style>
|
| 111 |
+
</head>
|
| 112 |
+
<body>
|
| 113 |
+
<div class="loader" id="loader">
|
| 114 |
+
<div class="one"></div>
|
| 115 |
+
<div class="two"></div>
|
| 116 |
+
<div class="three"></div>
|
| 117 |
+
<div class="four"></div>
|
| 118 |
+
</div>
|
| 119 |
+
<div class="main-content relative">
|
| 120 |
+
<!-- Title -->
|
| 121 |
+
<div class="main-title">会話フィードバック</div>
|
| 122 |
+
|
| 123 |
+
<!-- Hamburger Menu -->
|
| 124 |
+
<div class="absolute top-4 left-4">
|
| 125 |
+
<button
|
| 126 |
+
id="menuButton"
|
| 127 |
+
class="text-white text-2xl focus:outline-none"
|
| 128 |
+
onclick="toggleMenu(event)"
|
| 129 |
+
>
|
| 130 |
+
<i class="fas fa-bars"></i>
|
| 131 |
+
</button>
|
| 132 |
+
|
| 133 |
+
<!-- Menu Content -->
|
| 134 |
+
<div
|
| 135 |
+
id="menu"
|
| 136 |
+
class="absolute top-0 left-0 h-full w-64 bg-gray-800 text-white transform -translate-x-full transition-transform duration-300 ease-in-out opacity-0 visibility-hidden"
|
| 137 |
+
>
|
| 138 |
+
<div class="px-4 py-2 text-lg font-semibold">メニュー</div>
|
| 139 |
+
<button onclick="showUserRegister()">
|
| 140 |
+
<i class="fas fa-user-plus"></i> メンバーを追加
|
| 141 |
+
</button>
|
| 142 |
+
<button onclick="showRecorder()">
|
| 143 |
+
<i class="fas fa-microphone"></i> 録音画面を表示
|
| 144 |
+
</button>
|
| 145 |
+
<button onclick="showResults()">
|
| 146 |
+
<i class="fas fa-chart-bar"></i> フィードバックを表示
|
| 147 |
+
</button>
|
| 148 |
+
<button onclick="showTalkDetail()">
|
| 149 |
+
<i class="fas fa-comments"></i> 会話詳細を表���
|
| 150 |
+
</button>
|
| 151 |
+
<button onclick="resetAction()">
|
| 152 |
+
<i class="fas fa-redo"></i> リセット
|
| 153 |
+
</button>
|
| 154 |
+
<button onclick="toggleMenu(event)">
|
| 155 |
+
<i class="fas fa-times"></i> 閉じる
|
| 156 |
+
</button>
|
| 157 |
+
</div>
|
| 158 |
+
</div>
|
| 159 |
+
|
| 160 |
+
<!-- Feedback Details -->
|
| 161 |
+
<div class="text-xl font-semibold mb-6" id="level">会話レベル:</div>
|
| 162 |
+
<div class="text-lg mb-2" id="Harassment_bool">ハラスメントの有無:</div>
|
| 163 |
+
<div class="text-lg mb-2" id="Harassment_type">ハラスメントの種類:</div>
|
| 164 |
+
<div class="text-lg mb-2" id="Harassment_loop">繰り返しの程度:</div>
|
| 165 |
+
<div class="text-lg mb-2" id="Harassment_comfort">会話の心地よさ:</div>
|
| 166 |
+
<div class="text-lg mb-2" id="Harassment_volume">
|
| 167 |
+
非難またはハラスメントの程度:
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<script src="{{ url_for('static', filename='menu.js') }}"></script>
|
| 172 |
+
<script src="{{ url_for('static', filename='feedback.js') }}"></script>
|
| 173 |
+
</body>
|
| 174 |
+
</html>
|
templates/talkDetail.html
CHANGED
|
@@ -1,49 +1,151 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="ja" class="dark">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
-
<title>会話詳細画面</title>
|
| 7 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
-
<
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ja" class="dark">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>会話詳細画面</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://use.fontawesome.com/releases/v5.10.0/js/all.js"></script>
|
| 9 |
+
<link
|
| 10 |
+
rel="stylesheet"
|
| 11 |
+
href="{{ url_for('static', filename='loading.css') }}"
|
| 12 |
+
/>
|
| 13 |
+
<style>
|
| 14 |
+
.main-content {
|
| 15 |
+
border: 5px solid rgba(255, 255, 255, 0.2);
|
| 16 |
+
border-radius: 1rem;
|
| 17 |
+
margin: 1rem; /* 外側の余白 */
|
| 18 |
+
width: 90%;
|
| 19 |
+
max-width: 500px;
|
| 20 |
+
/*width: 100%; */ /* 枠線全体を広げる */
|
| 21 |
+
/*max-width: 90%;*/ /* 最大幅を画面の90%に設定 */
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
/* Hamburger Menu Button */
|
| 25 |
+
#menuButton {
|
| 26 |
+
background-color: rgba(255, 255, 255, 0.1);
|
| 27 |
+
border: none;
|
| 28 |
+
border-radius: 50%;
|
| 29 |
+
padding: 0.5rem;
|
| 30 |
+
cursor: pointer;
|
| 31 |
+
transition: background-color 0.2s ease;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
#menuButton:hover {
|
| 35 |
+
background-color: rgba(255, 255, 255, 0.2);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
/* Hamburger Menu Styles */
|
| 39 |
+
#menu {
|
| 40 |
+
position: absolute;
|
| 41 |
+
top: 0;
|
| 42 |
+
left: 0;
|
| 43 |
+
z-index: 10;
|
| 44 |
+
transform: translateX(-100%);
|
| 45 |
+
visibility: hidden;
|
| 46 |
+
opacity: 0;
|
| 47 |
+
background-color: rgb(31, 41, 55);
|
| 48 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0.3s,
|
| 49 |
+
opacity 0.3s ease-in-out;
|
| 50 |
+
backdrop-filter: blur(10px);
|
| 51 |
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
#menu.open {
|
| 55 |
+
transform: translateX(0);
|
| 56 |
+
visibility: visible;
|
| 57 |
+
opacity: 1;
|
| 58 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0s,
|
| 59 |
+
opacity 0.3s ease-in-out;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
#menu button {
|
| 63 |
+
transition: background-color 0.2s ease;
|
| 64 |
+
background-color: rgba(0, 0, 0, 0.1);
|
| 65 |
+
margin: 2px;
|
| 66 |
+
border-radius: 5px;
|
| 67 |
+
display: flex;
|
| 68 |
+
align-items: center;
|
| 69 |
+
justify-content: flex-start;
|
| 70 |
+
gap: 10px;
|
| 71 |
+
padding: 0.75rem 1rem;
|
| 72 |
+
width: 100%;
|
| 73 |
+
text-align: left;
|
| 74 |
+
border: none;
|
| 75 |
+
color: #fff;
|
| 76 |
+
font-size: 1rem;
|
| 77 |
+
cursor: pointer;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
#menu button:hover {
|
| 81 |
+
background-color: rgba(55, 65, 81, 0.7);
|
| 82 |
+
}
|
| 83 |
+
</style>
|
| 84 |
+
</head>
|
| 85 |
+
<body
|
| 86 |
+
class="bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-gray-100 min-h-screen flex items-center justify-center"
|
| 87 |
+
>
|
| 88 |
+
<div class="main-content relative">
|
| 89 |
+
<div class="loader" id="loader">
|
| 90 |
+
<div class="one"></div>
|
| 91 |
+
<div class="two"></div>
|
| 92 |
+
<div class="three"></div>
|
| 93 |
+
<div class="four"></div>
|
| 94 |
+
</div>
|
| 95 |
+
<div
|
| 96 |
+
class="container mx-auto p-6 bg-white dark:bg-gray-800 shadow-lg rounded-2xl w-full max-w-none"
|
| 97 |
+
>
|
| 98 |
+
<h2 class="text-2xl font-semibold mb-4 text-center">
|
| 99 |
+
会話の文字起こし表示
|
| 100 |
+
</h2>
|
| 101 |
+
|
| 102 |
+
<!-- Hamburger Menu -->
|
| 103 |
+
<div class="absolute top-4 left-4">
|
| 104 |
+
<button
|
| 105 |
+
id="menuButton"
|
| 106 |
+
class="text-white text-2xl focus:outline-none"
|
| 107 |
+
onclick="toggleMenu(event)"
|
| 108 |
+
>
|
| 109 |
+
<i class="fas fa-bars"></i>
|
| 110 |
+
</button>
|
| 111 |
+
|
| 112 |
+
<!-- Menu Content -->
|
| 113 |
+
<div
|
| 114 |
+
id="menu"
|
| 115 |
+
class="absolute top-0 left-0 h-full w-64 bg-gray-800 text-white transform -translate-x-full transition-transform duration-300 ease-in-out opacity-0 visibility-hidden"
|
| 116 |
+
>
|
| 117 |
+
<div class="px-4 py-2 text-lg font-semibold">メニュー</div>
|
| 118 |
+
<button onclick="showUserRegister()">
|
| 119 |
+
<i class="fas fa-user-plus"></i> メンバーを追加
|
| 120 |
+
</button>
|
| 121 |
+
<button onclick="showRecorder()">
|
| 122 |
+
<i class="fas fa-microphone"></i> 録音画面を表示
|
| 123 |
+
</button>
|
| 124 |
+
<button onclick="showResults()">
|
| 125 |
+
<i class="fas fa-chart-bar"></i> フィードバックを表示
|
| 126 |
+
</button>
|
| 127 |
+
<button onclick="showTalkDetail()">
|
| 128 |
+
<i class="fas fa-comments"></i> 会話詳細を表示
|
| 129 |
+
</button>
|
| 130 |
+
<button onclick="resetAction()">
|
| 131 |
+
<i class="fas fa-redo"></i> リセット
|
| 132 |
+
</button>
|
| 133 |
+
<button onclick="toggleMenu(event)">
|
| 134 |
+
<i class="fas fa-times"></i> 閉じる
|
| 135 |
+
</button>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
<!-- Hamburger Menu End -->
|
| 139 |
+
|
| 140 |
+
<div
|
| 141 |
+
id="transcription"
|
| 142 |
+
class="p-4 bg-gray-200 dark:bg-gray-700 rounded-lg mb-4 max-h-96 overflow-y-auto"
|
| 143 |
+
>
|
| 144 |
+
ここに会話内容が表示されます。
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
<script src="{{ url_for('static', filename='talk_detail.js') }}"></script>
|
| 148 |
+
<script src="{{ url_for('static', filename='menu.js') }}"></script>
|
| 149 |
+
</div>
|
| 150 |
+
</body>
|
| 151 |
+
</html>
|
templates/userRegister.html
CHANGED
|
@@ -1,151 +1,151 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="ja">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8" />
|
| 5 |
-
<title>ユーザー音声登録</title>
|
| 6 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 7 |
-
<script src="https://use.fontawesome.com/releases/v5.10.0/js/all.js"></script>
|
| 8 |
-
<style>
|
| 9 |
-
@keyframes pulse-scale {
|
| 10 |
-
0%,
|
| 11 |
-
100% {
|
| 12 |
-
transform: scale(1);
|
| 13 |
-
}
|
| 14 |
-
50% {
|
| 15 |
-
transform: scale(1.1);
|
| 16 |
-
}
|
| 17 |
-
}
|
| 18 |
-
.animate-pulse-scale {
|
| 19 |
-
animation: pulse-scale 1s infinite;
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
/* Record Button Styles */
|
| 23 |
-
.record-button {
|
| 24 |
-
width: 50px;
|
| 25 |
-
height: 50px;
|
| 26 |
-
background-color: transparent;
|
| 27 |
-
border-radius: 50%;
|
| 28 |
-
border: 2px solid white;
|
| 29 |
-
display: flex;
|
| 30 |
-
justify-content: center;
|
| 31 |
-
align-items: center;
|
| 32 |
-
cursor: pointer;
|
| 33 |
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
|
| 34 |
-
transition: all 0.3s ease;
|
| 35 |
-
}
|
| 36 |
-
.record-icon {
|
| 37 |
-
width: 35px;
|
| 38 |
-
height: 35px;
|
| 39 |
-
background-color: #d32f2f;
|
| 40 |
-
border-radius: 50%;
|
| 41 |
-
transition: all 0.3s ease;
|
| 42 |
-
}
|
| 43 |
-
.record-button.recording .record-icon {
|
| 44 |
-
background-color: #f44336; /* 録音中は赤色 */
|
| 45 |
-
border-radius: 4px; /* 録音時に赤い部分だけ四角にする */
|
| 46 |
-
}
|
| 47 |
-
.recording .record-icon {
|
| 48 |
-
width: 20px;
|
| 49 |
-
height: 20px;
|
| 50 |
-
border-radius: 50%;
|
| 51 |
-
}
|
| 52 |
-
|
| 53 |
-
/* Main Container */
|
| 54 |
-
body {
|
| 55 |
-
background: linear-gradient(135deg, #2c3e50, #1f2937);
|
| 56 |
-
display: flex;
|
| 57 |
-
align-items: center;
|
| 58 |
-
justify-content: center;
|
| 59 |
-
min-height: 100vh;
|
| 60 |
-
font-family: "Arial", sans-serif;
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
/* Main Content Wrapper */
|
| 64 |
-
.main-content {
|
| 65 |
-
border: 5px solid rgba(255, 255, 255, 0.2);
|
| 66 |
-
padding: 2rem;
|
| 67 |
-
border-radius: 1rem;
|
| 68 |
-
width: 90%;
|
| 69 |
-
max-width: 500px;
|
| 70 |
-
background-color: rgba(0, 0, 0, 0.3);
|
| 71 |
-
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
|
| 72 |
-
text-align: center;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
/* Title */
|
| 76 |
-
.main-title {
|
| 77 |
-
font-size: 2.5rem;
|
| 78 |
-
font-weight: bold;
|
| 79 |
-
margin-bottom: 1.5rem;
|
| 80 |
-
color: #fff;
|
| 81 |
-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
| 82 |
-
}
|
| 83 |
-
|
| 84 |
-
/* Buttons */
|
| 85 |
-
.action-button {
|
| 86 |
-
margin-top: 1rem;
|
| 87 |
-
padding: 0.75rem 1.5rem;
|
| 88 |
-
border-radius: 0.5rem;
|
| 89 |
-
cursor: pointer;
|
| 90 |
-
transition: background-color 0.2s ease;
|
| 91 |
-
width: 100%;
|
| 92 |
-
}
|
| 93 |
-
|
| 94 |
-
.action-button:hover {
|
| 95 |
-
background-color: rgba(55, 65, 81, 0.7);
|
| 96 |
-
}
|
| 97 |
-
|
| 98 |
-
.back-button {
|
| 99 |
-
background-color: #607d8b; /* 落ち着いたグレー */
|
| 100 |
-
color: white;
|
| 101 |
-
}
|
| 102 |
-
|
| 103 |
-
.add-button {
|
| 104 |
-
background-color: #4caf50; /* 落ち着いた緑色 */
|
| 105 |
-
color: white;
|
| 106 |
-
}
|
| 107 |
-
|
| 108 |
-
/* Disabled State */
|
| 109 |
-
.disabled {
|
| 110 |
-
opacity: 0.5;
|
| 111 |
-
pointer-events: none;
|
| 112 |
-
}
|
| 113 |
-
|
| 114 |
-
/* Responsive Design */
|
| 115 |
-
@media (max-width: 640px) {
|
| 116 |
-
.main-content {
|
| 117 |
-
padding: 1.5rem;
|
| 118 |
-
}
|
| 119 |
-
}
|
| 120 |
-
</style>
|
| 121 |
-
</head>
|
| 122 |
-
<body>
|
| 123 |
-
<!-- Main Content Wrapper -->
|
| 124 |
-
<div class="main-content relative">
|
| 125 |
-
<!-- Title -->
|
| 126 |
-
<div class="main-title">ユーザー音声登録</div>
|
| 127 |
-
|
| 128 |
-
<!-- User List -->
|
| 129 |
-
<div id="people-list" class="space-y-4"></div>
|
| 130 |
-
|
| 131 |
-
<!-- Add Button -->
|
| 132 |
-
<button id="add-btn" class="action-button add-button">
|
| 133 |
-
<i class="fas fa-user-plus"></i> メンバーを追加
|
| 134 |
-
</button>
|
| 135 |
-
|
| 136 |
-
<!-- Back Button -->
|
| 137 |
-
<button
|
| 138 |
-
id="backButton"
|
| 139 |
-
onclick="
|
| 140 |
-
class="action-button back-button"
|
| 141 |
-
>
|
| 142 |
-
|
| 143 |
-
</button>
|
| 144 |
-
</div>
|
| 145 |
-
|
| 146 |
-
<script src="{{ url_for('static', filename='register_record.js') }}"></script>
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
</body>
|
| 151 |
-
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ja">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<title>ユーザー音声登録</title>
|
| 6 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 7 |
+
<script src="https://use.fontawesome.com/releases/v5.10.0/js/all.js"></script>
|
| 8 |
+
<style>
|
| 9 |
+
@keyframes pulse-scale {
|
| 10 |
+
0%,
|
| 11 |
+
100% {
|
| 12 |
+
transform: scale(1);
|
| 13 |
+
}
|
| 14 |
+
50% {
|
| 15 |
+
transform: scale(1.1);
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
.animate-pulse-scale {
|
| 19 |
+
animation: pulse-scale 1s infinite;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
/* Record Button Styles */
|
| 23 |
+
.record-button {
|
| 24 |
+
width: 50px;
|
| 25 |
+
height: 50px;
|
| 26 |
+
background-color: transparent;
|
| 27 |
+
border-radius: 50%;
|
| 28 |
+
border: 2px solid white;
|
| 29 |
+
display: flex;
|
| 30 |
+
justify-content: center;
|
| 31 |
+
align-items: center;
|
| 32 |
+
cursor: pointer;
|
| 33 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
|
| 34 |
+
transition: all 0.3s ease;
|
| 35 |
+
}
|
| 36 |
+
.record-icon {
|
| 37 |
+
width: 35px;
|
| 38 |
+
height: 35px;
|
| 39 |
+
background-color: #d32f2f;
|
| 40 |
+
border-radius: 50%;
|
| 41 |
+
transition: all 0.3s ease;
|
| 42 |
+
}
|
| 43 |
+
.record-button.recording .record-icon {
|
| 44 |
+
background-color: #f44336; /* 録音中は赤色 */
|
| 45 |
+
border-radius: 4px; /* 録音時に赤い部分だけ四角にする */
|
| 46 |
+
}
|
| 47 |
+
.recording .record-icon {
|
| 48 |
+
width: 20px;
|
| 49 |
+
height: 20px;
|
| 50 |
+
border-radius: 50%;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
/* Main Container */
|
| 54 |
+
body {
|
| 55 |
+
background: linear-gradient(135deg, #2c3e50, #1f2937);
|
| 56 |
+
display: flex;
|
| 57 |
+
align-items: center;
|
| 58 |
+
justify-content: center;
|
| 59 |
+
min-height: 100vh;
|
| 60 |
+
font-family: "Arial", sans-serif;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
/* Main Content Wrapper */
|
| 64 |
+
.main-content {
|
| 65 |
+
border: 5px solid rgba(255, 255, 255, 0.2);
|
| 66 |
+
padding: 2rem;
|
| 67 |
+
border-radius: 1rem;
|
| 68 |
+
width: 90%;
|
| 69 |
+
max-width: 500px;
|
| 70 |
+
background-color: rgba(0, 0, 0, 0.3);
|
| 71 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
|
| 72 |
+
text-align: center;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
/* Title */
|
| 76 |
+
.main-title {
|
| 77 |
+
font-size: 2.5rem;
|
| 78 |
+
font-weight: bold;
|
| 79 |
+
margin-bottom: 1.5rem;
|
| 80 |
+
color: #fff;
|
| 81 |
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
/* Buttons */
|
| 85 |
+
.action-button {
|
| 86 |
+
margin-top: 1rem;
|
| 87 |
+
padding: 0.75rem 1.5rem;
|
| 88 |
+
border-radius: 0.5rem;
|
| 89 |
+
cursor: pointer;
|
| 90 |
+
transition: background-color 0.2s ease;
|
| 91 |
+
width: 100%;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.action-button:hover {
|
| 95 |
+
background-color: rgba(55, 65, 81, 0.7);
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.back-button {
|
| 99 |
+
background-color: #607d8b; /* 落ち着いたグレー */
|
| 100 |
+
color: white;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.add-button {
|
| 104 |
+
background-color: #4caf50; /* 落ち着いた緑色 */
|
| 105 |
+
color: white;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
/* Disabled State */
|
| 109 |
+
.disabled {
|
| 110 |
+
opacity: 0.5;
|
| 111 |
+
pointer-events: none;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
/* Responsive Design */
|
| 115 |
+
@media (max-width: 640px) {
|
| 116 |
+
.main-content {
|
| 117 |
+
padding: 1.5rem;
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
</style>
|
| 121 |
+
</head>
|
| 122 |
+
<body>
|
| 123 |
+
<!-- Main Content Wrapper -->
|
| 124 |
+
<div class="main-content relative">
|
| 125 |
+
<!-- Title -->
|
| 126 |
+
<div class="main-title">ユーザー音声登録</div>
|
| 127 |
+
|
| 128 |
+
<!-- User List -->
|
| 129 |
+
<div id="people-list" class="space-y-4"></div>
|
| 130 |
+
|
| 131 |
+
<!-- Add Button -->
|
| 132 |
+
<button id="add-btn" class="action-button add-button">
|
| 133 |
+
<i class="fas fa-user-plus"></i> メンバーを追加
|
| 134 |
+
</button>
|
| 135 |
+
|
| 136 |
+
<!-- 録音画面へ移動ボタン(Back Buttonから変更) -->
|
| 137 |
+
<button
|
| 138 |
+
id="backButton"
|
| 139 |
+
onclick="showRecorder()"
|
| 140 |
+
class="action-button back-button"
|
| 141 |
+
>
|
| 142 |
+
<i class="fas fa-microphone"></i> 録音画面を表示
|
| 143 |
+
</button>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<script src="{{ url_for('static', filename='register_record.js') }}"></script>
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
</body>
|
| 151 |
+
</html>
|