Web Speech Demo
How do I make an web speech demo?
What is a web speech demo? How do you make a web speech demo? This script and codes were developed by Wes Bos on 09 December 2022, Friday.
Web Speech Demo - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Web Speech Demo</title>
</head>
<body> <!doctype html>
<html lang="en">
<head> <meta charset="UTF-8"> <title>Document</title>
</head>
<body> <h1>Say a colour</h1> <p>Easy</p> <span style="background:PINK;">PINK</span> <span style="background:PERU;">PERU</span> <span style="background:SALMON;">SALMON</span> <span style="background:MAGENTA;">MAGENTA</span> <span style="background:WHEAT;">WHEAT</span> <span style="background:VIOLET;">VIOLET</span> <span style="background:PLUM;">PLUM</span> <span style="background:TOMATO;">TOMATO</span> <span style="background:TEAL;">TEAL</span> <span style="background:Silver;">Silver</span> <span style="background:DARKRED;">DARKRED</span> <p>Harder</p> <span style="background:lemonchiffon;">lemonchiffon</span> <span style="background:dodgerblue;">dodgerblue</span> <span style="background:cornflowerblue;">cornflowerblue</span> <span style="background:PALEGOLDENROD;">PALEGOLDENROD</span> <span style="background:STEELBLUE;">STEELBLUE</span> <span style="background:CHARTREUSE;">CHARTREUSE</span> <span style="background:lightgoldenrodyellow;">lightgoldenrodyellow</span> <style> html,body { height:100%; } body { transition:all 0.4s; font-family: sans-serif; text-align: center; } h1 { font-size: 150px; transition:all 0.4s; /*top:50%;*/ position: relative; color:rgba(0,0,0,0.4); } span { color:rgba(0,0,0,0.4); /*text-shadow:1px 1px 0 rgba(0,0,0,0.5);*/ padding:10px; display: inline-block; font-weight: 600; text-transform: uppercase; margin-bottom: 5px; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script> var speech = function(){ var x = "lol"; var recognition = new webkitSpeechRecognition(); recognition.continuous = true; recognition.interimResults = true; recognition.onresult = function(event) { var colour = event.results[event.results.length - 1][0].transcript; // make it lowercase colour = colour.toLowerCase(); // strip the spaces out of it colour = colour.replace(/\s/gi,''); $('body').css('background',colour); $('h1').text(colour); } recognition.start(); } if (!('webkitSpeechRecognition' in window)) { alert("Sorry you require a browser that supports speech recognition"); } else { speech(); } </script>
</body>
</html>
</body>
</html>
Developer | Wes Bos |
Username | wesbos |
Uploaded | December 09, 2022 |
Rating | 4 |
Size | 2,073 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Outline-offset | 2,013 Kb |
Knockout white backgrounds from images with mix-blend-mode | 2,054 Kb |
JavaScript Challenge | 1,650 Kb |
CSS Character Units | 1,756 Kb |
Animation with CSS Variables | 2,504 Kb |
Responsive Flexbox Circles | 1,929 Kb |
Update CSS Variables with JS | 2,335 Kb |
Animate in from an empty state | 2,644 Kb |
Video Speed Scrubber | 2,782 Kb |
A Pen by Wes Bos | 4,273 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Tree growth tests | Orchard | 3,818 Kb |
Drop Cap | Gsaiki | 1,571 Kb |
Font stack | Adrianjacob | 1,868 Kb |
Polygon Logo in CSS | Kai | 3,412 Kb |
Scroll Arrow | Robooneus | 4,437 Kb |
Tail rose iris lined | Kbrtrm | 1,846 Kb |
DNA Double Helix | Hugo | 5,112 Kb |
CSS 3D Radio buttons | Andreasnylin | 1,650 Kb |
Scarlett Johansson Tribute Page | Diomed | 3,233 Kb |
Force Counter | Kenlauguico | 2,732 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!