added speech

This commit is contained in:
Chris 2020-11-17 16:16:56 -05:00
parent 636813f7ec
commit 6943c866a8
3 changed files with 30 additions and 6 deletions

View File

@ -46,18 +46,12 @@
</form> </form>
</div> </div>
</nav> </nav>
<<<<<<< HEAD
<!-- <h1 class="display-3">Painted You</h1> --> <!-- <h1 class="display-3">Painted You</h1> -->
<!-- <img class="mainLogo" src="assets/images/logo1.png" alt="" srcset=""> --> <!-- <img class="mainLogo" src="assets/images/logo1.png" alt="" srcset=""> -->
<p id="painted"><span id="p">P</span><span id="a">A</span><span id="i">I</span><span id="n">N</span><span id="t">T</span id="e"><span>E</span><span id="d">D</span> <p id="painted"><span id="p">P</span><span id="a">A</span><span id="i">I</span><span id="n">N</span><span id="t">T</span id="e"><span>E</span><span id="d">D</span>
</p> </p>
=======
<hr>
<main>
<h1 class="display-3">Painted You</h1>
>>>>>>> dca41e40bafe86685d867336d60b6157556c8e74
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel"> <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators"> <ol class="carousel-indicators">
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li> <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>

11
speech/Test.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="Test.js"></script>
</body>
</html>

19
speech/Test.js Normal file
View File

@ -0,0 +1,19 @@
if ('speechSynthesis' in window) {
//
}else{
alert('error')
}
// alert("test");
var msg = new SpeechSynthesisUtterance();
var voices = window.speechSynthesis.getVoices();
msg.voice = voices[10];
msg.volume = 1;
// From 0 to 1
msg.rate = 1;
// From 0.1 to 10
msg.pitch = 0;
// From 0 to 2
msg.text = "1";
msg.lang = 'en';
speechSynthesis.speak(msg);