-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
337 lines (313 loc) · 17.9 KB
/
Copy pathindex.html
File metadata and controls
337 lines (313 loc) · 17.9 KB
1
2
3
4
5
6
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
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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="dark">
<meta name="theme-color" content="#0f0f0f">
<title>High-Speed MFSK Image Converter</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<header class="header">
<h1>ECHOSPHERE.X </h1>
<p class="header-subtitle">Convert images to/from Multiple Frequency Shift Keying (MFSK) audio signals • 10-50 kbps</p>
</header>
<main class="main">
<!-- Tab Navigation -->
<div class="tab-nav">
<button class="tab-btn active" data-tab="encode">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="17 8 12 3 7 8"/>
<line x1="12" y1="3" x2="12" y2="15"/>
</svg>
Encode Image → Audio
</button>
<button class="tab-btn" data-tab="decode">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M21 9v-4a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v4"/>
<polyline points="7 16 12 21 17 16"/>
<line x1="12" y1="9" x2="12" y2="21"/>
</svg>
Decode Audio → Image
</button>
</div>
<!-- Encode Tab -->
<div class="tab-content active" id="encode-tab">
<!-- Preset Selection -->
<section class="preset-section">
<div class="card">
<div class="card__body">
<h2>Speed Preset</h2>
<div class="preset-buttons">
<button class="btn btn--secondary preset-btn" data-preset="fast">
Fast (50 kbps)
<span class="preset-desc">3ms symbols</span>
</button>
<button class="btn btn--secondary preset-btn active" data-preset="balanced">
Balanced (25 kbps)
<span class="preset-desc">5ms symbols</span>
</button>
<button class="btn btn--secondary preset-btn" data-preset="reliable">
Reliable (12 kbps)
<span class="preset-desc">8ms symbols</span>
</button>
</div>
</div>
</div>
</section>
<!-- Image Upload -->
<section class="upload-section">
<div class="card">
<div class="card__body">
<h2>Upload Image</h2>
<label for="imageInput" class="file-upload-area" id="imageUploadArea">
<div class="upload-content">
<svg class="upload-icon" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
<circle cx="8.5" cy="8.5" r="1.5"/>
<polyline points="21 15 16 10 5 21"/>
</svg>
<p class="upload-text">Drop image here or click to select</p>
<p class="upload-subtext">JPG, PNG, GIF, BMP • Max 1024×768</p>
</div>
<input type="file" id="imageInput" accept="image/jpeg,image/jpg,image/png,image/gif,image/bmp" hidden>
</div>
<div class="file-info hidden" id="imageInfo">
<div class="file-preview">
<img id="imagePreview" alt="Image preview">
</div>
<div class="file-details">
<p><strong>File:</strong> <span id="imageFileName"></span></p>
<p><strong>Size:</strong> <span id="imageFileSize"></span></p>
<p><strong>Compressed:</strong> <span id="compressedSize"></span></p>
</div>
</div>
</div>
</div>
</section>
<!-- Encoding Controls -->
<section class="encode-section">
<div class="card">
<div class="card__body">
<h2>Generate MFSK Audio</h2>
<div class="encode-info">
<div class="info-grid">
<div class="info-item">
<span class="info-label">Data Rate:</span>
<span class="info-value" id="encodeDataRate">25 kbps</span>
</div>
<div class="info-item">
<span class="info-label">Duration:</span>
<span class="info-value" id="encodeDuration">~0s</span>
</div>
<div class="info-item">
<span class="info-label">Tones:</span>
<span class="info-value">MFSK-64</span>
</div>
<div class="info-item">
<span class="info-label">Frequency:</span>
<span class="info-value">2000±1575 Hz</span>
</div>
</div>
</div>
<button class="btn btn--primary btn--full-width" id="encodeBtn" disabled>
Generate MFSK Audio
</button>
<div class="progress-section hidden" id="encodeProgress">
<div class="progress-bar">
<div class="progress-fill" id="encodeProgressFill"></div>
</div>
<p class="progress-text" id="encodeProgressText">Processing...</p>
</div>
</div>
</div>
</section>
<!-- Audio Output -->
<section class="audio-output-section hidden" id="audioOutput">
<div class="card">
<div class="card__body">
<h2>Generated Audio</h2>
<div class="audio-controls">
<audio controls class="audio-player" id="audioPlayer">
Your browser does not support the audio element.
</audio>
</div>
<div class="audio-stats">
<p><strong>Duration:</strong> <span id="actualDuration"></span></p>
<p><strong>File Size:</strong> <span id="audioFileSize"></span></p>
<p><strong>Actual Rate:</strong> <span id="actualDataRate"></span></p>
</div>
<button class="btn btn--primary btn--full-width" id="downloadAudioBtn">
Download WAV Audio
</button>
</div>
</div>
</section>
</div>
<!-- Decode Tab -->
<div class="tab-content" id="decode-tab">
<!-- Audio Input Method -->
<section class="input-method-section">
<div class="card">
<div class="card__body">
<h2>Select Input Method</h2>
<div class="input-method-buttons">
<button class="btn btn--secondary method-btn active" data-method="file">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
<line x1="16" y1="13" x2="8" y2="13"/>
<line x1="16" y1="17" x2="8" y2="17"/>
<polyline points="10 9 9 9 8 9"/>
</svg>
Upload Audio File
</button>
<button class="btn btn--secondary method-btn" data-method="microphone">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/>
<path d="M19 10v2a7 7 0 0 1-14 0v-2"/>
<line x1="12" y1="19" x2="12" y2="23"/>
<line x1="8" y1="23" x2="16" y2="23"/>
</svg>
Live Microphone
</button>
</div>
</div>
</div>
</section>
<!-- File Upload Method -->
<section class="file-decode-section" id="fileDecodeSection">
<div class="card">
<div class="card__body">
<h2>Upload MFSK Audio</h2>
<label for="audioInput" class="file-upload-area" id="audioUploadArea">
<div class="upload-content">
<svg class="upload-icon" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M9 18V5l12-2v13"/>
<circle cx="6" cy="18" r="3"/>
<circle cx="18" cy="16" r="3"/>
</svg>
<p class="upload-text">Drop MFSK audio here or click to select</p>
<p class="upload-subtext">WAV, MP3, OGG files supported</p>
</div>
<input type="file" id="audioInput" accept="audio/wav,audio/mp3,audio/ogg" hidden>
</div>
<div class="file-info hidden" id="audioInfo">
<div class="file-details">
<p><strong>File:</strong> <span id="audioFileName"></span></p>
<p><strong>Size:</strong> <span id="audioUploadSize"></span></p>
<p><strong>Duration:</strong> <span id="audioDuration"></span></p>
</div>
<button class="btn btn--primary btn--full-width" id="decodeFileBtn">
Decode Audio File
</button>
</div>
</div>
</div>
</section>
<!-- Microphone Method -->
<section class="mic-decode-section hidden" id="micDecodeSection">
<div class="card">
<div class="card__body">
<h2>Live Microphone Decoding</h2>
<div class="mic-controls">
<button class="btn btn--primary" id="startMicBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<polygon points="5 3 19 12 5 21 5 3"/>
</svg>
Start Listening
</button>
<button class="btn btn--outline hidden" id="stopMicBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<rect x="6" y="4" width="4" height="16"/>
<rect x="14" y="4" width="4" height="16"/>
</svg>
Stop Listening
</button>
</div>
<!-- Real-time Visualizer -->
<div class="visualizer-section hidden" id="visualizer">
<h3>Signal Analysis</h3>
<canvas id="spectrumCanvas" width="600" height="200"></canvas>
<div class="signal-info">
<div class="signal-strength">
<span class="signal-label">Signal Strength:</span>
<div class="signal-bar">
<div class="signal-fill" id="signalFill"></div>
</div>
<span class="signal-value" id="signalValue">0%</span>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Decoding Progress -->
<section class="decode-progress-section hidden" id="decodeProgressSection">
<div class="card">
<div class="card__body">
<h2>Decoding Progress</h2>
<div class="progress-section">
<div class="progress-bar">
<div class="progress-fill" id="decodeProgressFill"></div>
</div>
<p class="progress-text" id="decodeProgressText">Analyzing audio...</p>
</div>
<div class="decode-stats">
<p><strong>Decoded Bits:</strong> <span id="decodedBits">0</span></p>
<p><strong>Error Rate:</strong> <span id="errorRate">0%</span></p>
<p><strong>Signal Quality:</strong> <span id="signalQuality">Unknown</span></p>
</div>
</div>
</div>
</section>
<!-- Decoded Image Output -->
<section class="image-output-section hidden" id="imageOutput">
<div class="card">
<div class="card__body">
<h2>Decoded Image</h2>
<div class="decoded-image-container">
<img id="decodedImage" alt="Decoded image">
</div>
<div class="decode-results">
<p><strong>Image Size:</strong> <span id="decodedImageSize"></span></p>
<p><strong>Decode Time:</strong> <span id="decodeTime"></span></p>
<p><strong>Success Rate:</strong> <span id="successRate"></span></p>
</div>
<button class="btn btn--primary btn--full-width" id="downloadImageBtn">
Download Decoded Image
</button>
</div>
</div>
</section>
</div>
</main>
</div>
<footer class="footer-tagline">
<!-- Choose one of the following lines for different tones -->
<!-- Professional -->
<p class="tagline professional">
© 2025 AI Research and Development (R&D)Project — Crafted by K. Tharun, D. Nikhil Varma & B. Prakeerthi
</p>
<!-- Creative -->
<!--
<p class="tagline creative">
An original contribution by K. Tharun, D. Nikhil Varma & B. Prakeerthi © 2025
</p>
-->
<!-- Legal -->
<!--
<p class="tagline legal">
© 2025 AI Project — Intellectual Property of K. Tharun, D. Nikhil Varma & B. Prakeerthi. All rights reserved.
</p>
-->
</footer>
<script src="app.js"></script>
</body>
</html>