spoken
Advanced tools
Comparing version 1.1.14 to 1.1.15
{ | ||
"name": "spoken", | ||
"version": "1.1.14", | ||
"version": "1.1.15", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Stephen Blum", |
@@ -44,3 +44,3 @@ # Text-to-Speech and Speech-to-Text for Artificial Intelligence and Chatbot Apps | ||
### Add Voice Contorl to your OBS Twitch and YouTube Live Streams | ||
### Add Voice Controls to your OBS Twitch and YouTube Live Streams | ||
@@ -164,4 +164,9 @@ Learn how we [built an OBS | ||
### Text-to-Speech Voice Library | ||
### Text-to-Speech Voice Selection Library | ||
Synthetic voices are selectable using the `spoken.voices` method. | ||
There is a default voice that is included. | ||
You may want to pick a different voice. | ||
The following examples show you how to select a differnt voice. | ||
```javascript | ||
@@ -178,4 +183,8 @@ // List of voices supported on platform | ||
```javascript | ||
// List English Speaking Voices | ||
(await spoken.voices()).filter( v => v.lang.indexOf('en') == 0 ); | ||
// List of English Speaking Voices | ||
spoken.recognition.language = navigator.language || 'en-US'; | ||
let voices = (await spoken.voices()).filter( v => !v.lang.indexOf('en') ); | ||
// Use the First Voice | ||
spoken.say( 'Welcome to flavor town.', voices[0] ); | ||
``` | ||
@@ -182,0 +191,0 @@ |
27132
318