-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (55 loc) · 2.01 KB
/
Copy pathindex.html
File metadata and controls
56 lines (55 loc) · 2.01 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Old English Pronunciator</title>
<link rel="stylesheet" href="./styles.css" />
<script src="./transcriber.js"></script>
<!-- <script src="./audio.js"></script> -->
</head>
<body>
<header>
o̞ld ɪŋlɪʃ pɹənʌnsietɹ̩
</header>
<main>
<div id="instructions">
<p>
You can use <code>\th</code> to represent Þ/þ, <code>\dh</code> to represent Ð/ð, and <code>\ae</code> to represent æ. Ƿ/ƿ (wynn) is treated identically to <code>w</code>.
</p>
<p>
Output is in <a href="https://en.wikipedia.org/wiki/International_Phonetic_Alphabet">IPA</a>.
Relevant source is <a href="./transcriber.js">here</a>, if you're curious.
</p>
</div>
<textarea id="input" placeholder="Text to transcribe" oninput="update()"></textarea>
<p class="transition">...is pronounced...</p>
<textarea id="output" disabled="disabled"></textarea>
<!-- <div id="speaking-controls">
<button onclick="audio.generate(output.value, [play, download])">Generate speech</button>
<button disabled="disabled" id="play" onclick="audio.play()">Play</button>
<button disabled="disabled" id="download" onclick="audio.download()">Download</button>
</div> -->
</main>
<footer>
<span class="left">© 2019 Nic Hartley</span>
<span class="right">Made for RIT's ENGL370</span>
</footer>
<script>
function update() {
location.hash = '#' + input.value;
}
window.onhashchange = () => {
input.value = decodeURI(location.hash.slice(1));
let [val, success] = transcribe(input.value);
output.value = val;
if (success) {
output.style.color = 'initial';
} else {
output.style.color = 'red';
}
};
window.onhashchange();
</script>
</body>
</html>