Socket
Socket
Sign inDemoInstall

simpletts

Package Overview
Dependencies
0
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simpletts

A basic TTS manager


Version published
Weekly downloads
2
decreased by-81.82%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

simpletss

A basic tss manager, based on Microsoft Speech API or espeak for others OS

Installation

$ npm install simpletss

Features

  • simply read & play text

Examples


const SimpleTTS = require('simpletts');

console.log(SimpleTTS.getTTSSystem()); // 'SAPI' or 'espeak'

SimpleTTS.getVoices().then(function(voices) {

	console.log(voices); // depend of the TTS system used

	SimpleTTS.read({
		text: "ceci est un test",
		voice: voices[0], // optionnal, object or text, default first language detected
		volume: 100, // optionnal, percentage, 0 -> 100, default 100
		speed: 50 // optionnal, percentage, 0 -> 100, default 50
	}).then(function() {

		console.log('Ok');
		
	}).catch(function(err) {

		console.log(err);
		
	});

	SimpleTTS.read("ceci est un test").then(function() {
		// is equal to { text: "ceci est un test", voice: voices[0], volume: 100, speed: 50 }

		console.log('Ok');
		
	}).catch(function(err) {

		console.log(err);
		
	});

	// the default language can be changed like that :
	SimpleTTS.setDefaultVoice(voices[1]);

}).catch(function(err) {
	console.log(err);
});

Tests

$ mocha tests/tests.js

License

ISC

Keywords

FAQs

Last updated on 28 Jun 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc