• Stars
    star
    206
  • Rank 189,836 (Top 4 %)
  • Language
    JavaScript
  • Created over 10 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple speech input for <input>s —replaces the now defunct x-webkit-speech attribute

speech-input

Simple speech input for <input> and <textarea> elements — replaces the now defunct x-webkit-speech attribute

Use:

  1. Include speech-input.css and speech-input.js
  2. Add a speech-input class to your <input> or <textarea>

And you're done! Here's a demo:

speech-input demo

Extra options

Other languages

It uses the value of the lang attribute on the <html> element by default. But you can override this by specifying a lang attribute on the input fields themselves. You may then also want to customize the "Speak now" text for that language with a data-ready attribute on that field:

<input type="text" class="speech-input" lang="es" data-ready="Habla ahora">

Button size

If, for any reason, you want to change the button size, you can use the data-buttonsize attribute:

<input type="text" class="speech-input" data-buttonsize="20">

Speech time limit

By default, it will wait a full 6 seconds after you finish speaking until it stops listening. You can change this time with the data-patience attribute:

<input type="text" class="speech-input" data-patience="2">

Submit when done

If you add the data-instant-submit attribute, the form that the input is in will automatically be submitted after listening stops:

<input type="text" class="speech-input" data-instant-submit>

FAQ

Why does it keep asking me to allow the microphone?

To have the microphone permissions persist, use https: http://stackoverflow.com/a/15999940/552067

I clicked the mic button but it didn't do anything.

Make sure you're using it on an actual server — it won't work on a file:// URL. Try starting up a simple static HTTP server.

Can I use this in non-webkit browsers?

Not yet.

License (MIT)

More Repositories

1

tabbed-panels

A declarative tabbed panels JS module
JavaScript
22
star
2

DOM-Builder

Simple DOM building in JS
JavaScript
8
star
3

characters

A giant dynamically generated table of UTF-8 characters with their respective decimal & hexidecimal escapings
JavaScript
7
star
4

observable-array

lightweight JS observable array constructor with methods cloned from Array.prototype and changed to notify observers after completion
JavaScript
4
star
5

bible-people

Genealogy data of people in the Bible
JavaScript
3
star
6

object-subscribe

Subscribe to changes on an object
JavaScript
3
star
7

bible-cross-references

Bible cross references: advanced search
JavaScript
3
star
8

JS-nth-prime

A simple JS nth prime calculator
JavaScript
3
star
9

subscribable.js

A tiny extendable JS constructor for custom event listening (implements mediator pattern). Use it in the browser or in node
JavaScript
3
star
10

rps-bot

A rock paper scissors bot
JavaScript
2
star
11

biblegateway-copy-as-md

Greasemonkey script that adds a "copy as markdown" button for scripture passages on BibleGateway.com
JavaScript
2
star
12

snoopy

Observable objects in JS
JavaScript
2
star
13

reftagger-bookmarklet

Just go to this page, drag the link to your bookmarks bar and click it when you're on a page with un-linked Bible references:
HTML
2
star
14

tooltips

Pure CSS tooltips
CSS
2
star
15

FatUI

A CSS / LESS UI framework for pretty forms: buttons, inputs, etc.
CSS
1
star
16

minesweeper

An object oriented minesweeper game in JS
JavaScript
1
star
17

html5-dnd-list

HTML5 Drag & drop ordering without jQuery
JavaScript
1
star
18

unitter

Simple, versatile unit conversion JS "class"
JavaScript
1
star
19

webApp

Web app boilerplate and helper functions
JavaScript
1
star
20

stackedit-extensions

I use this repo to easily add extra features to my online StackEdit environment.
JavaScript
1
star
21

wrapper

JS module for creating wrapping layouts. Demo:
JavaScript
1
star
22

income-gap-calc

embeddable tool that compares your income with the world's
JavaScript
1
star
23

triangle-solver

1
star
24

OEIS-linker

Automatically create links to sequences on a webpage referenced by their OEIS id
JavaScript
1
star
25

Lucas-Lehmer-JS

An implementation of the Lucas Lehmer isPrime function in JS
JavaScript
1
star
26

modal

super simple JS modal
JavaScript
1
star
27

ToDo

client-side to do list app
JavaScript
1
star
28

windower

JavaScript
1
star
29

tap

How fast can you tap?
JavaScript
1
star
30

toggle-brackets

bookmarklet: toggle display of bracketed text on a webpage (great for Amplified Bible)
JavaScript
1
star
31

mileage

Simple client-side mileage tracker web app
CSS
1
star
32

Tiny-Finance

A simple client-side javascript finance web app
JavaScript
1
star
33

verbalize

A set of tiny utility functions for converting data into human-readable text
JavaScript
1
star