-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsample.html
38 lines (33 loc) · 842 Bytes
/
sample.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
<html>
<head>
<title>segmentalZundamon</title>
<link rel="stylesheet" href="./sample.css">
</head>
<body>
<div>
<h1>segmentalZundamon</h1>
VOICEVOX:ずんだもん
</div>
<div>
<textarea id="text" onchange="textChanged()"></textarea>
<button onclick="play()">Play</button><button onclick="pause()">Pause</button><button onclick="resume()">Resume</button>
</div>
<script src="./SegZunAudio.js"></script>
<script>
let szAudio = new SegZunAudio("VOICEVOX:ずんだもん");
function textChanged() {
let text = document.getElementById('text').value;
szAudio = new SegZunAudio(text);
}
function play() {
szAudio.play();
}
function pause() {
szAudio.pause();
}
function resume() {
szAudio.resume();
}
</script>
</body>
</html>