phonegap-plugin-speech-synthesis
    Overview
    Chat
    Issues
    Code
    Discussions
    Contributors
    Alternatives
    Dependencies
    Tutorials

phonegap-plugin-speech-synthesis

W3C Web Speech API - Speech synthesis plugin for PhoneGap

0.1.1  •  Updated 3 years ago  •  by Simon MacDonald  •  MIT License

SpeechSynthesisPlugin

W3C Web Speech API - Speech synthesis plugin for PhoneGap

Installation

Phone Gap

Using the command line tools run:

phonegap plugin add https://github.com/macdonst/SpeechSynthesisPlugin
cordova plugin add https://github.com/macdonst/SpeechSynthesisPlugin

Cordova

This plugin also works with the Apache Cordova toolset. See this Github project for an example for Android:

https://github.com/andysylvester/talk-to-me-cordova

More info on using this plugin with Cordova is available at this blog post.

Example Code

This code from the above Github project shows how to read the value of a text field, set up the plugin to speak that text, and vibrate the phone for 2 seconds:

 function playVibrate() {
    var u = new SpeechSynthesisUtterance();
    var x = document.getElementById("frm1");
    var txt = "";
    txt = x.elements[0].value
    u.text = txt;
    u.lang = 'en-US';
    speechSynthesis.speak(u);      
    navigator.notification.vibrate(2000);
    document.getElementById("frm1").reset();
  }

Popularity

Weekly Downloads
6
Stars
63

Maintenance

Development

Last ver 3 years ago
Created 3 years ago
Last commit 2 years ago
1 month between commits

Technology

Node version: 4.8.0
0 unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

8 contributors
macdonst
Maintainer, 28 commits
Works at adobe
Mike Nelson
5 commits
Works at Beweb
Andy Sylvester
3 commits
Julio César
Maintainer, 2 commits
Jan Piotrowski
1 commits
colonelchlorine
1 commits

Dependencies

Tags

ecosystem:cordova
ecosystem:phonegap
cordova-ios
cordova-android
cordova-browser
Ready for the next level?
Join Openbase's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookLinkedIn
© 2020 Devstore, Inc.