Add 3 files
Browse files- README.md +7 -5
- index.html +822 -19
- prompts.txt +3 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: aron-2
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,822 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Aron - Your AI Productivity Assistant</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
|
| 11 |
+
|
| 12 |
+
body {
|
| 13 |
+
font-family: 'Roboto', sans-serif;
|
| 14 |
+
background-color: #0a0a0a;
|
| 15 |
+
color: #00ff9d;
|
| 16 |
+
height: 100vh;
|
| 17 |
+
overflow: hidden;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
.terminal-text {
|
| 21 |
+
color: #00ff9d;
|
| 22 |
+
text-shadow: 0 0 5px rgba(0, 255, 157, 0.3);
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.pulse {
|
| 26 |
+
animation: pulse 2s infinite;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
@keyframes pulse {
|
| 30 |
+
0% { opacity: 0.7; }
|
| 31 |
+
50% { opacity: 1; }
|
| 32 |
+
100% { opacity: 0.7; }
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.message-bubble {
|
| 36 |
+
max-width: 80%;
|
| 37 |
+
border-radius: 18px;
|
| 38 |
+
padding: 12px 16px;
|
| 39 |
+
margin-bottom: 12px;
|
| 40 |
+
position: relative;
|
| 41 |
+
animation: fadeIn 0.3s ease-out;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
@keyframes fadeIn {
|
| 45 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 46 |
+
to { opacity: 1; transform: translateY(0); }
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.user-message {
|
| 50 |
+
background-color: #1a2e1a;
|
| 51 |
+
align-self: flex-end;
|
| 52 |
+
border-bottom-right-radius: 4px;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.aron-message {
|
| 56 |
+
background-color: #0d1a0d;
|
| 57 |
+
align-self: flex-start;
|
| 58 |
+
border-bottom-left-radius: 4px;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.typing-indicator span {
|
| 62 |
+
display: inline-block;
|
| 63 |
+
width: 8px;
|
| 64 |
+
height: 8px;
|
| 65 |
+
border-radius: 50%;
|
| 66 |
+
background-color: #00ff9d;
|
| 67 |
+
margin-right: 4px;
|
| 68 |
+
animation: bounce 1.5s infinite ease-in-out;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.typing-indicator span:nth-child(2) {
|
| 72 |
+
animation-delay: 0.2s;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.typing-indicator span:nth-child(3) {
|
| 76 |
+
animation-delay: 0.4s;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
@keyframes bounce {
|
| 80 |
+
0%, 100% { transform: translateY(0); }
|
| 81 |
+
50% { transform: translateY(-5px); }
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.glow-border {
|
| 85 |
+
border: 1px solid #00ff9d;
|
| 86 |
+
box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.task-item {
|
| 90 |
+
border-left: 3px solid #00ff9d;
|
| 91 |
+
transition: all 0.3s ease;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.task-item:hover {
|
| 95 |
+
background-color: #0d1a0d;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
/* Custom scrollbar */
|
| 99 |
+
::-webkit-scrollbar {
|
| 100 |
+
width: 6px;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
::-webkit-scrollbar-track {
|
| 104 |
+
background: #000;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
::-webkit-scrollbar-thumb {
|
| 108 |
+
background: #00ff9d;
|
| 109 |
+
border-radius: 3px;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.status-indicator {
|
| 113 |
+
width: 10px;
|
| 114 |
+
height: 10px;
|
| 115 |
+
border-radius: 50%;
|
| 116 |
+
display: inline-block;
|
| 117 |
+
margin-right: 6px;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.status-listening {
|
| 121 |
+
background-color: #00ff9d;
|
| 122 |
+
box-shadow: 0 0 5px #00ff9d;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.status-waiting {
|
| 126 |
+
background-color: #ff9900;
|
| 127 |
+
box-shadow: 0 0 5px #ff9900;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.status-off {
|
| 131 |
+
background-color: #ff3333;
|
| 132 |
+
box-shadow: 0 0 5px #ff3333;
|
| 133 |
+
}
|
| 134 |
+
</style>
|
| 135 |
+
</head>
|
| 136 |
+
<body class="flex flex-col h-screen">
|
| 137 |
+
<!-- Header -->
|
| 138 |
+
<header class="bg-black p-4 border-b border-green-500 flex justify-between items-center">
|
| 139 |
+
<div class="flex items-center">
|
| 140 |
+
<div class="w-10 h-10 rounded-full bg-green-900 flex items-center justify-center mr-3">
|
| 141 |
+
<i class="fas fa-robot text-green-400 text-xl"></i>
|
| 142 |
+
</div>
|
| 143 |
+
<div>
|
| 144 |
+
<h1 class="text-green-400 font-bold text-xl">Aron</h1>
|
| 145 |
+
<p class="text-green-600 text-xs flex items-center">
|
| 146 |
+
<span id="statusIndicator" class="status-indicator status-off"></span>
|
| 147 |
+
<span id="statusText">Offline</span>
|
| 148 |
+
</p>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
<div class="flex items-center space-x-3">
|
| 152 |
+
<button id="voiceBtn" class="w-10 h-10 rounded-full bg-green-900 flex items-center justify-center">
|
| 153 |
+
<i class="fas fa-microphone text-green-400"></i>
|
| 154 |
+
</button>
|
| 155 |
+
<button id="settingsBtn" class="w-10 h-10 rounded-full bg-green-900 flex items-center justify-center">
|
| 156 |
+
<i class="fas fa-cog text-green-400"></i>
|
| 157 |
+
</button>
|
| 158 |
+
</div>
|
| 159 |
+
</header>
|
| 160 |
+
|
| 161 |
+
<!-- Main Content -->
|
| 162 |
+
<main class="flex-1 overflow-hidden flex flex-col">
|
| 163 |
+
<!-- Chat Area -->
|
| 164 |
+
<div id="chatArea" class="flex-1 overflow-y-auto p-4 space-y-3">
|
| 165 |
+
<!-- Initial greeting -->
|
| 166 |
+
<div class="message-bubble aron-message">
|
| 167 |
+
<p class="terminal-text">Hello! I'm Aron, your AI productivity assistant. Say "Hey Aron" or tap the mic button to get started.</p>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<!-- Task List (hidden by default) -->
|
| 172 |
+
<div id="taskList" class="hidden flex-1 overflow-y-auto p-4">
|
| 173 |
+
<div class="flex justify-between items-center mb-4">
|
| 174 |
+
<h2 class="text-xl font-bold text-green-400">Your Tasks</h2>
|
| 175 |
+
<button id="addTaskBtn" class="bg-green-900 text-green-400 px-3 py-1 rounded-lg flex items-center">
|
| 176 |
+
<i class="fas fa-plus mr-1"></i> Add Task
|
| 177 |
+
</button>
|
| 178 |
+
</div>
|
| 179 |
+
|
| 180 |
+
<div id="tasksContainer" class="space-y-2">
|
| 181 |
+
<!-- Tasks will be added here -->
|
| 182 |
+
</div>
|
| 183 |
+
</div>
|
| 184 |
+
|
| 185 |
+
<!-- Add Task Modal (hidden by default) -->
|
| 186 |
+
<div id="addTaskModal" class="hidden fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50">
|
| 187 |
+
<div class="bg-black border border-green-500 rounded-lg p-6 w-full max-w-md mx-4">
|
| 188 |
+
<h3 class="text-xl font-bold text-green-400 mb-4">Add New Task</h3>
|
| 189 |
+
|
| 190 |
+
<div class="mb-4">
|
| 191 |
+
<label class="block text-green-400 mb-2">Task Name</label>
|
| 192 |
+
<input type="text" id="taskNameInput" class="w-full bg-black border border-green-500 rounded-lg px-3 py-2 text-green-400 focus:outline-none focus:ring-1 focus:ring-green-500">
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div class="mb-4">
|
| 196 |
+
<label class="block text-green-400 mb-2">Due Date</label>
|
| 197 |
+
<input type="datetime-local" id="taskDateInput" class="w-full bg-black border border-green-500 rounded-lg px-3 py-2 text-green-400 focus:outline-none focus:ring-1 focus:ring-green-500">
|
| 198 |
+
</div>
|
| 199 |
+
|
| 200 |
+
<div class="flex justify-end space-x-3">
|
| 201 |
+
<button id="cancelTaskBtn" class="px-4 py-2 border border-green-500 text-green-400 rounded-lg">Cancel</button>
|
| 202 |
+
<button id="saveTaskBtn" class="px-4 py-2 bg-green-900 text-green-400 rounded-lg">Save Task</button>
|
| 203 |
+
</div>
|
| 204 |
+
</div>
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<!-- Input Area -->
|
| 208 |
+
<div class="p-4 border-t border-green-500">
|
| 209 |
+
<div id="voiceInputIndicator" class="hidden mb-2 text-center">
|
| 210 |
+
<div class="inline-block bg-green-900 px-4 py-2 rounded-full">
|
| 211 |
+
<span class="typing-indicator">
|
| 212 |
+
<span></span>
|
| 213 |
+
<span></span>
|
| 214 |
+
<span></span>
|
| 215 |
+
</span>
|
| 216 |
+
<span class="text-green-400 ml-2">Listening for "Hey Aron"...</span>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
<div class="flex items-center">
|
| 221 |
+
<input type="text" id="messageInput" placeholder="Type your message or say 'Hey Aron'..." class="flex-1 bg-black border border-green-500 rounded-l-lg px-4 py-3 text-green-400 focus:outline-none focus:ring-1 focus:ring-green-500">
|
| 222 |
+
<button id="sendBtn" class="bg-green-900 text-green-400 px-4 py-3 rounded-r-lg">
|
| 223 |
+
<i class="fas fa-paper-plane"></i>
|
| 224 |
+
</button>
|
| 225 |
+
</div>
|
| 226 |
+
</div>
|
| 227 |
+
</main>
|
| 228 |
+
|
| 229 |
+
<!-- Bottom Navigation -->
|
| 230 |
+
<nav class="bg-black border-t border-green-500 flex justify-around p-2">
|
| 231 |
+
<button id="chatTab" class="flex flex-col items-center p-2 text-green-400">
|
| 232 |
+
<i class="fas fa-comment-dots text-xl"></i>
|
| 233 |
+
<span class="text-xs mt-1">Chat</span>
|
| 234 |
+
</button>
|
| 235 |
+
<button id="tasksTab" class="flex flex-col items-center p-2 text-green-600">
|
| 236 |
+
<i class="fas fa-tasks text-xl"></i>
|
| 237 |
+
<span class="text-xs mt-1">Tasks</span>
|
| 238 |
+
</button>
|
| 239 |
+
<button id="remindersTab" class="flex flex-col items-center p-2 text-green-600">
|
| 240 |
+
<i class="fas fa-bell text-xl"></i>
|
| 241 |
+
<span class="text-xs mt-1">Reminders</span>
|
| 242 |
+
</button>
|
| 243 |
+
<button id="helpTab" class="flex flex-col items-center p-2 text-green-600">
|
| 244 |
+
<i class="fas fa-question-circle text-xl"></i>
|
| 245 |
+
<span class="text-xs mt-1">Help</span>
|
| 246 |
+
</button>
|
| 247 |
+
</nav>
|
| 248 |
+
|
| 249 |
+
<!-- Voice Recognition Modal -->
|
| 250 |
+
<div id="voiceModal" class="hidden fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50">
|
| 251 |
+
<div class="bg-black border-2 border-green-500 rounded-full w-64 h-64 flex items-center justify-center flex-col">
|
| 252 |
+
<div class="pulse mb-4">
|
| 253 |
+
<i class="fas fa-microphone text-green-400 text-4xl"></i>
|
| 254 |
+
</div>
|
| 255 |
+
<p class="text-green-400 text-center">Listening...<br>Say "Hey Aron" followed by your command</p>
|
| 256 |
+
</div>
|
| 257 |
+
</div>
|
| 258 |
+
|
| 259 |
+
<script>
|
| 260 |
+
// DOM Elements
|
| 261 |
+
const chatArea = document.getElementById('chatArea');
|
| 262 |
+
const messageInput = document.getElementById('messageInput');
|
| 263 |
+
const sendBtn = document.getElementById('sendBtn');
|
| 264 |
+
const voiceBtn = document.getElementById('voiceBtn');
|
| 265 |
+
const voiceInputIndicator = document.getElementById('voiceInputIndicator');
|
| 266 |
+
const voiceModal = document.getElementById('voiceModal');
|
| 267 |
+
const chatTab = document.getElementById('chatTab');
|
| 268 |
+
const tasksTab = document.getElementById('tasksTab');
|
| 269 |
+
const taskList = document.getElementById('taskList');
|
| 270 |
+
const tasksContainer = document.getElementById('tasksContainer');
|
| 271 |
+
const addTaskBtn = document.getElementById('addTaskBtn');
|
| 272 |
+
const addTaskModal = document.getElementById('addTaskModal');
|
| 273 |
+
const taskNameInput = document.getElementById('taskNameInput');
|
| 274 |
+
const taskDateInput = document.getElementById('taskDateInput');
|
| 275 |
+
const saveTaskBtn = document.getElementById('saveTaskBtn');
|
| 276 |
+
const cancelTaskBtn = document.getElementById('cancelTaskBtn');
|
| 277 |
+
const statusIndicator = document.getElementById('statusIndicator');
|
| 278 |
+
const statusText = document.getElementById('statusText');
|
| 279 |
+
|
| 280 |
+
// Sample tasks data
|
| 281 |
+
let tasks = [
|
| 282 |
+
{ id: 1, name: "Complete project presentation", due: new Date(Date.now() + 86400000).toISOString().slice(0, 16), completed: false },
|
| 283 |
+
{ id: 2, name: "Buy groceries", due: new Date(Date.now() + 3600000).toISOString().slice(0, 16), completed: false },
|
| 284 |
+
{ id: 3, name: "Morning workout", due: new Date().toISOString().slice(0, 16), completed: true }
|
| 285 |
+
];
|
| 286 |
+
|
| 287 |
+
// Voice recognition and synthesis
|
| 288 |
+
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
| 289 |
+
const SpeechSynthesisUtterance = window.SpeechSynthesisUtterance;
|
| 290 |
+
const synth = window.speechSynthesis;
|
| 291 |
+
|
| 292 |
+
let recognition;
|
| 293 |
+
let isListening = false;
|
| 294 |
+
let wakeWordDetected = false;
|
| 295 |
+
let finalTranscript = '';
|
| 296 |
+
let apiKey = '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';
|
| 297 |
+
|
| 298 |
+
// Initialize the app
|
| 299 |
+
function init() {
|
| 300 |
+
if (SpeechRecognition) {
|
| 301 |
+
setupSpeechRecognition();
|
| 302 |
+
updateStatus('waiting');
|
| 303 |
+
} else {
|
| 304 |
+
updateStatus('off');
|
| 305 |
+
addAronMessage("Your browser doesn't support speech recognition. Please use Chrome or Edge for full functionality.");
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
renderTasks();
|
| 309 |
+
setupEventListeners();
|
| 310 |
+
simulateInitialGreeting();
|
| 311 |
+
checkForReminders();
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
// Set up speech recognition
|
| 315 |
+
function setupSpeechRecognition() {
|
| 316 |
+
recognition = new SpeechRecognition();
|
| 317 |
+
recognition.continuous = true;
|
| 318 |
+
recognition.interimResults = true;
|
| 319 |
+
recognition.maxAlternatives = 1;
|
| 320 |
+
|
| 321 |
+
recognition.onstart = () => {
|
| 322 |
+
isListening = true;
|
| 323 |
+
updateStatus('listening');
|
| 324 |
+
};
|
| 325 |
+
|
| 326 |
+
recognition.onend = () => {
|
| 327 |
+
isListening = false;
|
| 328 |
+
if (!wakeWordDetected) {
|
| 329 |
+
updateStatus('waiting');
|
| 330 |
+
}
|
| 331 |
+
};
|
| 332 |
+
|
| 333 |
+
recognition.onresult = (event) => {
|
| 334 |
+
let interimTranscript = '';
|
| 335 |
+
|
| 336 |
+
for (let i = event.resultIndex; i < event.results.length; i++) {
|
| 337 |
+
const transcript = event.results[i][0].transcript;
|
| 338 |
+
|
| 339 |
+
if (event.results[i].isFinal) {
|
| 340 |
+
finalTranscript += transcript;
|
| 341 |
+
|
| 342 |
+
// Check for wake word
|
| 343 |
+
if (finalTranscript.toLowerCase().includes('hey aron') || finalTranscript.toLowerCase().includes('aron')) {
|
| 344 |
+
wakeWordDetected = true;
|
| 345 |
+
finalTranscript = finalTranscript.toLowerCase().replace('hey aron', '').replace('aron', '').trim();
|
| 346 |
+
handleVoiceCommand(finalTranscript);
|
| 347 |
+
finalTranscript = '';
|
| 348 |
+
}
|
| 349 |
+
} else {
|
| 350 |
+
interimTranscript += transcript;
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
// Show interim results in UI
|
| 355 |
+
if (interimTranscript && wakeWordDetected) {
|
| 356 |
+
messageInput.value = interimTranscript;
|
| 357 |
+
}
|
| 358 |
+
};
|
| 359 |
+
|
| 360 |
+
recognition.onerror = (event) => {
|
| 361 |
+
console.error('Speech recognition error', event.error);
|
| 362 |
+
updateStatus('off');
|
| 363 |
+
addAronMessage("Sorry, I encountered an error with voice recognition. Please try again.");
|
| 364 |
+
};
|
| 365 |
+
|
| 366 |
+
// Start listening
|
| 367 |
+
try {
|
| 368 |
+
recognition.start();
|
| 369 |
+
} catch (e) {
|
| 370 |
+
console.error('Speech recognition start failed:', e);
|
| 371 |
+
updateStatus('off');
|
| 372 |
+
}
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
// Update status indicator
|
| 376 |
+
function updateStatus(status) {
|
| 377 |
+
statusIndicator.className = 'status-indicator';
|
| 378 |
+
|
| 379 |
+
switch (status) {
|
| 380 |
+
case 'listening':
|
| 381 |
+
statusIndicator.classList.add('status-listening');
|
| 382 |
+
statusText.textContent = 'Listening';
|
| 383 |
+
break;
|
| 384 |
+
case 'waiting':
|
| 385 |
+
statusIndicator.classList.add('status-waiting');
|
| 386 |
+
statusText.textContent = 'Waiting';
|
| 387 |
+
break;
|
| 388 |
+
case 'off':
|
| 389 |
+
statusIndicator.classList.add('status-off');
|
| 390 |
+
statusText.textContent = 'Offline';
|
| 391 |
+
break;
|
| 392 |
+
}
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
// Set up event listeners
|
| 396 |
+
function setupEventListeners() {
|
| 397 |
+
// Send message on button click or Enter key
|
| 398 |
+
sendBtn.addEventListener('click', sendMessage);
|
| 399 |
+
messageInput.addEventListener('keypress', (e) => {
|
| 400 |
+
if (e.key === 'Enter') sendMessage();
|
| 401 |
+
});
|
| 402 |
+
|
| 403 |
+
// Voice command button
|
| 404 |
+
voiceBtn.addEventListener('click', toggleVoiceRecognition);
|
| 405 |
+
|
| 406 |
+
// Tab navigation
|
| 407 |
+
chatTab.addEventListener('click', () => switchTab('chat'));
|
| 408 |
+
tasksTab.addEventListener('click', () => switchTab('tasks'));
|
| 409 |
+
|
| 410 |
+
// Task management
|
| 411 |
+
addTaskBtn.addEventListener('click', () => addTaskModal.classList.remove('hidden'));
|
| 412 |
+
saveTaskBtn.addEventListener('click', saveTask);
|
| 413 |
+
cancelTaskBtn.addEventListener('click', () => addTaskModal.classList.add('hidden'));
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
// Toggle voice recognition
|
| 417 |
+
function toggleVoiceRecognition() {
|
| 418 |
+
if (!isListening) {
|
| 419 |
+
voiceModal.classList.remove('hidden');
|
| 420 |
+
voiceInputIndicator.classList.remove('hidden');
|
| 421 |
+
wakeWordDetected = true; // Bypass wake word when button is pressed
|
| 422 |
+
|
| 423 |
+
// In a real app, you might want to restart recognition here
|
| 424 |
+
} else {
|
| 425 |
+
voiceModal.classList.add('hidden');
|
| 426 |
+
voiceInputIndicator.classList.add('hidden');
|
| 427 |
+
wakeWordDetected = false;
|
| 428 |
+
|
| 429 |
+
if (recognition) {
|
| 430 |
+
recognition.stop();
|
| 431 |
+
}
|
| 432 |
+
}
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
// Handle voice command
|
| 436 |
+
function handleVoiceCommand(command) {
|
| 437 |
+
if (!command.trim()) return;
|
| 438 |
+
|
| 439 |
+
addUserMessage(command);
|
| 440 |
+
processCommand(command);
|
| 441 |
+
|
| 442 |
+
// Show visual feedback
|
| 443 |
+
voiceModal.classList.remove('hidden');
|
| 444 |
+
setTimeout(() => {
|
| 445 |
+
voiceModal.classList.add('hidden');
|
| 446 |
+
}, 1000);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
// Switch between tabs
|
| 450 |
+
function switchTab(tab) {
|
| 451 |
+
// Reset all tabs
|
| 452 |
+
chatTab.classList.remove('text-green-400');
|
| 453 |
+
chatTab.classList.add('text-green-600');
|
| 454 |
+
tasksTab.classList.remove('text-green-400');
|
| 455 |
+
tasksTab.classList.add('text-green-600');
|
| 456 |
+
|
| 457 |
+
// Hide all content
|
| 458 |
+
chatArea.classList.add('hidden');
|
| 459 |
+
taskList.classList.add('hidden');
|
| 460 |
+
|
| 461 |
+
// Activate selected tab
|
| 462 |
+
if (tab === 'chat') {
|
| 463 |
+
chatTab.classList.remove('text-green-600');
|
| 464 |
+
chatTab.classList.add('text-green-400');
|
| 465 |
+
chatArea.classList.remove('hidden');
|
| 466 |
+
} else if (tab === 'tasks') {
|
| 467 |
+
tasksTab.classList.remove('text-green-600');
|
| 468 |
+
tasksTab.classList.add('text-green-400');
|
| 469 |
+
taskList.classList.remove('hidden');
|
| 470 |
+
}
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
// Send a text message
|
| 474 |
+
function sendMessage() {
|
| 475 |
+
const message = messageInput.value.trim();
|
| 476 |
+
if (message) {
|
| 477 |
+
addUserMessage(message);
|
| 478 |
+
processCommand(message);
|
| 479 |
+
messageInput.value = '';
|
| 480 |
+
}
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
// Process user command
|
| 484 |
+
async function processCommand(command) {
|
| 485 |
+
// Show typing indicator
|
| 486 |
+
const typingIndicator = document.createElement('div');
|
| 487 |
+
typingIndicator.className = 'message-bubble aron-message typing-indicator';
|
| 488 |
+
typingIndicator.innerHTML = '<span></span><span></span><span></span>';
|
| 489 |
+
chatArea.appendChild(typingIndicator);
|
| 490 |
+
chatArea.scrollTop = chatArea.scrollHeight;
|
| 491 |
+
|
| 492 |
+
try {
|
| 493 |
+
// Check for wake word if not from button
|
| 494 |
+
if (!wakeWordDetected && !command.toLowerCase().includes('hey aron') && !command.toLowerCase().includes('aron')) {
|
| 495 |
+
addAronMessage("Please say 'Hey Aron' before your command so I know you're talking to me.");
|
| 496 |
+
return;
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
// Remove wake word from command
|
| 500 |
+
const cleanCommand = command.toLowerCase().replace('hey aron', '').replace('aron', '').trim();
|
| 501 |
+
|
| 502 |
+
if (cleanCommand.includes('task') || cleanCommand.includes('remind') || cleanCommand.includes('add')) {
|
| 503 |
+
await handleTaskCommand(cleanCommand);
|
| 504 |
+
} else if (cleanCommand.includes('today') || cleanCommand.includes('schedule') || cleanCommand.includes('what have we got')) {
|
| 505 |
+
await showTodaysTasks();
|
| 506 |
+
} else if (cleanCommand.includes('hello') || cleanCommand.includes('hi')) {
|
| 507 |
+
speakResponse(getRandomGreeting());
|
| 508 |
+
} else {
|
| 509 |
+
// For other queries, use ChatGPT
|
| 510 |
+
await getChatGPTResponse(cleanCommand);
|
| 511 |
+
}
|
| 512 |
+
} catch (error) {
|
| 513 |
+
console.error('Error processing command:', error);
|
| 514 |
+
addAronMessage("Sorry, I encountered an error processing your request. Please try again.");
|
| 515 |
+
} finally {
|
| 516 |
+
// Remove typing indicator
|
| 517 |
+
typingIndicator.remove();
|
| 518 |
+
}
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
// Handle task-related commands
|
| 522 |
+
async function handleTaskCommand(command) {
|
| 523 |
+
if (command.includes('add') || command.includes('new') || command.includes('create')) {
|
| 524 |
+
// Extract task details from command
|
| 525 |
+
let taskName = command.replace('add', '').replace('task', '').replace('new', '').replace('create', '').trim();
|
| 526 |
+
let dueDate = new Date();
|
| 527 |
+
|
| 528 |
+
if (command.includes('tomorrow')) {
|
| 529 |
+
dueDate.setDate(dueDate.getDate() + 1);
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
if (command.includes('at') && command.match(/\d{1,2}\s?(am|pm)/i)) {
|
| 533 |
+
const timeMatch = command.match(/\d{1,2}\s?(am|pm)/i)[0];
|
| 534 |
+
let hours = parseInt(timeMatch);
|
| 535 |
+
const isPM = timeMatch.toLowerCase().includes('pm');
|
| 536 |
+
|
| 537 |
+
if (isPM && hours < 12) hours += 12;
|
| 538 |
+
if (!isPM && hours === 12) hours = 0;
|
| 539 |
+
|
| 540 |
+
dueDate.setHours(hours);
|
| 541 |
+
dueDate.setMinutes(0);
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
// Create task
|
| 545 |
+
const newTask = {
|
| 546 |
+
id: tasks.length + 1,
|
| 547 |
+
name: taskName || "New Task",
|
| 548 |
+
due: dueDate.toISOString().slice(0, 16),
|
| 549 |
+
completed: false
|
| 550 |
+
};
|
| 551 |
+
|
| 552 |
+
tasks.push(newTask);
|
| 553 |
+
renderTasks();
|
| 554 |
+
|
| 555 |
+
const response = `I've added the task "${newTask.name}" to your list. You've got this!`;
|
| 556 |
+
speakResponse(response);
|
| 557 |
+
} else {
|
| 558 |
+
const response = "I can help you manage tasks. Try saying 'Hey Aron, add a task to call mom tomorrow at 5 PM'";
|
| 559 |
+
speakResponse(response);
|
| 560 |
+
}
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
// Show today's tasks
|
| 564 |
+
async function showTodaysTasks() {
|
| 565 |
+
const today = new Date().toISOString().slice(0, 10);
|
| 566 |
+
const todaysTasks = tasks.filter(task => task.due.startsWith(today));
|
| 567 |
+
|
| 568 |
+
if (todaysTasks.length > 0) {
|
| 569 |
+
let taskList = todaysTasks.map(task => {
|
| 570 |
+
const time = new Date(task.due).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
| 571 |
+
return `${task.name} at ${time}`;
|
| 572 |
+
}).join(', ');
|
| 573 |
+
|
| 574 |
+
const response = `Today, you have ${taskList} to complete. Let's make it a productive day!`;
|
| 575 |
+
speakResponse(response);
|
| 576 |
+
} else {
|
| 577 |
+
const response = "You have no tasks scheduled for today. Enjoy your free time or add some tasks to stay productive!";
|
| 578 |
+
speakResponse(response);
|
| 579 |
+
}
|
| 580 |
+
}
|
| 581 |
+
|
| 582 |
+
// Get response from ChatGPT
|
| 583 |
+
async function getChatGPTResponse(query) {
|
| 584 |
+
try {
|
| 585 |
+
const response = await fetch('https://api.openai.com/v1/chat/completions', {
|
| 586 |
+
method: 'POST',
|
| 587 |
+
headers: {
|
| 588 |
+
'Content-Type': 'application/json',
|
| 589 |
+
'Authorization': `Bearer ${apiKey}`
|
| 590 |
+
},
|
| 591 |
+
body: JSON.stringify({
|
| 592 |
+
model: "gpt-3.5-turbo",
|
| 593 |
+
messages: [
|
| 594 |
+
{
|
| 595 |
+
role: "system",
|
| 596 |
+
content: "You are Aron, a friendly and helpful AI productivity assistant. Respond in a conversational tone, keeping responses concise but helpful. Use motivational language when appropriate."
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
role: "user",
|
| 600 |
+
content: query
|
| 601 |
+
}
|
| 602 |
+
],
|
| 603 |
+
temperature: 0.7,
|
| 604 |
+
max_tokens: 150
|
| 605 |
+
})
|
| 606 |
+
});
|
| 607 |
+
|
| 608 |
+
const data = await response.json();
|
| 609 |
+
|
| 610 |
+
if (data.choices && data.choices[0].message) {
|
| 611 |
+
const chatGPTResponse = data.choices[0].message.content;
|
| 612 |
+
speakResponse(chatGPTResponse);
|
| 613 |
+
} else {
|
| 614 |
+
throw new Error('Invalid response from API');
|
| 615 |
+
}
|
| 616 |
+
} catch (error) {
|
| 617 |
+
console.error('Error calling ChatGPT API:', error);
|
| 618 |
+
const fallbackResponse = "I'm having trouble connecting to my AI brain right now. Here's what I can tell you about '" + query + "': It's important to stay focused and break tasks into manageable chunks.";
|
| 619 |
+
speakResponse(fallbackResponse);
|
| 620 |
+
}
|
| 621 |
+
}
|
| 622 |
+
|
| 623 |
+
// Speak a response
|
| 624 |
+
function speakResponse(text) {
|
| 625 |
+
addAronMessage(text);
|
| 626 |
+
|
| 627 |
+
if (synth && SpeechSynthesisUtterance) {
|
| 628 |
+
const utterance = new SpeechSynthesisUtterance(text);
|
| 629 |
+
utterance.voice = synth.getVoices().find(voice => voice.name.includes('Google US English') || voice.lang.includes('en-US'));
|
| 630 |
+
utterance.rate = 0.9;
|
| 631 |
+
utterance.pitch = 1;
|
| 632 |
+
synth.speak(utterance);
|
| 633 |
+
}
|
| 634 |
+
}
|
| 635 |
+
|
| 636 |
+
// Add user message to chat
|
| 637 |
+
function addUserMessage(message) {
|
| 638 |
+
const messageDiv = document.createElement('div');
|
| 639 |
+
messageDiv.className = 'message-bubble user-message';
|
| 640 |
+
messageDiv.innerHTML = `<p class="terminal-text">${message}</p>`;
|
| 641 |
+
chatArea.appendChild(messageDiv);
|
| 642 |
+
chatArea.scrollTop = chatArea.scrollHeight;
|
| 643 |
+
}
|
| 644 |
+
|
| 645 |
+
// Add Aron's message to chat
|
| 646 |
+
function addAronMessage(message) {
|
| 647 |
+
const messageDiv = document.createElement('div');
|
| 648 |
+
messageDiv.className = 'message-bubble aron-message';
|
| 649 |
+
messageDiv.innerHTML = `<p class="terminal-text">${message}</p>`;
|
| 650 |
+
chatArea.appendChild(messageDiv);
|
| 651 |
+
chatArea.scrollTop = chatArea.scrollHeight;
|
| 652 |
+
}
|
| 653 |
+
|
| 654 |
+
// Get random greeting
|
| 655 |
+
function getRandomGreeting() {
|
| 656 |
+
const greetings = [
|
| 657 |
+
"Hello there! How can I assist you today?",
|
| 658 |
+
"Hi! Ready to boost your productivity?",
|
| 659 |
+
"Greetings! What's on your mind today?",
|
| 660 |
+
"Hey! Let's make today productive together."
|
| 661 |
+
];
|
| 662 |
+
return greetings[Math.floor(Math.random() * greetings.length)];
|
| 663 |
+
}
|
| 664 |
+
|
| 665 |
+
// Render tasks in the task list
|
| 666 |
+
function renderTasks() {
|
| 667 |
+
tasksContainer.innerHTML = '';
|
| 668 |
+
|
| 669 |
+
if (tasks.length === 0) {
|
| 670 |
+
tasksContainer.innerHTML = '<p class="text-green-600 text-center py-4">No tasks yet. Add your first task!</p>';
|
| 671 |
+
return;
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
// Sort tasks by due date
|
| 675 |
+
const sortedTasks = [...tasks].sort((a, b) => new Date(a.due) - new Date(b.due));
|
| 676 |
+
|
| 677 |
+
sortedTasks.forEach(task => {
|
| 678 |
+
const taskElement = document.createElement('div');
|
| 679 |
+
taskElement.className = `task-item bg-black p-3 rounded-lg flex items-center justify-between ${task.completed ? 'opacity-60' : ''}`;
|
| 680 |
+
|
| 681 |
+
const dueDate = new Date(task.due);
|
| 682 |
+
const timeString = dueDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
| 683 |
+
const dateString = dueDate.toLocaleDateString();
|
| 684 |
+
|
| 685 |
+
taskElement.innerHTML = `
|
| 686 |
+
<div class="flex items-center">
|
| 687 |
+
<input type="checkbox" ${task.completed ? 'checked' : ''} data-id="${task.id}" class="mr-3 h-5 w-5 text-green-500 rounded focus:ring-green-400">
|
| 688 |
+
<div>
|
| 689 |
+
<p class="text-green-400 ${task.completed ? 'line-through' : ''}">${task.name}</p>
|
| 690 |
+
<p class="text-green-600 text-xs">${dateString} at ${timeString}</p>
|
| 691 |
+
</div>
|
| 692 |
+
</div>
|
| 693 |
+
<button data-id="${task.id}" class="text-green-600 hover:text-green-400">
|
| 694 |
+
<i class="fas fa-trash-alt"></i>
|
| 695 |
+
</button>
|
| 696 |
+
`;
|
| 697 |
+
|
| 698 |
+
tasksContainer.appendChild(taskElement);
|
| 699 |
+
});
|
| 700 |
+
|
| 701 |
+
// Add event listeners for checkboxes and delete buttons
|
| 702 |
+
document.querySelectorAll('.task-item input[type="checkbox"]').forEach(checkbox => {
|
| 703 |
+
checkbox.addEventListener('change', toggleTaskCompletion);
|
| 704 |
+
});
|
| 705 |
+
|
| 706 |
+
document.querySelectorAll('.task-item button').forEach(button => {
|
| 707 |
+
button.addEventListener('click', deleteTask);
|
| 708 |
+
});
|
| 709 |
+
}
|
| 710 |
+
|
| 711 |
+
// Toggle task completion status
|
| 712 |
+
function toggleTaskCompletion(e) {
|
| 713 |
+
const taskId = parseInt(e.target.dataset.id);
|
| 714 |
+
const task = tasks.find(t => t.id === taskId);
|
| 715 |
+
|
| 716 |
+
if (task) {
|
| 717 |
+
task.completed = e.target.checked;
|
| 718 |
+
|
| 719 |
+
// Simulate Aron's response
|
| 720 |
+
if (task.completed) {
|
| 721 |
+
setTimeout(() => {
|
| 722 |
+
const response = `Great job completing "${task.name}"! Keep up the good work!`;
|
| 723 |
+
speakResponse(response);
|
| 724 |
+
}, 500);
|
| 725 |
+
}
|
| 726 |
+
}
|
| 727 |
+
}
|
| 728 |
+
|
| 729 |
+
// Delete a task
|
| 730 |
+
function deleteTask(e) {
|
| 731 |
+
const taskId = parseInt(e.currentTarget.dataset.id);
|
| 732 |
+
const task = tasks.find(t => t.id === taskId);
|
| 733 |
+
|
| 734 |
+
if (task) {
|
| 735 |
+
tasks = tasks.filter(t => t.id !== taskId);
|
| 736 |
+
renderTasks();
|
| 737 |
+
|
| 738 |
+
const response = `I've removed "${task.name}" from your tasks.`;
|
| 739 |
+
speakResponse(response);
|
| 740 |
+
}
|
| 741 |
+
}
|
| 742 |
+
|
| 743 |
+
// Save a new task
|
| 744 |
+
function saveTask() {
|
| 745 |
+
const name = taskNameInput.value.trim();
|
| 746 |
+
const due = taskDateInput.value;
|
| 747 |
+
|
| 748 |
+
if (name && due) {
|
| 749 |
+
const newTask = {
|
| 750 |
+
id: tasks.length + 1,
|
| 751 |
+
name,
|
| 752 |
+
due,
|
| 753 |
+
completed: false
|
| 754 |
+
};
|
| 755 |
+
|
| 756 |
+
tasks.push(newTask);
|
| 757 |
+
renderTasks();
|
| 758 |
+
addTaskModal.classList.add('hidden');
|
| 759 |
+
taskNameInput.value = '';
|
| 760 |
+
taskDateInput.value = '';
|
| 761 |
+
|
| 762 |
+
// Switch to tasks tab
|
| 763 |
+
switchTab('tasks');
|
| 764 |
+
|
| 765 |
+
// Simulate Aron's response
|
| 766 |
+
setTimeout(() => {
|
| 767 |
+
const response = `I've added "${name}" to your tasks. You've got this!`;
|
| 768 |
+
speakResponse(response);
|
| 769 |
+
}, 500);
|
| 770 |
+
}
|
| 771 |
+
}
|
| 772 |
+
|
| 773 |
+
// Check for upcoming task reminders
|
| 774 |
+
function checkForReminders() {
|
| 775 |
+
const now = new Date();
|
| 776 |
+
const soon = new Date(now.getTime() + 30 * 60000); // 30 minutes from now
|
| 777 |
+
|
| 778 |
+
tasks.forEach(task => {
|
| 779 |
+
if (!task.completed) {
|
| 780 |
+
const taskDue = new Date(task.due);
|
| 781 |
+
|
| 782 |
+
if (taskDue > now && taskDue < soon) {
|
| 783 |
+
setTimeout(() => {
|
| 784 |
+
const response = `Sir, you've got "${task.name}" coming up soon at ${taskDue.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}. Just a friendly reminder!`;
|
| 785 |
+
speakResponse(response);
|
| 786 |
+
}, taskDue - now - 5 * 60000); // 5 minutes before
|
| 787 |
+
}
|
| 788 |
+
}
|
| 789 |
+
});
|
| 790 |
+
|
| 791 |
+
// Check again in 1 minute
|
| 792 |
+
setTimeout(checkForReminders, 60000);
|
| 793 |
+
}
|
| 794 |
+
|
| 795 |
+
// Simulate initial greeting sequence
|
| 796 |
+
function simulateInitialGreeting() {
|
| 797 |
+
setTimeout(() => {
|
| 798 |
+
speakResponse("Welcome back! I'm here to help you stay productive and organized.");
|
| 799 |
+
|
| 800 |
+
setTimeout(() => {
|
| 801 |
+
speakResponse("You can ask me things like:");
|
| 802 |
+
|
| 803 |
+
setTimeout(() => {
|
| 804 |
+
speakResponse("'Hey Aron, what's on my schedule for today?'");
|
| 805 |
+
|
| 806 |
+
setTimeout(() => {
|
| 807 |
+
speakResponse("'Hey Aron, add a task to call mom tomorrow at 5 PM'");
|
| 808 |
+
|
| 809 |
+
setTimeout(() => {
|
| 810 |
+
speakResponse("Or just tap the microphone button to speak to me directly.");
|
| 811 |
+
}, 1000);
|
| 812 |
+
}, 1000);
|
| 813 |
+
}, 1000);
|
| 814 |
+
}, 1000);
|
| 815 |
+
}, 1500);
|
| 816 |
+
}
|
| 817 |
+
|
| 818 |
+
// Initialize the app
|
| 819 |
+
init();
|
| 820 |
+
</script>
|
| 821 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=meer012/aron-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 822 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Project Title: Android Productivity Assistant App with ChatGPT Objective: Develop an Android app that serves as a personal productivity assistant. The app should help users manage their tasks, provide reminders, and answer productivity-related queries using ChatGPT. Features: 1. Wake-up Command: The app should activate with a voice prompt like "Hey [User's Name]" to wake up the AI assistant. 2. Task Management: Allow users to add, edit, and delete tasks. Provide reminders for upcoming tasks. 3. General Assistance: Enable users to ask productivity-related questions and get advice or tips.4. User-Friendly Interface: Design a simple and intuitive user interface for easy navigation. Integration Details: Use OpenAI's ChatGPT API for natural language processing. Implement voice recognition for the wake-up command feature. Ensure data privacy and secure handling of user information. Development Steps: 1. Set up the development environment for Android app development. 2. Integrate OpenAI's API using the provided API key. 3. Develop and test the wake-up command feature with voice recognition. 4. Implement task management functionalities and reminders. 5. Test the app thoroughly to ensure all features work seamlessly. 6. Task Reminders: When a task’s scheduled time arrives, the app should use ChatGPT to generate a friendly reminder message. For example, "Hey, you've got [Task Name] to do today! You can do it!" 2. Daily Summary: When the user asks, "Hey [Name], what have we got to do for today?" the app should compile a list of all the tasks scheduled for that day and present it in a friendly, conversational manner. For example, "Today, you have [Task 1], [Task 2], and [Task 3] to complete. Let’s make it a productive day!" name it Aron it should wake by saying hey Aron it should respond friendly and smart humanly make interface colors green on black for symbols for text use best suit color
|
| 2 |
+
Project Title: Aron with ChatGPT Objective: The app should help users manage their tasks, provide reminders, and answer productivity-related queries using ChatGPT. Features: remindes by saying sir youve task task name etc ai voice more friendly and smart human . Wake-up Command: The app should activate with a voice prompt like "Hey Aron" to wake up the Aron. 2. Task Management: Allow users to add, edit, and delete tasks. Provide reminders for upcoming tasks. 3. General Assistance: Enable users to ask productivity-related questions and get advice or tips.4. User-Friendly Interface: Design a simple and intuitive user interface for easy navigation. Use OpenAI's ChatGPT API for natural language processing. Implement voice recognition for the wake-up command feature. Ensure data privacy and secure handling of user information. Development Steps: 1. Set up the development environment for Android app development. 2. Integrate OpenAI's API using the provided API key: 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 4. Implement task management functionalities and reminders. 5. Test the app thoroughly to ensure all features work seamlessly. 6. Task Reminders: When a task’s scheduled time arrives, the app should use ChatGPT to generate a friendly reminder message. For example, "Hey, you've got [Task Name] to do today! You can do it!" 2. Daily Summary: When the user asks, "Hey Aron, what have we got to do for today?" the app should compile a list of all the tasks scheduled for that day and present it in a friendly, conversational manner. For example, "Today, you have [Task 1], [Task 2], and [Task 3] to complete. Let’s make it a productive day!" it should use chatgpt to generate responses and speaking tone
|
| 3 |
+
this has no voice and its not using chat gpt to generate responses
|