Ckwebspeech
28 Oct 2014 - Alejandro Piña
CKWebSpeech is a speech recognition plugin to CKEditor, it type out voice ideas into CKEdtior, with support for 32 languages from 62 culture variants.
Demo:
Click on the microphone icon.
Requirements:
- CKEditor 4.
- Having installed CKEditor.
- Chrome >=25.
- Have connected a microphone to your device.
Install:
Unzip CKWebSpeech in CKEditor plugins directory.
js/ckeditor/plugins
├── ckwebspeech
│ ├── dialogs
│ │ └── ckwebspeech.js
│ ├── icons
│ │ ├── speech.gif
│ │ ├── webspeech-enable.gif
│ │ ├── webspeech-settings.png
│ │ └── webspeech.png
│ └── plugin.js
...
...
...
Edit CKEditor config.js
file, add the following code lines below
// See toolbar documentation
// https://ckeditor.com/docs/ckeditor4/latest/features/toolbar.html
config.toolbarGroups = [
...,
...,
{ name: 'ckwebspeech'} //Add the CKWebSpeech button on the toolbar
];
// Load CKWebSpeech resources
config.extraPlugins = 'ckwebspeech';
/**
Configure CKWebSpeech default settings, if this line is not added
by default starts with English-United States (en-us)
**/
config.ckwebspeech = {
'culture' : 'en-us',
'commandvoice' : 'okay', // trigger command listener
'commands': [ // action list
// {'[action]': '['text to trigger action']'}
{'newline': 'new line'},
{'newparagraph': 'new paragraph'},
{'undo': 'undo'},
{'redo': 'redo'}
]
};
Command-Trigger usage:
Say short sentences, when CKWebSpeech detects command-trigger (okay
) followed by some action, CKWebSpeech do not write the sentece instead it will execute the action (Undo, Redo, etc…)
e.g. If you express something like this:
Luke ‘okay new line’ I’m your father
CKWebSpeech
will replace okay new line
and the result will showed into CKEditor by the following way:
Luke
I'm your father
Downloads:
Contributing at GitHub