-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
113 lines (111 loc) · 8.98 KB
/
index.html
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
<!DOCTYPE html>
<html lang='en' class='notranslate' translate='no'>
<head>
<meta name='google' content='notranslate' />
<meta charset='UTF-8'>
<link rel="icon" href="img/favicon-16x16.ico" type="image/x-icon" sizes="16x16">
<link rel="icon" href="img/favicon-32x32.ico" type="image/x-icon" sizes="32x32">
<link rel="icon" href="img/favicon-48x48.ico" type="image/x-icon" sizes="48x48">
<meta name='description' content='An Offline Text-to-Speech Browser Tool'>
<meta name='keywords' content='OCR,Tesseract,SpeechSynthesis API,Text-to-Speech'>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name='viewport' content='width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' />
<meta http-equiv='X-UA-Compatible' content='IE=Edge,chrome=1' />
<meta http-equiv='Content-Language' content='en' />
<title>Text2Speech App | Browser Tool</title>
<meta name='msapplication-TileColor' content='#ffffff' />
<meta name='theme-color' content='#ffffff' />
<meta name='apple-mobile-web-app-status-bar-style' content='black-translucent' />
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='mobile-web-app-capable' content='yes' />
<meta name='HandheldFriendly' content='True' />
<meta name='MobileOptimized' content='320' />
<meta http-equiv='Content-Security-Policy' content='upgrade-insecure-requests' />
<link href='css/bootstrap-4.5.2.min.css' rel='stylesheet' type='text/css' />
<link href='css/offcanvas.css' rel='stylesheet' type='text/css' />
<link href='css/main.css' rel='stylesheet' type='text/css' />
</head>
<noscript>You need to enable JavaScript to run this app.</noscript>
<body>
<div class='container-fluid'>
<div class="row">
<div class='col-sm-4 col-12'>
<div class="card rounded-0">
<div class="card-header pl-1 pr-1 pt-0 pb-0"><img id='siteLogo' src='img/logo.png' alt='Text2SpeechLogo' class='m-1' />🗣🔈 <strong>Speech Settings</strong></div>
<div id='speechSettingsCard' class="card-body p-2">
<div class='row'>
<div class='col-4 col-sm-4'>
<input type="range" orient="vertical" min="0.5" max="2" value="1" step="0.1" class='slider' id="rate" />
<span class='badge badge-light rounded-0 p-0 ml-1'>ᴿᵃᵗᵉ<span id="rateValue">1</span></span>
</div>
<div class='col-4 col-sm-4'>
<input type="range" orient="vertical" min="0" max="2" value="1" step="0.1" id="pitch" />
<span class='badge badge-light rounded-0 p-0 ml-1'>ᴾⁱᵗᶜʰ<span id="pitchValue">1</span></span>
</div>
<div class='col-4 col-sm-4'>
<input type="range" orient="vertical" min="0" max="1" value="1" step="0.1" id="volume" />
<span class='badge badge-light rounded-0 p-0 ml-1'>ⱽᵒˡᵘᵐᵉ<span id="volumeValue">1</span></span>
</div>
</div>
</div>
</div>
</div>
<div class='col-sm-8 col-12'>
<div class="card rounded-0">
<div class="card-header p-1">┏🠉┓ <strong>Upload File Content</strong>
<button type="button" class="btn btn-light border-primary btn-sm rounded-circle text-primary ml-2" data-toggle="popover" data-title="❭⎽⎽ Tesseract OCR Engine" data-dismissible="true" data-placement="right" data-content="<p class='mb-0'><p>❶ <small class='text-muted'><a href='https://github.com/naptha/tesseract.js' target='_blank'>TesseractJS</a> is an open-sourced OCR Engine which leverages on character recognition technology for text extraction.</small></p><p>❷ <small class='text-muted'>By default, <strong>all pages</strong> in the PDF file shall be processed for text extraction (for this release).</small></p><p>❸ <small class='text-muted'>This software is opened to public for use licensed under ⚖ <a href='LICENSE-2.0.txt' target='_blank'>Apache-2.0 License</a>.</small></p></p>"><small>👆*</small></button>
</div>
<div id='uploadFileContentCard' class="card-body p-2">
<div class='row'>
<div class='col-4 mr-0'>
<p class='w-100'><button id='uploadImgBtn' type='button' class='btn btn-sm btn-outline-primary rounded-0'><small>📂 Select Image…</small><input id='uploadImg' type='file' accept='image/*' /></button></p>
<hr>
<div id='img-preview' class='small border text-center'></div>
<small><strong>🔄 Image Text Extraction</strong></small>
<div class="progress">
<div id="ocrImgProgress" class="progress-bar progress-bar-striped progress-bar-animated"></div>
</div>
<small id='ocrImgProgressStatus' class='small'></small>
</div>
<div class='col-5 mr-0'>
<p class='w-100'><button id='uploadPDFBtn' type='button' class='btn btn-sm btn-outline-primary rounded-0'><small>📂 Select PDF…</small><input id='uploadPDF' type='file' accept='.pdf,.PDF' /></button> <span id='pageLoadingSignal'><span class="spinner-border spinner-border-sm"></span> <small class='text-muted'>Processing Page <span id='currentPageNo'>?</span><b> / <span id="totalPages">?</span> </b></small></span></p>
<hr>
<div id='page-preview' class='small border text-center'></div>
<small><strong>🔄 Page Text Extraction</strong></small>
<div class="progress">
<div id="ocrPageProgress" class="progress-bar progress-bar-striped progress-bar-animated"></div>
</div>
<small id='ocrPageProgressStatus' class='small'></small>
</div>
<div class='col-3 mr-0'>
<small class='text-dark'>📄 Processed Page(s)</small>
<small id='processedPages' class='border small'></small>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class='row'>
<div class='col-12'>
<div id='controllerCard' class="card rounded-0">
<div class="card-header p-1">
<p class='m-0'><button type="button" class="btn btn-light border-primary btn-sm rounded-circle text-primary ml-2" data-toggle="popover" data-title="🔎 User Guide 👀" data-dismissible="true" data-placement="right" data-content="<p class='mb-0'><p>❶ ⎆⎃ <small class='text-muted'>Select <span class='badge badge-light rounded-circle border border-info text-info'><small>⯈</small></span> to listen to text․</small></p><p>❷ ⎇⎀ <small class='text-muted'>Manual edits & inputs are enabled in the text field․</small></p><p>❸ ⎁⎂ <small class='text-muted'>Upload an image file/pdf doc for text extraction. Upon completion, output shall auto-append itself to existing input content․</small></p><p><strong>ℹ Speech Controls</strong><ul><li>▶⇆⏸ <small class='text-info'>Toggle between play﹠pause.</small></li><li>▶→⏸⇆⏯ <small class='text-info'>Speech shall resume if paused before completion (assuming no stop command is triggered.).</small></li><li>⏹ <small class='text-danger'>Stops the speech regardless of completion status.</small></li></ul></p></p>"><small>👆*</small></button> <span class='mr-1 ml-1'>❝ᴛᴇxᴛ2sᴘᴇᴇᴄʜ❞ ᴀᴘᴘ</span> <button id='clearTextBtn' class="btn btn-sm btn-light text-danger border-danger rounded-0 ml-2 mr-2" type='button'>🆑ᴇᴀʀ </button><span class='float-right'><button id='speakBtn' class="btn btn-sm btn-light text-info border-info rounded-circle pl-2 pr-2 pt-0 pb-1" type='button'><small>▶</small></button> <button id='stopBtn' class="btn btn-sm btn-light text-danger border-danger rounded-circle pl-2 pr-2 pt-0 pb-1" type='button'><small>■</small></button> <button id='downloadTextContent' class="btn btn-sm btn-light text-primary border-primary rounded-0 pl-2 pr-2 pt-0 pb-1 ml-4" type='button'><small>┏🠋┓ ᴇxᴘᴏʀᴛ ᴀs ᴘʟᴀɪɴᴛᴇxᴛ…</small></button></span></p>
</div>
<div class="card-body p-0">
<textarea id='inputText' class="form-control rounded-0 m-0 border-0"></textarea>
</div>
</div>
</div>
</div>
</div>
<script src='js/polyfill.js'></script>
<script src='js/ie10-viewport-bug-workaround.js'></script>
<script src='js/bootstrap-native-v4.js'></script>
<script src='js/tesseract/tesseract.min.js'></script>
<script src='js/pdf/pdf.min.js'></script>
<script src='js/articulate.js'></script>
<script src='js/main.js'></script>
</body>
</html>