-
Notifications
You must be signed in to change notification settings - Fork 0
/
victor_french.html
277 lines (192 loc) · 7.67 KB
/
victor_french.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--
Awesome Template
http://www.templatemo.com/preview/templatemo_450_awesome
-->
<title>Literature Love</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="css/animate.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/templatemo-style.css">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.singlePageNav.min.js"></script>
<script src="js/typed.js"></script>
<script src="js/wow.min.js"></script>
<script src="js/custom.js"></script>
<script src="microsoft.cognitiveservices.speech.sdk.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script type="text/javascript" src="exp.json"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/microsoft-cognitiveservices-speech-sdk@latest/distrib/browser/microsoft.cognitiveservices.speech.sdk.bundle-min.js"> -->
</script>
<script>
$(document).ready(function () {
$('#lang').on('change', function() {
if ($('#lang :selected').text() == "English")
{
window.location.replace('https://gentle-pebble-08cfc3110.azurestaticapps.net/victor_eng.html')
}
if ($('#lang :selected').text() == "Tamil")
{
window.location.replace('https://gentle-pebble-08cfc3110.azurestaticapps.net/victor_tamil.html')
}
});
});
</script>
</head>
<body id="top">
<!-- start preloader -->
<div class="preloader">
<div class="sk-spinner sk-spinner-wave">
<div class="sk-rect1"></div>
<div class="sk-rect2"></div>
<div class="sk-rect3"></div>
<div class="sk-rect4"></div>
<div class="sk-rect5"></div>
</div>
</div>
<!-- end preloader -->
<!-- start header -->
<!-- end header -->
<!-- start navigation -->
<nav class="navbar navbar-default templatemo-nav" role="navigation">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon icon-bar"></span>
<span class="icon icon-bar"></span>
<span class="icon icon-bar"></span>
</button>
<a href="#" class="navbar-brand">Literature Love</a>
</div>
</nav>
<!-- end navigation -->
<!-- start home -->
<!-- start service -->
<section id="service">
<div class="container">
<a href="index.html" class="btn btn-default">Back to Home</a>
<div class="row">
<div class="col-md-12">
<h2 class="wow bounceIn" data-wow-offset="50" data-wow-delay="0.3s"><span>Demain dès l'aube - Victor Hugo</span></h2>
</div>
<div>
<label for="cars">Choose language:</label>
<select name="cars" id="lang">
<option value="volvo" selected="selected">French</option>
<option value="saab">English</option>
<option value="saab">Tamil</option>
</select>
</div>
<div id = "english">
<input type='submit' onclick='playaudio(event)' class='englishaudio btn btn-default' value='French Audio'>
<br/>
<br/>
Demain, dès l'aube, à l'heure où blanchit la campagne,<br/>
Je partirai. Vois-tu, je sais que tu m'attends.<br/>
J'irai par la forêt, j'irai par la montagne.<br/>
Je ne puis demeurer loin de toi plus longtemps.<br/>
Je marcherai les yeux fixés sur mes pensées,<br/>
Sans rien voir au dehors, sans entendre aucun bruit,<br/>
Seul, inconnu, le dos courbé, les mains croisées,<br/>
Triste, et le jour pour moi sera comme la nuit.<br/>
Je ne regarderai ni l'or du soir qui tombe,<br/>
Ni les voiles au loin descendant vers Harfleur,<br/>
Et, quand j'arriverai, je mettrai sur ta tombe<br/>
Un bouquet de houx vert et de bruyère en fleur<br/>
</div>
</div>
</div>
</section>
<!-- end servie -->
<!-- start copyright -->
<footer id="copyright">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="wow bounceIn" data-wow-offset="50" data-wow-delay="0.3s">
Developed by Vivek Raja P S (விவேக் ராஜா)
</div>
</div>
</div>
</footer>
<!-- end copyright -->
</body>
<script>
function playaudio(event){
// subscription key and region for speech services.
var subscriptionKey, serviceRegion;
var SpeechSDK = window.SpeechSDK;
var synthesizer;
var player;
pauseButton = $(".pauseButton");
resumeButton = $(".resumeButton");
subscriptionKey = "ccfe53df0b1d443fbc00dd1d7ec88d98";
serviceRegion = "eastus";
startSpeakTextAsyncButton = $(event.target);
startSpeakTextAsyncButton.hide();
console.log(startSpeakTextAsyncButton);
let inputText = startSpeakTextAsyncButton.parent().text();
console.log(inputText);
var audio = startSpeakTextAsyncButton.attr("value");
var voice = "";
var lang = "";
if(audio=="Tamil Audio"){
voice = "ta-IN-Valluvar";
lang = "ta-IN";
}
if(audio == "English Audio"){
voice = "en-IN-Heera";
lang = "en-IN";
}
if(audio=="French Audio"){
voice = "fr-FR-Paul";
lang = "fr-FR";
}
var ssmlpre = '<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="'+lang+'"> <voice name="'+voice+'">';
var ssmlpost = '</voice></speak>'
ssmlpre = unescape(encodeURIComponent( ssmlpre ));
ssmlpost = unescape(encodeURIComponent( ssmlpost ));
var ssml = ssmlpre+inputText+ssmlpost;
startSpeakTextAsyncButton.disabled = true;
var speechConfig;
speechConfig = SpeechSDK.SpeechConfig.fromSubscription(subscriptionKey, serviceRegion);
synthesizer = new SpeechSDK.SpeechSynthesizer(speechConfig);
console.log(ssml);
synthesizer.speakSsmlAsync(
ssml,
function (result) {
startSpeakTextAsyncButton.disabled = false;
if (result.reason === SpeechSDK.ResultReason.SynthesizingAudioCompleted) {
console.log("synthesis finished for [" + ssml + "].\n");
} else if (result.reason === SpeechSDK.ResultReason.Canceled) {
console.log("synthesis failed. Error detail: " + result.errorDetails + "\n");
}
window.console.log(result);
synthesizer.close();
synthesizer = undefined;
},
function (err) {
startSpeakTextAsyncButton.disabled = false;
console.log("err");
window.console.log(err);
synthesizer.close();
synthesizer = undefined;
});
if (!!window.SpeechSDK) {
SpeechSDK = window.SpeechSDK;
startSpeakTextAsyncButton.disabled = false;
}
}
</script>
</html>