cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <select id="language">
<button id="toggleButton">Start listening</button>
  <div id="transcript"></div>
  <div id="confidence"></div>
              #transcript {
  border: 1px solid #ccc;
  height: 100px;
              var toggleButton = document.getElementById('toggleButton');
var transcript = document.getElementById('transcript');
var confidence = document.getElementById('confidence');
var language = document.getElementById('language');

if (!('webkitSpeechRecognition' in window)) {
  transcript.innerText = 'The speech recognition API is not supported by this browser. To see this demo, try running Chrome version 25 or later.';
  toggleButton.disabled = true;
  language.disabled = true;

var recognizer = new webkitSpeechRecognition();
var isListening = false;

recognizer.continuous = true;
recognizer.interimResults = true;

recognizer.onresult = function(event) {
  transcript.innerText = '';
  for (var i = 0; i < event.results.length; i++) {
    transcript.innerText += event.results[i][0].transcript;
    confidence.innerText = 'confidence: ' + event.results[i][0].confidence;

var toggleListening = function(event) {
  isListening = !isListening;
  if (isListening) {
    event.target.innerText = 'Stop listening';
    recognizer.lang = language.options[language.selectedIndex].value;
    language.disabled = true;
  } else {
    event.target.innerText = 'Start listening';
    language.disabled = false;
    transcript.innerText = '';
    confidence.innerText = '';

toggleButton.addEventListener('click', toggleListening);
Loading ..................