A Pen by Creative Punch

2,368 Kb

How do I make an a pen by creative punch?

What is a a pen by creative punch? How do you make a a pen by creative punch? This script and codes were developed by Creative Punch on 09 December 2022, Friday.

A Pen by Creative Punch Previews

A Pen by Creative Punch - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by Creative Punch</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
<body> <h1>HTML5 Speech Synthesis</h1>
<table id="speech-synthesis-demo"> <tbody colspan="2"> <tr> <td>Voice:</td> <td> <select id="voicelist"> </select> </td> </tr> <tr> <td>Text:</td> <td> <textarea rows=6 id="speech-input"></textarea> </td> </tr> <tr> <td></td> <td> <button id="speak-btn">Speak!</button> </td> </tr> </tbody>
<h1 class="author">Demo by <a href="http://creative-punch.net" target="_blank">Creative Punch</h1> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>

A Pen by Creative Punch - Script Codes CSS Codes

body { background-color: #38c;
h1 { text-align: center; color: white; text-shadow: 0 2px 2px #148;
h1 a { color: #9ef; text-decoration: none; font-style: italic;
h1 a:hover { color: #fff;
#speech-synthesis-demo { width: 650px; margin: 50px auto 0;
#speech-synthesis-demo td:nth-child(1){ color: white; text-shadow: 0 1px 0 #888;
#voicelist, #speech-input, #speak-btn{ width: 100%; display: block; margin: 5px; padding: 5px; border: 0; box-sizing: border-box;

A Pen by Creative Punch - Script Codes JS Codes

$(function(){ speechSynthesis.onvoiceschanged = function() { var $voicelist = $('#voicelist'); speechSynthesis.getVoices().forEach(function(voice, index) { console.log(index, voice.name, voice.default ? '(default)' :''); var $option = $('<option>') .val(index) .html(voice.name + (voice.default ? ' (default)' :'')); $voicelist.append($option); }); } $('#speak-btn').click(function(){ var text = $('#speech-input').val(); var msg = new SpeechSynthesisUtterance(); var voices = window.speechSynthesis.getVoices(); msg.voice = voices[$('#voicelist').val()]; msg.text = text; msg.onend = function(e) { console.log('Finished in ' + event.elapsedTime + ' seconds.'); }; speechSynthesis.speak(msg); })
A Pen by Creative Punch - Script Codes
A Pen by Creative Punch - Script Codes
Home Page Home
Developer Creative Punch
Username CreativePunch
Uploaded December 09, 2022
Rating 3.5
Size 2,368 Kb
Views 10,120
Do you need developer help for A Pen by Creative Punch?

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!

Creative Punch (CreativePunch) Script Codes
Create amazing marketing copy with AI!

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!