Comparing version 2.1.0 to 2.2.0
{ | ||
"name": "simpletts", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A basic TTS manager", | ||
"main": "lib/main.js", | ||
"typings": "lib/index.d.ts", | ||
"scripts": { | ||
@@ -24,2 +25,6 @@ "tests": "gulp tests" | ||
"author": "Sébastien VIDAL", | ||
"contributors": [ | ||
"taffeldt", | ||
"JDBar" | ||
], | ||
"license": "ISC", | ||
@@ -31,8 +36,9 @@ "bugs": { | ||
"devDependencies": { | ||
"@types/node": "9.6.6", | ||
"gulp": "3.9.1", | ||
"gulp-plumber": "1.1.0", | ||
"gulp-coveralls": "0.1.4", | ||
"gulp-eslint": "4.0.0", | ||
"gulp-istanbul": "1.1.2", | ||
"gulp-mocha": "3.0.1", | ||
"gulp-istanbul": "1.1.2", | ||
"gulp-coveralls": "0.1.4", | ||
"gulp-plumber": "1.1.0", | ||
"pre-commit": "1.2.2" | ||
@@ -39,0 +45,0 @@ }, |
@@ -40,3 +40,3 @@ # simpletts | ||
* ``` getTTSSystem(void): string ("sapi"|"espeak") ``` | ||
* ``` getTTSSystem(void): "sapi" | "espeak" ``` | ||
* ``` getVoices(void): Promise<resolve<Array<Voice>>|reject<Error>> ``` | ||
@@ -52,3 +52,3 @@ * ``` isReading(void): boolean ``` | ||
name: string, | ||
gender: string ("male"|"female") | ||
gender: "female" | "male" | ||
} | ||
@@ -67,3 +67,3 @@ | ||
```javascript | ||
const SimpleTTS = require('simpletts'); | ||
const SimpleTTS = require("simpletts"); | ||
const tts = new SimpleTTS(); | ||
@@ -81,3 +81,3 @@ | ||
tts.read({ "text": "this is a test", "volume": 75, "speed": 60 }).then(() => { | ||
console.log('Ok'); | ||
console.log("Ok"); | ||
}).catch((err) => { | ||
@@ -88,3 +88,3 @@ console.log(err); | ||
tts.read("this is a test").then(() => { // is equal to { "text": "this is a test", "voice": voices[0], "volume": 100, "speed": 50 } | ||
console.log('Ok'); | ||
console.log("Ok"); | ||
}).catch((err) => { | ||
@@ -95,2 +95,33 @@ console.log(err); | ||
```typescript | ||
import SimpleTTS = require("simpletts"); | ||
interface Voice { | ||
name: string; | ||
gender: "female" | "male"; | ||
} | ||
interface Options { | ||
text: string; | ||
volume?: number; | ||
speed?: number; | ||
voice?: Voice | string; | ||
} | ||
const tts = new SimpleTTS(); | ||
tts.getVoices().then((voices: Array<Voice>) => { | ||
return tts.read({ | ||
"text": "test", | ||
"voice": voices[0] | ||
}); | ||
}).then((options: Options) => { | ||
console.log(options); | ||
}).catch((err: Error) => { | ||
console.log(err); | ||
}); | ||
``` | ||
## Tests | ||
@@ -97,0 +128,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39006
22
847
130
8