-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.html
192 lines (169 loc) Β· 9.67 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
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
<!DOCTYPE html>
<html lang="en" class="w3-white">
<head>
<!-- META ============================================= -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- PAGE TITLE HERE ============================================= -->
<title> TTSpeech </title>
<!-- MOBILE SPECIFIC ============================================= -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no">
<!-- FAVICONS ICON ============================================= -->
<link rel="icon" href="favicon.png" type="image/x-icon" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<link rel="apple-touch-icon" sizes="64x64" href="favicon.png">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/w3-css/4.1.0/w3.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
<link rel="stylesheet" type="text/css" href="css/speech-assistant.css">
</head>
<body class="w3-sans-serif">
<!-- header -->
<div class="w3-block w3-white w3-padding-16 w3-container" style="z-index: 2;">
<div class="w3-bar">
<!-- name -->
<div class="w3-bar-item">
<span class="w3-large">
<i class="fa fa-archive"></i>
<b>TTSpeech</b>
</span>
</div>
<!-- link -->
<a class="w3-bar-item w3-right w3-border w3-round w3-hover-light-grey" href="https://github.com/henryhale/ttspeech" target="blank">
<i class="fab fa-github"></i>
<span class="w3-hide-small"> GitHub</span>
</a>
<!-- setting -->
<button id="darkModeBtn" style="display: none;" class="w3-bar-item w3-right w3-margin-right w3-button w3-hover-none">
<i class="fa fa-moon"></i>
<span class="w3-hide-small"> Dark Mode</span>
</button>
<div class="w3-clear"></div>
</div>
</div>
<!-- /header -->
<!-- body -->
<div class="w3-block game-body">
<!-- intro -->
<div id="introView" class="w3-block w3-padding-16 w3-center w3-round-large w3-animate-opacity w3-light-card-1" style="display: block;">
<span class="w3-block w3-padding-24">
<i class="fa fa-spin fa-spinner fa-2x"></i>
</span>
<span class="w3-block w3-padding-16">
Loading...
</span>
</div>
<!-- / intro -->
<!-- start -->
<div id="startView" class="w3-block w3-padding-16 w3-center w3-round-large w3-animate-opacity position-centering" style="display: none;">
<button id="startBtn" class="w3-button w3-transparent w3-padding-large w3-opacity-min w3-border w3-border-blue w3-text-blue w3-round-large w3-hover-blue w3-hover-opacity w3-light-card-inset">
<i class="fa fa-play"></i>
<span class=""> START</span>
</button>
</div>
<!-- / start -->
<!-- help -->
<div id="helpView" class="w3-block w3-padding-16 w3-center w3-round-large w3-animate-opacity" style="display: none;">
<div class="w3-block w3-container" style="max-width: 600px;margin: 3rem auto;">
<h3 class="w3-blue w3-padding-16 w3-round w3-light-card w3-opacity-min"><b>Help & Settings</b></h3>
<ul class="w3-ul w3-left-align w3-block w3-light-card-1">
<li class="w3-padding w3-round"><i class="fa fa-info-circle"></i> <b>Help:</b> Enter some text in the <b>Input Box</b> and press <b>Return/Enter</b> to hear it.</li>
<li class="w3-padding w3-round"><i class="fa fa-cog"></i> <b>Settings:</b> Change Voices using the dropdown menu.</li>
<li class="w3-padding w3-round"><i class="fa fa-cog"></i> <b>Settings:</b> Change Speech Pitch using the Range slider.</li>
<li class="w3-padding w3-round"><i class="fa fa-cog"></i> <b>Settings:</b> Change Speech Rate using the Range slider.</li>
</ul>
<div class="w3-padding-32" style="margin-top: 3rem;">
<button id="mainBtn" class="w3-button w3-transparent w3-padding-large w3-opacity-min w3-border w3-border-blue w3-text-blue w3-round-large w3-hover-blue w3-hover-opacity w3-light-card-inset">
<i class="fa fa-chevron-right"></i>
<span class=""> GET STARTED</span>
</button>
</div>
</div>
</div>
</div>
<!-- / help -->
<!-- body -->
<div id="mainView" class="w3-block w3-round-large w3-animate-opacity w3-light-card-1" style="display: none;">
<!-- title -->
<div class="w3-container w3-block w3-row w3-padding-16">
<div class="w3-col s9 w3-left-align">
<span class="h3 w3-button w3-white w3-hover-white w3-hover-text-blue w3-text-blue">
<b class="w3-hide-small">Speech</b>
<b>Synthesiser</b>
</span>
</div>
<div class="w3-col s3 w3-right-align">
<button id="settBtn" class="w3-button w3-right w3-white w3-opacity-min w3-border w3-border-blue w3-text-blue w3-round-large w3-hover-blue w3-hover-opacity w3-light-card-inset">
<i class="fa fa-cog"></i>
<span class="w3-hide-small"> Settings</span>
</button>
<button id="closeBtn" style="display: none;" class="w3-button w3-right w3-white w3-opacity-min w3-border w3-border-blue w3-text-blue w3-round-large w3-hover-blue w3-hover-opacity w3-light-card-inset">
<i class="fa fa-times-circle"></i>
<span class="w3-hide-small"> Close</span>
</button>
<div class="w3-clear"></div>
</div>
</div>
<!-- / title -->
<!-- body -->
<div id="mainDataView" style="display: block;" class="w3-block w3-container w3-padding-16">
<div class="w3-container">
<textarea placeholder="Write something here..." name="" id="textBlock" cols="30" rows="10" class="w3-input w3-border-0"></textarea>
</div>
<div id="runBtnView" class="w3-center">
<button id="runBtn" style="width: 200px;" class="w3-button w3-margin-top w3-margin-bottom w3-padding-large w3-opacity-min w3-border w3-border-blue w3-text-blue w3-round-large w3-hover-blue w3-hover-opacity w3-light-card-inset">
<i class="fa fa-microphone-alt"></i>
<span class=""> RUN</span>
</button>
</div>
<div id="ranBtnView" style="display: none;" class="w3-center">
<button id="runBtn" style="width: 200px;" class="w3-button w3-margin-top w3-margin-bottom w3-padding-large w3-opacity-min w3-border w3-border-blue w3-text-blue w3-hover-text-blue w3-round-large w3-hover-white w3-hover-opacity w3-light-card-inset">
<i class="fa fa-microphone-alt"></i>
<span class=""> Running...</span>
</button>
</div>
</div>
<div id="settDataView" style="display: none;" class="w3-block w3-container w3-padding-16">
<div class="w3-bar-block">
<div class="w3-bar-item">
<label for="selectVoice" class="h5"><b>Voice</b></label>
<select id="selectVoice" class="w3-input w3-light-grey"></select>
</div>
<div class="w3-bar-item">
<label for="pitch" class="h5"><b>Pitch</b></label>
<input type="range" min="0" max="2" value="1" step="0.1" id="pitch" class="w3-input">
</div>
<div class="w3-bar-item">
<label for="rate" class="h5"><b>Rate</b></label>
<input type="range" min="0.5" max="2" value="1" step="0.1" id="rate" class="w3-input">
</div>
<div class="w3-bar-item w3-center w3-padding-16">
</div>
</div>
</div>
<!-- / body -->
</div>
<!-- error -->
<div id="errorView" class="w3-block w3-padding-16 w3-round-large w3-animate-opacity position-centering" style="display: none;">
<div class="w3-block w3-container w3-center" style="max-width: 600px;margin: 0 auto;">
<div>
<h1>Sorry :(</h1>
<p>
<i>It seems that your browser doesn't fully support the Web Speech API.</i>
</p>
</div>
<p>
<ul class="w3-ul w3-left-align w3-light-card-1">
<li class="w3-padding w3-round"><i class="fa fa-wrench"></i> Update your browser to the latest version.</li>
<li class="w3-padding w3-round"><i class="fa fa-wrench"></i> Allow the speech to <i>finish</i> and then run another</li>
<li class="w3-padding w3-round"><i class="fa fa-wrench"></i> Try using the latest version of <i>Chrome, Firefox or Edge</i></li>
</ul>
</p>
</div>
</div>
<!-- / error -->
</div>
<script defer type="module" src="js/index.js"></script>
</body>
</html>