new speak program, fixed nato
This commit is contained in:
parent
e9cde19e66
commit
b26fe2e786
@ -30,6 +30,7 @@ var sites = [
|
|||||||
["/MTG/", "MTG"],
|
["/MTG/", "MTG"],
|
||||||
["/youtube_convert/", "Youtube Converter"],
|
["/youtube_convert/", "Youtube Converter"],
|
||||||
["/binary/", "Binary Converter"],
|
["/binary/", "Binary Converter"],
|
||||||
|
["/speak/", "Speak"],
|
||||||
["/nato/", "NATO Phonetic Alphabet"],
|
["/nato/", "NATO Phonetic Alphabet"],
|
||||||
["/rollDice", "Dice"],
|
["/rollDice", "Dice"],
|
||||||
["/be_mine/", "Be Mine!"],
|
["/be_mine/", "Be Mine!"],
|
||||||
|
|||||||
@ -12,6 +12,7 @@ h1{
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: cursive;
|
font-family: cursive;
|
||||||
color: whitesmoke;
|
color: whitesmoke;
|
||||||
|
margin: 15px;
|
||||||
}
|
}
|
||||||
.button{
|
.button{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Document</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script src="Test.js"></script>
|
|
||||||
<div class="container">
|
|
||||||
<button id="btn" onclick="test()">click me</button>
|
|
||||||
|
|
||||||
<h1 id="out"></h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
if ('speechSynthesis' in window) {
|
|
||||||
//
|
|
||||||
}else{
|
|
||||||
alert('error')
|
|
||||||
}
|
|
||||||
let num = 1;
|
|
||||||
// alert("test");
|
|
||||||
var msg = new SpeechSynthesisUtterance();
|
|
||||||
var voices = window.speechSynthesis.getVoices();
|
|
||||||
// msg.voice = voices[01];
|
|
||||||
msg.volume = 1;
|
|
||||||
// From 0 to 1
|
|
||||||
msg.rate = 1;
|
|
||||||
// From 0.1 to 10
|
|
||||||
msg.pitch = 0;
|
|
||||||
// From 0 to 2
|
|
||||||
msg.text = num;
|
|
||||||
msg.lang = 'en';
|
|
||||||
//
|
|
||||||
function test(){
|
|
||||||
document.getElementById("out").onclick = "";
|
|
||||||
document.getElementById("out").innerHTML = num;
|
|
||||||
msg.text = num;
|
|
||||||
speechSynthesis.speak(msg);
|
|
||||||
num= num+1;
|
|
||||||
document.getElementById("out").onclick = "out()";
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
.container{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-items: center;
|
|
||||||
align-items: center;
|
|
||||||
background-color: cornflowerblue;
|
|
||||||
padding: 20px;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
}
|
|
||||||
body{
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: 0;
|
|
||||||
background-color: cornflowerblue;
|
|
||||||
}
|
|
||||||
#btn{
|
|
||||||
color: blueviolet;
|
|
||||||
background-color: pink;
|
|
||||||
height: 200px;
|
|
||||||
width: 200px;
|
|
||||||
font-size: 4rem;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: none;
|
|
||||||
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
|
||||||
|
|
||||||
}
|
|
||||||
h1{
|
|
||||||
font-size: 7rem;
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user